Post

Replies

Boosts

Views

Activity

Network framework crashes from nw_browser_cancel call
Hi, I'm using the Network framework to browse for devices on the local network. Unfortunately, I get many crash reports that crash in nw_browser_cancel, of which two are attached. This discussion seems to have a similar issue, but it was never resolved: https://forums.developer.apple.com/forums/thread/696037 Contrary to the situation in the linked thread, my implementation uses DispatchQueue.main as the queue for the browser, so I don't think over-releasing the queue is the problem. I am unable to reproduce this problem myself, but one of my users can reproduce it reliably it seems. How can I resolve this crash? 2024-11-10_14-24-35.3886_+0100-4fdbdb8e944a4b655d60df53da3aa8c759f4fd1f.crash 2024-11-08_08-54-31.6366_+0100-303cabefb74bf89cdea3127b1cad122ee46016f2.crash
2
0
96
1w
Apple Pay Web Integration Without Third-Party Payment Processor in Laravel
Hello everyone, I'm working on integrating Apple Pay on the web for my Laravel-based website, aiming to offer a smooth payment experience directly on the site. I've carefully gone through the official Apple documentation and several third-party resources, and I've implemented the initial setup for Apple Pay Web. However, I've hit a roadblock regarding the payment token verification process. It appears that Apple Pay Web requires a third-party payment processor, such as Stripe or PayPal, to handle the verification of the payment token and complete the transaction. Unfortunately, I don't currently have an account with any of these services and would prefer to avoid relying on an external provider. I’m wondering if there's any alternative approach to achieve this integration without using a third-party service. Specifically, is there any way for Apple Pay to process payments directly through the website, similar to the "Tap to Pay" feature on iPhone? My goal is to enable a streamlined payment solution without needing a Stripe, PayPal, or similar account. Any insights, resources, or examples from anyone who's faced a similar scenario would be greatly appreciated. Thanks for your help!
0
0
133
1w
Modifying shellExitAction value in terminal profile
I would like to change the Mac OS terminal settings, shellExitAction value from the default to others value example 0 or 1. I know we can use the defaults command to edit the property list of the terminal. But the value for shellExitAction is nested in the Window Settings value. How to defaults write com.apple.terminal "Window Settings" -string 'Basic { shellExitAction = 2 }; ' correctly? The above I tried is not working and the value does not change.
3
0
87
1w
Payment not Complete right after CompleteMerchantValidation
We hav implemented Apple Pay for our project , Merchant setup etc. are properly done and we are able to see the Apple pop-up in the website , however the Payment cancelled is getting triggered after CompleteMerchantValidation event , due to this we are not able to see the final payment button Verified Certs, Merchant details as mentioned in the thread https://forums.developer.apple.com/forums/thread/689956 , however no luck , no error seen in the console. Any pointers to fix this is appreciable , thank you!
0
0
65
1w
How to Test FinanceKit Transaction History in iOS?
Hello, I am currently developing an iOS application that leverages FinanceKit to access transaction history. I have already enabled FinanceKit in my developer account, but I am encountering challenges when trying to test the transaction history feature. Could anyone guide me on the best practices or specific steps needed to effectively test FinanceKit’s transaction history in a development environment? Any insights on mock data handling, API responses, or potential limitations during testing would be greatly appreciated. Thank you in advance for your help!
0
1
70
1w
Support Status and Specific Implementation Methods for ContactProviderExtension with NotificationServiceExtension
I am considering an implementation to provide OS Contacts information in real-time using data from push notifications. Through a TSI (Technical Support Incident), Apple Support recommended combining ContactProviderExtension and NotificationServiceExtension. However, the following threads indicate that this combination is not supported, as confirmed by Apple DTS (Thread 1, Thread 2). Question 1: Latest Support Status for Using ContactProviderExtension with NotificationServiceExtension Additionally, there is limited documentation on implementing ContactProviderExtension, and I am specifically struggling with the following points: Question 2: Specific Implementation Guidance for ContactProviderExtension The method to call when providing Contacts information to the OS How to add and delete Contacts information provided to the OS How to verify the Contacts information currently provided to the OS Any insights on the latest support status or specific implementation methods for these extensions would be greatly appreciated.
0
0
121
1w
Writing an app to help install DMGs/PKGs
Hi all I work in music production, the way the tools are set up is we use many tools (plugins) inside one larger app (a DAW), as such the process of setting up a machine to do work involves running 50-100+ different installers to get all tools installed. I'd like to write a small app that will automate the install process. I have a working approach for this where all steps work when run individually in terminal or via AppleScript, but as I create one unifying app I am running into an issue where any app I create in Xcode is not allowed to mount DMGs or give commands to terminal (even if I make a build app package and move it out of the Xcode directory, and even if I give explicit permission via settings) and if I try to have the app try to do the works via terminal it also can't seem to access terminal. I think there are some limitations I'm missing here. Any tips?
2
0
113
1w
Is applicationIconBadgeNumber deprecated?
Our team had previously encountered deprecation warnings for applicationIconBadgeNumber, but while working with iOS 18.0.1 and Xcode version 16.1, I no longer see these warnings. Has the deprecation been reversed, or do we need to address it on our end? Please provide insights on whether the deprecation still applies, as there are no warnings in Xcode for that API and action items on the integrators.
1
0
110
1w
How to Dynamically Obtain Device Models for App Store Users?
I'm currently pulling device-specific data for my app, and I'm manually listing 150 models like this: device_models = [ "iPhone1_1", "iPhone1_2", "iPhone2_1", ... "iPad16_6"] Is there an API endpoint or an automated method to dynamically retrieve a complete list of device models? I'm specifically looking to connect this with the performance metrics API to monitor launch times per device type. Any suggestions on how to streamline or automate this list would be greatly appreciated. Thanks!
2
0
121
1w
Clarification needed regarding requirements for geofencing
In my app, I am using geofencing to perform an action when the user enter or leaves a specified location. The geofencing (CLMonitor) is active permanently, and should work across multiple app sessions or after the device is restarted. It should also work after the app was minimized or terminated. This worked perfectly with iOS 17 and prior, but with iOS 18, things changed. As soon as iOS 18 dropped, users were informing me that the app does no longer perform the entry/exit action reliably (without me making any changes to the app). Most of the times, events are missed entirely. Sometimes, after the user opens or resumes the app, duplicate events are delivered and/or events with the current time instead of the correct time of entry/exit. I am making sure that the app has the "Always" location permission before geofencing is enabled The gefocence radius is between 20 and 500m, but even with the max. radius specified, the geofencing is unreliable For the same user and geofence, the entry/exit event is delivered occasionally, but not always I am currently not using CLLocationManager.allowsBackgroundLocationUpdates (even though it's documented as "Apps that receive location updates when running in the background must include the UIBackgroundModes key (with the location value) in their app’s Info.plist file") because it wasn't necessary on iOS 17 and in my tests, using it didn't yield any improvements In my search for what could have caused this change, I found this WWDC video about location authorization: . It appears that with iOS 18, it is now required to have an active CLServiceSession to ensure that location updates are delivered to my app. Even though the video is long (and I've watched it multiple times), some things are still unclear. For example, the docs state: If your app actively receives and processes location updates and terminates, it should restart those APIs upon launch in order to continue receiving updates. Also, in the video it is stated that: ... So your job, ..., is to make sure that your process launch logic knows what features it has been tasked with pursuing, and re-takes session objects... But on the other hand it's also said that: you can only start holding one (a CLServiceSession) when your app is in the foreground and also ... CLMonitor.events won’t yield results when it is not in use, unless a session which was started in the foreground, .... To summarize my questions, for the geofencing to work as described above: when exactly do I need to create a CLServiceSession if the app is launched into the backgorund? Immediately in the applicationDidFinishLaunching method, even though the app is still in the background (applicationState is background)? Or later on, when the app is opened again by the user, e.g. in applicationDidBecomeActive (and applicationState is active)? do I need to specify the background mode capability as noted in the Handling location updates in the background article? do I need to create a CLBackgroundActivitySession as noted in the Handling location updates in the background article? does it matter, which of the four initializer methods I am using to create the CLServiceSession (with CLServiceSessionAuthorizationRequirementAlways)? does it matter if I specify NSLocationRequireExplicitServiceSession in the Info.plist or not when I already do ensure that the app has the "Always" location permission when the feature is being enabled Does a CLServiceSession last indefinitely and should it only be invalidated once the user disables the feature?
0
2
161
1w
Async/Await and updating state
When using conformance to ObservableObject and then doing async work in a Task, you will get a warning courtesy of Combine if you then update an @Published or @State var from anywhere but the main thread. However, if you are using @Observable there is no such warning. Also, Thread.current is unavailable in asynchronous contexts, so says the warning. And I have read that in a sense you simply aren't concerned with what thread an async task is on. So for me, that begs a question. Is the lack of a warning, which when using Combine is rather important as ignoring it could lead to crashes, a pretty major bug that Apple seemingly should have addressed long ago? Or is it just not an issue to update state from another thread, because Xcode is doing that work for us behind the scenes too, just as it manages what thread the async task is running on when we don't specify? I see a lot of posts about this from around the initial release of Async/Await talking about using await MainActor.run {} at the point the state variable is updated, usually also complaining about the lack of a warning. But ow years later there is still no warning and I have to wonder if this is actually a non issue. On some ways similar to the fact that many of the early posts I have seen related to @Observable have examples of an @Observable ViewModel instantiated in the view as an @State variable, but in fact this is not needed as that is addressed behind the scenes for all properties of an @Observable type. At least, that is my understanding now, but I am learning Swift coming from a PowerShell background so I question my understanding a lot.
3
0
215
1w
Getting error "Failed user key sync" when trying to connect to CloudKit after Xcode 16.1 update / iOS 18.1
Hey there, I’m feeling pretty desperate at this point, as my most recent update to Xcode 16.1 and the new 18.1 simulators has basically made it impossible for me to work on my apps. The same app and same code run fine in the 18.0 simulators with the same iCloud account logged in. I’ve tried multiple simulators with the same results, even on different computers. I’ve also tried logging in repeatedly without any luck. The CloudKit database logs don’t show any errors or suspicious entries. Reinstalling the app on the simulator doesn't help either. Whenever I launch the application in Xcode, I'm getting: error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _performSetupRequest:]_block_invoke(1240): <NSCloudKitMirroringDelegate: 0x600003d213b0>: Failed to set up CloudKit integration for store: <NSSQLCore: 0x103f124e0> (URL: file:///Users/kerstenbroich/Library/Developer/CoreSimulator/Devices/57BC78CE-DB2A-4AC0-9D7A-43C386305F56/data/Containers/Data/Application/EFDE9B05-0584-47C5-80AE-F2FF5994860C/Library/Application%20Support/Model.sqlite) <CKError 0x600000d3dfe0: "Partial Failure" (2/1011); "Failed to modify some record zones"; partial errors: { com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x600000d7c090: "Internal Error" (1/5000); "Failed user key sync"> }> error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate recoverFromError:](2310): <NSCloudKitMirroringDelegate: 0x600003d213b0> - Attempting recovery from error: <CKError 0x600000d3dfe0: "Partial Failure" (2/1011); "Failed to modify some record zones"; partial errors: { com.apple.coredata.cloudkit.zone:__defaultOwner__ = <CKError 0x600000d7c090: "Internal Error" (1/5000); "Failed user key sync"> }> error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromPartialError:forStore:inMonitor:]_block_invoke(2773): <NSCloudKitMirroringDelegate: 0x600003d213b0>: Found unknown error as part of a partial failure: <CKError 0x600000d7c090: "Internal Error" (1/5000); "Failed user key sync"> error: CoreData+CloudKit: -[NSCloudKitMirroringDelegate _recoverFromPartialError:forStore:inMonitor:](2820): <NSCloudKitMirroringDelegate: 0x600003d213b0>: Error recovery failed because the following fatal errors were found: { "<CKRecordZoneID: 0x600000d62340; zoneName=com.apple.coredata.cloudkit.zone, ownerName=__defaultOwner__>" = "<CKError 0x600000d7c090: \"Internal Error\" (1/5000); \"Failed user key sync\">"; } Any help/ideas would be much appreciated, because I have no clue what to try next. Thanks a lot!
3
3
228
1w
LaunchDaemon not loading after Sonoma update
I updated my computer to Sonoma, and now my LaunchDaemon will not load. I have the following setup : File in /Library/LaunchDaemons/com.startup.plist like this : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.startup</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/bash</string> <string>/Library/Scripts/Startup/startup.sh</string> </array> <key>RunAtLoad</key> <true/> <key>StandardErrorPath</key> <string>/tmp/com.startup.stderr</string> <key>StandardOutPath</key> <string>/tmp/com.startup.stdout</string> </dict> </plist> File in File in /Library/Scripts/Startup/startup.sh #!/bin/zsh PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users:/Users/root:/Users/root/Scripts:/Library/Scripts:/Library/Scripts/Startup #Load modules for Fuse /Library/Filesystems/macfuse.fs/Contents/Resources/load_macfuse /usr/sbin/sysctl -w vfs.generic.macfuse.tunables.allow_other=1 #Connect to XXXXXX_net /bin/sleep 28 myip=0 while [ $myip = 0 ] do /bin/sleep 3 myip=$(ifconfig -l | xargs -n1 ipconfig getifaddr) done /usr/local/bin/sshfs XXXX@XXXXXX.net: /Volumes/XXXXXX.net -o local,auto_cache,reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,ConnectTimeout=5,daemon_timeout=60,iosize=2097152,volname=XXXXXX.net,allow_other,defer_permissions,async_read,Ciphers=aes128-gcm@openssh.com,Cipher=aes128-gcm@openssh.com,compression=no And then we need some commands to be run as root user during boot : /private/etc/sudoers.d/startup-script-nopasswd username ALL = (root) NOPASSWD: /usr/sbin/sysctl username ALL = (root) NOPASSWD: /usr/local/bin/sshfs As of now, I cant even get the /Library/LaunchDaemons/com.startup.plist to run after i updated the macOS to Sonoma ….
3
0
196
1w
StoreKit in IOS 18
I have has a the Storekit working in my application previously. It uses the a iTunes songs ID and allows the user to purchase the track from iTunes within the app using a View. its been fine in IOS 17 but since the update to 18 Ive not been able to get this to work. the iTunes panel loads within the app and shows the track I wish to purchase. on clicking purchase I login with my Apple ID password. that then spins for a few seconds then asks to do the purchase again. Can you please advise. code below print ("Store ID + \(self.appId)") let storeProductViewController = SKStoreProductViewController() storeProductViewController.delegate = self let parameters = [SKStoreProductParameterITunesItemIdentifier: self.appId] storeProductViewController.loadProduct(withParameters: parameters) { status, error -> Void in if status { self.present(storeProductViewController, animated: false, completion: nil) print("success: \(status.description)") } else { if let error = error { print("Error: \(error.localizedDescription)") } } } DispatchQueue.main.async { self.isPresentStoreProduct.wrappedValue = false } }
1
1
137
1w
Compression LZMA2 (SWCompression)
Hi everyone, I am trying to compress my data using LZMA2 with the help of CocoaPods. Here are the steps I followed to achieve LZMA2 compression: Added the pod 'SWCompression', '~&gt; 4.8' dependency to my Podfile and installed the pod using the terminal. When I try to compress the data using LZMA2, I am unable to do so because in SWCompression, LZMA2 compression is marked as TBD (To Be Determined). Here is the current status of SWCompression: Deflate BZip2 LZMA/LZMA2 LZ4 Decompression ✅ ✅ ✅ ✅ Compression ✅ ✅ TBD ✅ Zlib GZip XZ ZIP TAR 7-Zip Read ✅ ✅ ✅ ✅ ✅ ✅ Write ✅ ✅ TBD TBD ✅ TBD Since LZMA2 compression is still marked as TBD, is there any other way to achieve LZMA2 compression for my data in SwiftUI?
1
0
128
1w
iOS Peer to Peet communication
Hi Everyone, Is there a framework or pattern to allow peer to peer communication between multiple iOS application? The use case would be as follow: An organizer creates a session with multiple users. The users receive an invitation (initially via email or sms), they install the app, upon accepting the invitation, they join a session. The session then allow peer to peer communication between users, not necessarily in the form of text messages, but more on information and synchronization between states of models between the members. Is there a framework for such a communication, or are we forced to go through a server to relay messages? I found the Multipeer communication Framework but it is for the discovery of devices, not for communication between applications. Thanks a lot.
1
0
113
1w
Apple Pay recurring takes longer
Hi, I'm working on implementing Apple Pay on the Web. I noticed, both on my web but also on official Apple Pay on the Web Demo page (https://applepaydemo.apple.com/apple-pay-js-api) when you're sending request for recurring payment, it takes much longer to get response from Apple server (even in onpaymentauthorized method) than when using regular payment. You can test on the page mentioned above. When you authorise test card with basic payment it's pretty fast, but when you do authorisation with test card for recurring payment (or Deferred or Automatic Reload) "processing payment" is much longer. Is there a reason why is this and is there a way to speed it up? Thank you. Kind regards, Zoran
0
0
68
1w