Post

Replies

Boosts

Views

Activity

Reply to Notification Service Extension restrictions
You say the iteration is part of the initialization process, hence its a one time operation, why therefore cannot it be performed by the app (I use the term app to not include the extension) the first time the app runs, and then the results of that made available to the extension? I've not thought about it until now... since I didn't know extensions will fail like this. Also an extension doesn't simply run for 30 seconds, it will run until the completion handler is called, if the handler is not called within 30 seconds then the system will call the handler for you. If you have to do the iteration within the extension, you will need to delay calling the completion handler until the iterations have completed. I am delaying the invocation of completion handler until the iterations are completed. In the app, these 65k iterations take 2 sec. In the extension, after 38k interactions (roughly), the process is killed... and the default notification is displayed as is. This does not take the whole 30 sec... after 1 or 2 sec, process is killed. So, I'm not hitting the time limit. The extension has a set memory limit, which is much less than that of an app. The 2D array is static. So, memory usage shouldn't spike suddenly. But CPU usage will spike when the iterations begin. So, is there similar restriction on CPU usage? Are all these restrictions, whether its CPU or memory or any other system resource consumption, documented somewhere? I'd like to know the boundaries when rethinking initialise step.
Jun ’24
Reply to Apple Watch console / device logs is empty
I followed all the instructions, downloaded the sysdiagnose thing... it's a watchOSconfig.mobileconfig file. I installed the profile on AppleWatch and I still didn't get any logs on Console App. But I do get logs on Xcode console when I run the app from Xcode, but I don't want to attach debugger. My env: watchOS 10.0, iOs 17.3.1, Xcode 15.1. Any ideas? :(
Mar ’24
Reply to Universal link not passed to SceneDelegate when app runs in the background
I raised a TSI to AppleDTS and they informed me that the scene(_ :continue:) method is for a UIKit app. For SwiftUI app, we have to use the onOpenURL(_:perform:) view modifier to handle universal links (and other URL based launches like file launch, deep link etc.) as shown below. WindowGroup { ContentView() .onOpenURL(perform: { (universalLink: URL) in Log(String(format: "universalLink = %@", universalLink.absoluteString)) // Handle universal link }) }
Feb ’24