Posts

Post not yet marked as solved
1 Replies
1.1k Views
My iOS-app shows a map and may be the user's location. At some point it will request the "always" location permission. On iOS all is well. The app also runs pretty neat on M1 macs so far, except for the part where it wants to request that permission. I also think it never asked me for the "Permission when in use" on the M1. However, after the user granted the always-permission on iOS, he'll be shown the screen of the GPS tracker. Since recording GPS tracks doesn't make much sense on M1, I'd like to show the user that screen, but disable the start button. So how do I test for M1? P.S. I'd not ask such a dumb question, if I didn't get this error: (including these strange quotes) „POI Toolbox“ kann nicht installiert werden Domain: IDEInstallLocalMacService Code: 1 Failure Reason: Versuche es später noch einmal. Recovery Suggestion: Failed to finalize LSBundleWrapper mutator instance for {...BUNDLE_ID...} -- System Information macOS Version 11.4 (Build 20F71) Xcode 12.5.1 (18212) (Build 12E507) Timestamp: 2021-06-28T12:31:13+02:00 The "failure reason" doesn't say anything helpful. It means "Try again later."
Posted
by Anticro.
Last updated
.
Post not yet marked as solved
0 Replies
434 Views
When we ask users for permission to use their location, they'll be able to grant permission to "WhenInUse" in the first step. After that the app may ask for "Always" authorization and the user taps 'Change to always'. That's fine. So far... But there is something missing: Issue on the 1st step: An app can't tell the user that the wrong permission button was tapped ('Allow once' is sometimes wrong, see step 2) and to go to the settings to correct that. 'Allow once' is okay to show the user's location on a map. BUT if the app later needs BG permission, step 2 will fail silently. That's confusing to the user, and to the developer! Also, some users get nervous if they encounter such system pop-ups (i.e. see your mothers and fathers) and tend to tap 'Allow once'. (My app shows a map, where 'Allow once' is okay, but it also is a GPS tracker in the 2nd use-case) Issues on the 2nd step: (2.1) Well, the user asks the app to record a GPX track and before he chose 'Allow once' (because he wanted the map to locate himself; the same app session). Guess what? Nothing at all happens. To the user the app appears to be buggy. Since it didn't get any explicit callback by the system it never was able to determine whether another permission request could be successful or not. (2.2) The user selected "WhenInUse" in step (1) and decided to "Keep 'WhenInUse'". Nothing at all happens. Again. Problem here: The user tapped a button and the app doesn't get any callback on this. That probably breaks functionality. I have also tried to receive notifications (about key windows: UIWindowDidBecomeKeyNotification and UIApplicationDidBecomeActiveNotification). But the pop up seems not to be anything like a window or ... whatever would cause the app to resign the active state. So here are my 2 cents. If I'd be the engineer of CLLocationManager, I'd like to change the following (R = Request): (R1) Add CLAuthorizationStatusTemporary (That is: "Allow once only" and means: "You don't even need to ask for 'Always' authorization") (R2) Some in-app mechanism, that would allow the user to correct the choice to "Allow 'WhenInUse'" once. (R3) Always give a feedback on the current authorization status, after the user taps a button. Can we please have these changes?
Posted
by Anticro.
Last updated
.
Post not yet marked as solved
6 Replies
2k Views
Hi!A few weeks ago I finally updated my audio app to support CarPlay. I have tested it with the 12.4 simulator and it was running fine. Now, if I compile and test on the iOS 13.1 simulator, it tells me that CarPlay can't connect to my app. The same happens if my colleague tries to use the app in a real CarPlay environment. A few days ago he also updated his XR to iOS 13.1, so we can't test it with a real iOS 12.4.I don't understand what I could be missing. I already searched on StackOverflow and googled lots of possible keywords. But I've found nothing that would help or give a hint what's wrong with my app.Again, all is fine with iOS 12.4 simulator.If someone has an idea or advice, what could cause my problems, please feel free to post an answer.Here is a short overview (essential methods only), what I've implemented:@implementation CPMainController - (instancetype)init { self = [super init]; if (self) { DLog(@"I", @""); // 1. code that registers handlers with the MPRemoteCommandCenter: // playCommand, // pauseCommand, // stopCommand, // togglePlayPauseCommand, // previousTrackCommand and // nextTrackCommand // 2. code that invokes '[MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = someTitleInfo;' _playableContentManager = [MPPlayableContentManager.sharedContentManager retain]; _playableContentManager.dataSource = self.dataSource; _playableContentManager.delegate = self.delegate; /* here, I already tried several variants and combinations */ // [_playableContentManager beginUpdates]; // DLog(@"I", @"force load the content items"); // [self.dataSource contentItems]; // [_playableContentManager endUpdates]; [_playableContentManager reloadData]; } } - (cp_data_source*)dataSource { // lazy getter, creates and returns an instance of 'cp_data_source' } - (cp_delegate*)delegate { // lazy getter, creates and returns an instance of 'cp_delegate' } (... some other stuff for memory management ...) @end@implementation cp_data_source - (NSArray<mpcontentitem*>*)contentItems { // lazy getter, creates and returns the MPContentItem objects } - (void)beginLoadingChildItemsAtIndexPath:(NSIndexPath*)indexPath completionHandler:(void (^)(NSError* __nullable))completionHandler { // protocol method, never gets called on ios 13 } - (BOOL)childItemsDisplayPlaybackProgressAtIndexPath:(NSIndexPath*)indexPath { // implemented } - (void)contentItemForIdentifier:(NSString*)identifier completionHandler:(void (^)(MPContentItem* _Nullable, NSError* _Nullable))completionHandler { // implemented } - (NSInteger)numberOfChildItemsAtIndexPath:(NSIndexPath*)indexPath { // implemented } - (MPContentItem*)contentItemAtIndexPath:(NSIndexPath*)indexPath { // implemented } @end@implementation cp_delegate - (void)playableContentManager:(MPPlayableContentManager*)contentManager initiatePlaybackOfContentItemAtIndexPath:(NSIndexPath*)indexPath completionHandler:(void (^)(NSError* __nullable))completionHandler { // implemented, plus the following snippet: #if (TARGET_IPHONE_SIMULATOR) [UIApplication.sharedApplication endReceivingRemoteControlEvents]; [UIApplication.sharedApplication beginReceivingRemoteControlEvents]; #endif } @endFor completeness, my logs with the two simulators...--- For iOS 12.4: ---[I] -[CPMainController init]: [I] NowPlaying: { artist = "CPMainController"; artwork = "<MPMediaItemArtwork: 0x600000510140>"; title = Stopped; } [I] -[CPMainController dataSource]: [I] -[cp_data_source init]: [I] -[CPMainController delegate]: [I] -[cp_delegate init]: ...( now I open the car play external display in simulator: * the phone screen dims and shows that car play is active now. )... [I] -[cp_data_source beginLoadingChildItemsAtIndexPath:completionHandler:]: [I] -[cp_data_source setRadioStations:]: [I] -[cp_data_source childItemsDisplayPlaybackProgressAtIndexPath:]: [I] -[cp_data_source numberOfChildItemsAtIndexPath:]: [I] -[cp_data_source contentItemAtIndexPath:]: [I] -[cp_data_source tabItems]:--- For iOS 13: ---[I] -[CPMainController init]: [I] NowPlaying: { artist = "CPMainController"; artwork = "<MPMediaItemArtwork: 0x600002bb3160>"; title = Stopped; } [I] -[CPMainController dataSource]: [I] -[cp_data_source init]: [I] -[CPMainController delegate]: [I] -[cp_delegate init]: ...( now I open the car play external display in simulator: * the phone screen gets black (showing an activity indicator) for a second and then again shows my app's main screen * nothing else happens )...Thank you in advance!
Posted
by Anticro.
Last updated
.