Posts

Post not yet marked as solved
39 Replies
27k Views
In Xcode 14 RC, I'm seeing this in the Console: [Assert] UINavigationBar decoded as unlocked for UINavigationController, or navigationBar delegate set up incorrectly. Inconsistent configuration may cause problems. navigationController=<MasterNavigationController: 0x135016200>, navigationBar=<UINavigationBar: 0x134f0aec0; frame = (0 20; 0 50); opaque = NO; autoresize = W; layer = <CALayer: 0x600000380be0>> delegate=0x135016200 The above message displays exactly four times immediately at app launch (top of the console) then does not repeat. MasterNavigationController is the internal class for the app's navigation controller. It is in a Storyboard, with very minimal ObjC code. I am not setting any specific size for the nav bar. I don't remember seeing this in earlier builds of Xcode, but I can't swear to it that this is new. No assertion actually fires.
Posted Last updated
.
Post not yet marked as solved
1 Replies
854 Views
I'm updating an app that already has ClassKit compatibility. The app makes a call at launch to get JSON from a server, then creates contexts from that JSON. That works fine. The downside is the app makes a the network call even if the iPad isn't on Apple School Manager - thus would never be able to save the contexts. We'd like to prevent making the network call unless we know the device has the capability to save contexts. What's the best way to do that?
Posted Last updated
.
Post marked as solved
1 Replies
788 Views
I'm adding a Widget to an existing iOS app. The Widget's intent definition allows the user to choose the preferred item in configuration. The provideItemOptionsCollection function in IntentsHandler.swift is not called, and I can't figure out why. I developed the extension inside a dummy app. It works as expected there. I copied the code and intents handler info to the real app. All looks good, other than the user cannot configure the widget. The user gets the No options were provided for this parameter alert when attempting to choose the item. I've confirmed I'm using the correct function signature, by copying it from Xcode's generated SelectionIntent.swift file. I added an os_log call as the first line in the function, and confirmed it does not appear in the console. I also added an os_log call to the same class's default (unchanged) handler, which does appear in console as expected. I'm experiencing the same issue on both the Simulator and a physical device. Xcode 12.4, iOS 14.4.
Posted Last updated
.
Post not yet marked as solved
0 Replies
512 Views
I'm working on a WidgetKit widget with two dynamic parameters. One of those parameters is limited to options allowed by the first. Let's say the first is the Captain, and the second is the Captain's Ship. Allowable configurations might be (ignoring canon): Captains: [Kirk, Picard, Crunch] Captain: Kirk, Ship: [Enterprise, Galileo] Captain: Picard, Ship: [Enterprise, Voyager, Cube] Captain: Crunch, Ship: [Sugar, Berry, Chocula] I have the logic working. For example, if the user selects Picard, then taps the Ship button, only Enterprise, Voyager, and Cube are available options. The user can then choose one of those ships (say, Cube) and all is good. However the Ship option doesn't change or reset when the Captain is changed. Let's say after the above setting, the user changes the Captain to Kirk. The Ship remains set to Cube. The user can exit the widget's configuration as if all is good, but that's an invalid configuration. What I'd like to happen: When the user changes the Captain, the Ship changes to the first of the available Ship options for that selected Captain. I'm also fine if the Ship blanks out (requiring a choice), or the UI forces a prompt of a Ship (confined by available options), or almost anything else that prevents an invalid combination. Is there a way to trigger a programmatic change to the second parameter based on the selection of the first? I do not want to present an "Invalid Combination" message in the runtime Widget. I suppose my backup is to choose a ship for the user if they've made an invalid selection, but that's not ideal. If it matters, the first parameter in the real Widget (the Captain in my example above) is truly dynamic (an array of strings provided via API). The second parameter (the Ship above) is a fixed set of three options, where any one, two, or all three could apply to any of the first parameter's selection. It is anticipated the user may create multiple Widgets with different configurations.
Posted Last updated
.
Post not yet marked as solved
1 Replies
522 Views
We have an iOS app with a large resouce size, not currently using On-Demand Resources. I'm investigating shrinking the app's initial bundle, and using On-Demand Resources to reduce the on-disk size of the app to what the user actually needs, which can usually be determined at time of the install. The app is used in an environment where the user would not have time to launch the app then wait for a lengthy resource download before using the app.The app is most frequently installed via MDM. Does anyone know if it's possible to push an instruction over MDM to download specific assets to the app, so the assets appropriate for the user are available at first launch?
Posted Last updated
.
Post not yet marked as solved
0 Replies
819 Views
I have a seemingly simple segue in a storyboard. The segue is only called on iPad, in a UISplitViewController. In the storyboard, the segue is configured to go from one UITableViewController to another, using the kind "Show Detail (e.g. Replace)". The code is also simple, called from didSelectRowAtIndexPath:[self performSegueWithIdentifier:@"classOverviewToStrugglingiPadSegue" sender:self];In iOS 12 and earlier, this worked as expected; the new UITableViewController replaced whatever was in the detail pane of the UISplitViewController.In iOS 13 (Xcode 11 beta 5), I get a crash on the performSegue line above:'UIViewControllerHierarchyInconsistency', reason: 'child view controller:&lt;my target ViewController:&gt; should have parent view controller:&lt;the root view controller&gt; but actual parent is:&lt;UINavigationController:&gt;'Other segues seem to operate ok.If I change the segue kind to "Replace" (in the Deprecated section), the segue then performs without a crash. There are a few differences, plus I'm not particularly keen on introducing a new deprecation.Any idea what's going on here?
Posted Last updated
.