Post

Replies

Boosts

Views

Activity

Reply to OS debug logs not visible in console when macOS is closed
@DTS Engineer, sure will do that, thanks once again for patiently answering. I will open new thread as you recommended Would you think it would be better suited under App & System Services > iCloud and then tag SwiftData, Service Management? The reason for thinking is a lot of it is to do with the remote notification. New thread https://developer.apple.com/forums/thread/838805
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to OS debug logs not visible in console when macOS is closed
@DTS Engineer thank you so much. Thanks for patiently answering my questions, really appreciate it. The links are so cool, I will go through those links. My scenario I have an app which stores data using SwiftData / CloudKit automatic sync It works well, except when Mac app is closed and the data from the CloudKit is not pulled into the DB on the Mac. It would be nice if the widget on the Mac is updated even when the Mac app is closed. Like from a sync from an iPhone. My problem: I don't do anything for sync other than just initializing the ModelContainer and everything is taken care of. The local store has its own system level tables to maintain the sync states. So I am a bit hesitant to do a separate sync in the background process (LoginItem / LaunchAgent / LaunchDaemon. I need to read a lot on this because I am just beginning to explore this part Questions Is it feasible / advisable to have one instance of the ModelContainer created in the background process and access it in the main app for the Mac? Reason for asking is because ModelContainer is the one that does all the sync magically. Or is this too much of an overhead and users can open the app to keep the widget updated?
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to OS debug logs not visible in console when macOS is closed
Thanks Quinn @DTS Engineer, It was my fault I should have been more clear about my scenario. My Scenario The app is not opened by the user. Mac app is woken by silent remote notification (no UI presented) (https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app) Explanation My macOS app is fully closed I don't tap on the macOS app icon The macOS app listens to (silent notifications, no UI notification) remote notifications for data update. When the macOS app receives this notification, the app is woken up however no UI is presented (as expected) and calls application(_:didReceiveRemoteNotification:) Summary For macOS app the debug logs inside application(_:didReceiveRemoteNotification:) are not called when app is closed and is woken by silent notifications. I know the macOS app is woken up because the data refresh happens, just that that the logs are not visible in the console. However for iOS app the debug logs inside application(_:didReceiveRemoteNotification) async -> UIBackgroundFetchResult are visible in the console app.
Topic: App & System Services SubTopic: Core OS Tags:
2w
Reply to Pass data to an @Observable model
Thanks @ChrisDE, in my case I need a model The example shown above is a simplified version of the actual use case. The problem / confusion is when a model depends on external input there are 3 options that I am aware of: Option 1: Create the model in the child view In the initializer of child view accept the input and initialize the model in the init of the view Problem with this approach is a view's init could be called multiple times and new instances would be created unnecessarily. These new instances would be discarded but just an unnecessary creation Option 2: Create the model in the parent view Pass the model to the child view The problem is the child view model is created ahead of time and may be the user never goes to the detail view and still gets created unnecessarily Option 3 Create a model in the child view The model contains the carID as an optional property and is nil. Child view accepts the input In the task of the child view update the model.carID as the actual view and do the fetch there. Presently I am using Option 3, I wanted to know if there was a better way
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3w
Reply to Code Signing (I think)
Can you try running on the simulator instead of on a real device? If you are starting new: Learn swift (https://docs.swift.org/swift-book/documentation/the-swift-programming-language/) Learning iOS development (https://cs193p.stanford.edu) - Use this as a guidance, then once you are comfortable with the basics then refer to Apple documentation / WWDC videos Learn SwiftUI (WWDC videos are pretty good)
Topic: Code Signing SubTopic: General
4w
Reply to Error when access StoreView / ProductView on iOS 27.0 simulator
@App Store Commerce Engineer Thanks, yes you are right, it has been fixed in Xcode 27 Beta 4 I have closed FB23494579
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
1d
Reply to SKTestSession.buyProduct(identifier: options:) throws error
@App Store Commerce Engineer Thanks for fixing FB23566876 Tested using the following environment: Xcode 26.6 (17F113) iOS 26.6 (on iPhone device) - not simulator Summary: Closed the feedback FB23566876? Seems to work as expected. @CHC383 iOS 26.5 simulator is not yet available I tested on iOS 26 device.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
3d
Reply to OS debug logs not visible in console when macOS is closed
@DTS Engineer, sure will do that, thanks once again for patiently answering. I will open new thread as you recommended Would you think it would be better suited under App & System Services > iCloud and then tag SwiftData, Service Management? The reason for thinking is a lot of it is to do with the remote notification. New thread https://developer.apple.com/forums/thread/838805
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Reply to OS debug logs not visible in console when macOS is closed
@DTS Engineer thank you so much. Thanks for patiently answering my questions, really appreciate it. The links are so cool, I will go through those links. My scenario I have an app which stores data using SwiftData / CloudKit automatic sync It works well, except when Mac app is closed and the data from the CloudKit is not pulled into the DB on the Mac. It would be nice if the widget on the Mac is updated even when the Mac app is closed. Like from a sync from an iPhone. My problem: I don't do anything for sync other than just initializing the ModelContainer and everything is taken care of. The local store has its own system level tables to maintain the sync states. So I am a bit hesitant to do a separate sync in the background process (LoginItem / LaunchAgent / LaunchDaemon. I need to read a lot on this because I am just beginning to explore this part Questions Is it feasible / advisable to have one instance of the ModelContainer created in the background process and access it in the main app for the Mac? Reason for asking is because ModelContainer is the one that does all the sync magically. Or is this too much of an overhead and users can open the app to keep the widget updated?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Reply to OS debug logs not visible in console when macOS is closed
@DTS Engineer thank you so much!!!! I have been breaking my over this for the past few days. Wow, that is such a clear explanation. You are spot on, on macOS silent push (remote) notifications are not received when app is closed. I will try to read on SMAppService, you also mentioned you can do it from the main app, are there any pointers on how to do that?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Reply to iOS 26.5 simulator failed process in-app purchases from Storekit configuration
@App Store Commerce Engineer On Xcode 26.6 I couldn't find / add the iOS 26.6 Beta 5 simulator (components). It was not available. I don't have a spare phone to install iOS 26.6 Beta 5 to install and test this Questions: Is there a way to install iOS 26.6 Beta 5 simulator? Which Xcode version was used to test FB23566876?
Replies
Boosts
Views
Activity
2w
Reply to SKTestSession.buyProduct(identifier: options:) throws error
@App Store Commerce Engineer On Xcode 26.6 I couldn't find / add the iOS 26.6 Beta 5 simulator (components). It was not available. I don't have a spare phone to install iOS 26.6 Beta 5 to install and test this Questions: Is there a way to install iOS 26.6 Beta 5 simulator? Which Xcode version was used to test FB23566876?
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
2w
Reply to OS debug logs not visible in console when macOS is closed
@DTS Engineer This is a macOS native app. To be specific it is a Multiplatform app, so it is a macOS app and not a Mac catalyst app.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2w
Reply to OS debug logs not visible in console when macOS is closed
Thanks Quinn @DTS Engineer, It was my fault I should have been more clear about my scenario. My Scenario The app is not opened by the user. Mac app is woken by silent remote notification (no UI presented) (https://developer.apple.com/documentation/usernotifications/pushing-background-updates-to-your-app) Explanation My macOS app is fully closed I don't tap on the macOS app icon The macOS app listens to (silent notifications, no UI notification) remote notifications for data update. When the macOS app receives this notification, the app is woken up however no UI is presented (as expected) and calls application(_:didReceiveRemoteNotification:) Summary For macOS app the debug logs inside application(_:didReceiveRemoteNotification:) are not called when app is closed and is woken by silent notifications. I know the macOS app is woken up because the data refresh happens, just that that the logs are not visible in the console. However for iOS app the debug logs inside application(_:didReceiveRemoteNotification) async -> UIBackgroundFetchResult are visible in the console app.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2w
Reply to How to uniquely identify the device for my app?
Thanks a lot @kthchew
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
2w
Reply to Using NotificationCenter's messages NSPersistentCloudKitContainer.EventChangedMessage (AsyncMessage) causes crash
Thanks to Apple and @DTS Engineer Quinn for fixing this issue in Xcode 27.0 beta 3 (27A5218g) Following were tested: No longer crashes Able to receive notifications Many thanks!! Much appreciated!!
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
3w
Reply to Pass data to an @Observable model
Thanks @ChrisDE, in my case I need a model The example shown above is a simplified version of the actual use case. The problem / confusion is when a model depends on external input there are 3 options that I am aware of: Option 1: Create the model in the child view In the initializer of child view accept the input and initialize the model in the init of the view Problem with this approach is a view's init could be called multiple times and new instances would be created unnecessarily. These new instances would be discarded but just an unnecessary creation Option 2: Create the model in the parent view Pass the model to the child view The problem is the child view model is created ahead of time and may be the user never goes to the detail view and still gets created unnecessarily Option 3 Create a model in the child view The model contains the carID as an optional property and is nil. Child view accepts the input In the task of the child view update the model.carID as the actual view and do the fetch there. Presently I am using Option 3, I wanted to know if there was a better way
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
3w
Reply to In App Purchase Sandbox Testing - Clear Purchase History Not Working
I have created a Feedback: FB23078234 It would be great if Apple can fix it
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
3w
Reply to iOS 26.5 simulator failed process in-app purchases from Storekit configuration
Based on my experience iOS 26.5 for SKTestSession has bugs Refer to the following threads: https://developer.apple.com/forums/thread/836842 https://developer.apple.com/forums/thread/830493 Worth filing feedbacks Workaround: iOS 26.2 seems to work
Replies
Boosts
Views
Activity
4w
Reply to Code Signing (I think)
Can you try running on the simulator instead of on a real device? If you are starting new: Learn swift (https://docs.swift.org/swift-book/documentation/the-swift-programming-language/) Learning iOS development (https://cs193p.stanford.edu) - Use this as a guidance, then once you are comfortable with the basics then refer to Apple documentation / WWDC videos Learn SwiftUI (WWDC videos are pretty good)
Topic: Code Signing SubTopic: General
Replies
Boosts
Views
Activity
4w