Post

Replies

Boosts

Views

Activity

iOS 26 Beta 9 dark/light behaviour over custom UIViews in UITabBarController and CPMapTemplate
I have an app where the user can choose if the dark / light mode is enabled automatically during the night / day (dusk and dawn times are calculated according to to the date and location of the user). I also have an UITabBarController, with two tabs which have a GMSMapView (Google Map View from their SDK), and three tabs with UITableViews. I have noticed that when the automatic change of dark / light mode is performed from dark to light mode, and the user is in a tab with GMSMapView, the tabBar does not change to light model, it remains in dark mode. I perform the switch by setting the self.window.overrideUserInterfaceStyle of the UIWindow of the UIScene. All the views change to light mode, including the navigation bar, but not the tab bar. If I move between the tabs with GMSMapView, the tabBar stays in dark mode. As soon as I move to a tab which contains a UITableView, the tabBar switches to light mode. If the switch to light mode is performed while the user is in tab with the UITableViews, the tabBar switches to light mode immediately, as expected. When moving to the tabs with the GMSMapViews, the tabBar stays in light mode, also as expected. I have also noticed the same problem in CarPlay, in CPMapTemplate (with a UIViewController whose view is GMSMapView), in the buttons with are set with the property “mapButtons”, and with the panning buttons. When the switch from dark mode to light mode is performed by setting the self.window.overrideUserInterfaceStyle of the UIWindow of CarPlay scene, the mapButtons keeps the glyphs in white, and set the background of the buttons to almost white, so the glyphs are barely visible unless you put png images on them instead of SF Symbols. With the panning buttons there is not workaround, since you cannot set custom images for the panning buttons. This happens even if the panning buttons are not being displayed when the switch is performed to light mode, and you enable them later. Is this a bug? Why does this only happen with view over GMSMapView (Google Maps view for a map from their SDK)? Can you think of any viable workaround? Thank you.
2
0
142
1d
AVAudioSessionCategoryOptionAllowBluetooth incorrectly marked as deprecated in iOS 8 in iOS 26 beta 5
AVAudioSessionCategoryOptionAllowBluetooth is marked as deprecated in iOS 8 in iOS 26 beta 5 when this option was not deprecated in iOS 18.6. I think this is a mistake and the deprecation is in iOS 26. Am I right? It seems that the substitute for this option is "AVAudioSessionCategoryOptionAllowBluetoothHFP". The documentation does not make clear if the behaviour is exactly the same or if any difference should be expected... Has anyone used this option in iOS 26? Should I expect any difference with the current behaviour of "AVAudioSessionCategoryOptionAllowBluetooth"? Thank you.
2
0
187
2w
Request of CarPlay Navigation Entitlement when having the Driving Task one
I have the CarPlay Entitlement "Driving Task" and two of my apps use it. Now, in both apps, I have implemented Navigation. I requested the Navigation CarPlay Entitlement when the feature was mature and builds were available in Test Flight, since I wanted to release the new versions of the apps with navigation available both on the iPhone and in CarPlay. I got no answer to my request, so I decided to release the apps with only navigation in the iPhone and the Driving Task functionality in CarPlay, thinking that maybe being live with navigation in the App Store was a requirement. I have asked permission again, and so far, the request is being ignored again. What are the requirements to get the Navigation CarPlay Entitlement? If the app is approved for navigation, is there something else the app must do to get the entitlement? Requirements for CarPlay Entitlements seem quite obscure, are they listed anywhere? Is there a technical problem to move from an existing CarPlay Entitlement to another? Can that be the reason the entitlement has not been granted? Some of my competitors have the CarPlay Navigation entitlement. My use case is the same (in a better app in my opinion, of course). But I am only getting bad reviews because "the app does not include the map in CarPlay" after the big investment in implementing navigation in the apps. Any help or insight would be appreciated.
2
0
772
Jul ’24
System pushing CPNowPlayingTemplate to Driving Task CarPlay app (crash)
Since iOS 17 is out I am getting crashes in my Driving Task CarPlay app. It is as if the System tried to push a CPNowPlayingTemplate to my app, and that template, according to the documentation, is not allowed for a Driving Task CarPlay app. I get the following error: Fatal Exception: NSInvalidArgumentException Unsupported object <CPNowPlayingTemplate: 0x283944c60> <identifier: 3195B357-D184-41BF-91CA-399C5810A8EA, userInfo: (null), tabTitle: (null), tabImage: (null), showsTabBadge: 0> passed to pushTemplate:animated:completion:. Allowed classes: {( CPInformationTemplate, CPListTemplate, CPAlertTemplate, CPActionSheetTemplate, CPTabBarTemplate, CPGridTemplate, CPPointOfInterestTemplate )} My app, from time to time, plays some sounds to warn the driver about issues in the road. Maybe that can trigger (in which cases?) the now playing template to be pushed to my app. Is this an iOS 17 bug? Is there a way to work around it? Thank you.
1
0
706
Nov ’23
Turn by turn navigation with MapKit and CarPlay
I am thinking about adding turn by turn navigation to some of my apps by using a combination of all the functionality MapKit offers. I know it wouldn't be as good as Apple Maps, but navigation with the functionality the apps already offer would be really good. The questions are: Can MapKit be used to implement turn by turn navigation? I haven't found anything in the documentation against it. Can MapKit be used to provide turn by turn navigation in CarPlay? I haven't found anything in the docs either, but I think I remember an old WWDC video where the presentar said you had to bring your own maps, they couldn't be from MapKit. This video I think it was from the first year CarPlay was released. Thank you.
0
1
759
Apr ’23
AVAudioSession: AVAudioSessionCategoryOptionDefaultToSpeaker option not working in background
In AVAudioSession, I am using the option "AVAudioSessionCategoryOptionDefaultToSpeaker" with the category "AVAudioSessionCategoryPlayAndRecord", as the documentation says. In iOS 15 and before, it worked when the app in foreground and in background In iOS 16, it works in foreground, but when the app is in background, the sound is sent to the receiver, not to de speaker, and I get this in the log: AVAudioSession_iOS.mm:2374  Failed to set category, error: '!int' Is this a bug or is it the intended behaviour? Is there any workaround or way to force the iPhone to send the sound to the speaker when the app is in background in iOS 16?
1
0
2.4k
Nov ’22
Notifications in Driving Task CarPlay app
I have an app with the "Driving Task" CarPlay entitlement. When I ask for permission for notifications in CarPlay (UNAuthorizationOptionCarPlay), and I check "carPlaySetting" in the UNNotificationSettings after granting permission, it get a value "UNNotificationSettingNotSupported" (the setting is not available to your app). Is this a bug? It feels like one. The app shows distances to some locations, and provides warnings to the user when approaching those locations. It is common for my users to use it at the same time they use a navigation app and switch between the two apps. But when they have the navigation app in foreground, they ask why my app is not showing notifications when giving an audio warning. The notifications are not even shown on the screen of the iPhone, the screen is turned off in iPhone 14 Pro when connecting to CarPlay, and the screen does not turn on when the app is in background in CarPlay and tries to show a notification.
3
1
2.1k
Nov ’22
AVAudioSession currentRoute.outputs not working in background in iOS 16
In my app, which gives voice prompts and sound warnings while driving, I test if the audio session is connected to CarPlay in order to use CarPlay settings for AVAudioSession by doing: BOOL found = NO; for (AVAudioSessionPortDescription * portDescr in [AVAudioSession sharedInstance].currentRoute.outputs) { if ([portDescr.portType isEqualToString:AVAudioSessionPortCarAudio]) found = YES; } This has worked for several years. But now, in iOS 16, when the app is in background, it won't detect that the iPhone is connected to CarPlay most of the times by using this method. Therefore, I will set up the audio session in a way which won't play any sound to the user. I have seen this happening in other apps such as Google Maps. So my guess is that something is not working in iOS 16 an AVAudioSession in background. Has anyone experienced this? Any workaround? I tried notifications to detect a change in a route, but sometimes I wouldn't get the notification if the app was in background when connecting to CarPlay. So this workaround didn't work either. Any ideas? Thank you.
1
0
1.9k
Sep ’22
Always on display not working with location updates
I have a watch app which is receiving location updates every second, so it is being executed in the background even if the wrist is down. I thought this would qualify the app to update the user interface every second, but it is not working. I set a breakpoint where the user interface is updated, and the code is being executed but I get no update in the user interface. I have tested this both in the simulator and in the device. Should this work with an app which gets locations updates? I thought it would make sense for an app like this. The app is written in objective-C if that makes it any different. Thank you.
2
0
1.5k
Sep ’21
NSUserActivity does not show up in Shortcuts app in iOS 14.3 (it works in iOS 14.2)
I have been using the following shortcut since iOS 12 with no issue. But in iOS 14.3 it has stopped showing up in the Shortcuts app. In iOS 14.2 it does show up. This can be tested with the simulator: NSString * title = NSLocalizedStringFromTableInBundle(@"Traffic status", nil, [LanguageModel sharedInstance].languageBundle, nil); NSString * activityType = [[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"] stringByAppendingString:kUserActivityTrafficMap]; NSUserActivity * userActivity = [[NSUserActivity alloc] initWithActivityType:activityType]; userActivity.eligibleForSearch = YES; userActivity.title = title; userActivity.eligibleForPrediction = YES; userActivity.suggestedInvocationPhrase = title; CSSearchableItemAttributeSet * attributeSet; if (@available(iOS 14, *)) attributeSet = [[CSSearchableItemAttributeSet alloc] initWithContentType:UTTypeItem]; else attributeSet = [[CSSearchableItemAttributeSet alloc] initWithItemContentType:(NSString *)kUTTypeItem]; attributeSet.thumbnailData = UIImagePNGRepresentation([UIImage imageNamed:@"UserActivityMapa"]); attributeSet.contentDescription = NSLocalizedStringFromTableInBundle(@"Shows the traffic around you", nil, [LanguageModel sharedInstance].languageBundle, nil); userActivity.contentAttributeSet = attributeSet; self.mapViewController.userActivity = userActivity; Is this a bug in iOS 14.3? Am I missing something? Thank you.
3
0
1.7k
Jan ’21