Post

Replies

Boosts

Views

Activity

Reply to Silent Background Notifications won't keep app awake
Quick addon: When running the app on the phone, attached to the XCode debugger, then minimizing the app, locking the phone and then sending it a silent push notification I also don't succeed in gettingfunc application(_: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void)to get called.In the Console at some point it says:COMPLETED com.apple.pushLaunch.de.myapp.app:0ADB2E at priority 5 ! NO LONGER RUNNING com.apple.pushLaunch.de.myapp.app:0ADB2E ...Tasks running in group [com.apple.dasd.defaultNetwork] are 0!The only suspicious logs I can see before that are:-CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Sending stop command to de.myapp.app with pid '494' because client is not allowed to play in the background AND does not continue AirPlaying video when device locks [sceneID:de.myapp.app-default] Scene action [SceneLifecycleEventOnly][0xe7ca] completed with success: 1 [sceneID:de.myapp.app-default] Scene activity state did change: BackgroundInactive. Invalidating assertion 27-57-731 (target:application) from originator 57
Mar ’20
Reply to Silent Background Notifications won't keep app awake
Ok, after some more digging it seems like what I speculated above is actually true.When you don't have an app that has any other background modes active (like location or audio) your app will be suspended (most of the times) when the users minimize/close it. When you then send a silent push notification to the app it is not running in the background and thus the callback "didReceiveRemoteNotification" will not get called.Instead, your app will be started in the background and the silent push notification's parameters will get passed into the initial funcapplication(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions:...as "launchOptions". So on app start you should check the launchOptions dictionary for your silent push notification's data and process it accordingly.
Mar ’20
Reply to Can a hardware keyboard be detected by an app on iPad?
Hey guys,I have the exact same question. In my case I'd like the UI to adopt if e.g. a user with limited physical and/or motor skills navigating the iOS app with a hardware keyboard (through the accessiblity feature) uses my app. Right now I have a list overlaying a map (similar to iOS' Maps app) and navigating that list with a keyboards doesn't work well.I'd like to be able to detect if a user navigates my app with a hardware keyboard and make that overlaying list fullscreen in that case.Any ideas on how to accomplish the hardware keyboard detection?Cheers,Sebastian
Mar ’20
Reply to ld: building for iOS Simulator, but linking in object file built for iOS, file for architecture arm64
@edford: thx for the prompt response! Maybe I'm misunderstanding things, but I am indeed currently running Xcode using Rosetta. And the problem vanishes. As far as I thought I had understood it this is due to the Simulator also running in Rosetta - hence using the x86_64 arm64 lib and not giving me any problems when linking. Is there another explanation for this 'fix'?
Nov ’21
Reply to TabView with TabSection crashing on iPad
I'm experiencing the same issue. It occurs, when minimising the app. My guess is that this happens while generating the snapshot for the app switcher. Even adding an empty section will crash my app: TabSection("Feeds") { Tab("Home", systemImage: "house", value: Navigation.Sidebar.default) { EmptyView() } } Removing the wrapping "TabSection" fixes the issue.
Oct ’24
Reply to TabView with TabSection crashing on iPad
@JagCesar2 Hey, have you heard anything from your bug report? I just dug back into this issue and was able to reproduce it with Apple's own DestinationVideo project: https://developer.apple.com/documentation/visionos/destination-video Only thing you need to modify is uncheck 'Requires full screen' in Deployment info. After that select any item in the sidebar and minimise the app. If it doesn't crash after the 1st attempt, retry it a couple of times. For me it always bails with: SwiftUI/SidebarAdaptableTabViewStyle_iOS.swift:482: Fatal error: Tried to update with invalid selection value I also created a radar under FB15759496
1w