-
Notifications
You must be signed in to change notification settings - Fork 505
_BSMachError: (os/kern) when going to Settings #160
Comments
Ah, thanks for the tip @trozware! I'll work this into an upcoming release. |
Maybe related to the project's Anyhow, I cannot comment on the above ("en" is the default and should work). For me it looks like an iOS bug, it is trigger by UIApplication.sharedApplication().openURL(settingsUrl!) when invoked by a handler. Now the fun part, "fixing" it: Current Call:
Solution: Explicitly invoke openURL on the main queue.
Not what I want to see when invoking openURL, but this actually fixes the warning "for us". It's likely still logged in the iOS Console Logs, but Apple's fault, Apple's log. Edit: Simplified fix. |
@nickoneill I'm having the same issue where app crashes after any of the app permissions changes (have tried camera, microphone, and location) while the app is in the background e.g. after pressing "Show Me" on the showDeniedAlert. Same error message as @trozware. I've tried @winkelsdorf 's fix of invoking openURL on the main queue, but that only removed the console error. App still crashed. This is what my "Show Me" code looks like w/ the fix: alert.addAction(UIAlertAction(title: "Show me".localized,
style: .Default,
handler: { action in
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("appForegroundedAfterSettings"), name: UIApplicationDidBecomeActiveNotification, object: nil)
let settingsUrl = NSURL(string: UIApplicationOpenSettingsURLString)
dispatch_async(dispatch_get_main_queue()) {
UIApplication.sharedApplication().openURL(settingsUrl!)
}
})) I've also tried the localization "en" to "United States" fix in info.plist with no effect. Anything I am doing wrong? Update: App crash seems to be only with the debugger on. Running the app w/out debugger and switching permissions while it is in background will cause the app to not crash but restart. |
@yichengsun Yes - the crash isn't an issue with PermissionScope but as-designed for iOS. Changing certain permissions in the settings screen will terminate apps that have requested those permissions. This particular issue is related to fixing the warning only. |
gotcha |
@nickoneill is there a solution at this point or will it just always crash? |
There is no solution @otymartin, this is expected behavior from the OS. The situation is unchanged from 12 days ago. |
@nickoneill Yea it crashes while app is connected via USB but works fine on its own. |
Closing as PS isn't to blame for this issue |
If permission is denied and the "Show Me" dialog button is tapped to go to Settings, the console shows 2 errors:
This can be solved by using
dispatch_after
ordispatch_async
on the main queue to open the Settings URL.The text was updated successfully, but these errors were encountered: