Questions tagged [ios16]
Use for questions specific to Apple's iOS 16 mobile operating system for iPhone and iPad, released in 2022. General iOS questions should use the [ios] tag.
469
questions
68
votes
2
answers
39k
views
In Xcode 14 & iOS 16 purple warnings starting with 'This method should not be called on the main thread as it may lead to UI unresponsiveness.'
When loading the URL in WKWebView, it leads to a security warning and later app gets crashes.
Warning in UIApplicationMain -
This method should not be called on the main thread as it may lead to UI ...
44
votes
8
answers
11k
views
SKStoreProductViewController crashes for unrecognized selector named sceneDisconnected: in iOS 15.6 beta5
In iOS 15.6 beta5 and iOS 16.0 beta:
When an UISceneDidDisconnectNotification was posted, any active SKStoreProductViewController instance would crash for the unrecognized selector named ...
37
votes
10
answers
43k
views
Xcode 14 beta error: Stored properties cannot be marked potentially unavailable with '@available'
I get this error when I run my app on Xcode 14 beta and I don't know how to fix it:
Stored properties cannot be marked potentially unavailable with '@available'
It doesn't pop up when I run Xcode 13,...
37
votes
6
answers
35k
views
Main thread warning with CLLocationManager.locationServicesEnabled()
I just upgraded to Xcode 14.0 and when I run our app on iOS 16 devices, calls to:
CLLocationManager.locationServicesEnabled()
Are returning the warning:
This method can cause UI unresponsiveness if ...
33
votes
1
answer
3k
views
Could not get trait set for device iPad14,3 with version 16.1
Ever since I started using Xcode 14.1, I've been seeing this warning with my asset files
Could not get trait set for device iPad14,3 with version 16.1
I've checked the build log file and It doesn't ...
31
votes
2
answers
3k
views
LockScreen widget in Flutter?
There are some plugins like home_widget: ^0.1.6 that supports only HomeScreen Widgets.
Recently Apple launched LockScreen Widgets on iOS 16.
Is there any plugin for that? How do I implement that?
30
votes
1
answer
5k
views
SwiftUI 4 List initializer not available in iOS
When creating a list, previous versions of Xcode allowed for the following on iOS:
List(tabs, selection: $lastTab) {tab in
…
}
This now gives an error:
'init(_:selection:rowContent:)' is unavailable ...
29
votes
4
answers
17k
views
iOS 16 SwiftUI List Background
With the new SwiftUI update in iOS 16 List no longer depends on UITableView. So the following snippet we used to set the List background color to .clear is now useless:
UITableView.appearance()....
25
votes
2
answers
6k
views
Why doesn't clearing the new iOS 16 SwiftUI NavigationPath to "pop to root" animate smoothly back to the root view?
I have a new iOS 16 SwiftUI NavigationStack with navigation determined by the NavigationDestination modifier which works fine.
My question is why doesn't it animate smoothly by sliding back to the ...
23
votes
8
answers
19k
views
is Force View Controller Orientation working in iOS 16 beta
According to the iOS & iPadOS 16 Beta 3 Release Notes:- Attempting to set an orientation on UIDevice via setValue:forKey: isn’t supported and no longer works. Instead, they say use: ...
22
votes
1
answer
14k
views
'init(destination:isActive:label:)' was deprecated in iOS 16.0: use NavigationLink(value:label:) inside a NavigationStack or NavigationSplitView
I have tried different iterations of examples posted on this site but nothing is going right.
I have also tried following the examples listed here:
Navigation to new navigation types:
I am getting the ...
21
votes
5
answers
6k
views
How to remove section header top padding in SwiftUI Plain List with iOS16
When we use SwiftUI List component and need a section header, top padding will appear on the header of each section.
Under iOS15, we use UITableView.appearance().sectionHeaderTopPadding = 0 to solve ...
20
votes
2
answers
6k
views
iOS 16 CTCarrier deprecation
For iOS 16, CTCarrier looks to have been deprecated.
https://developer.apple.com/documentation/coretelephony/ctcarrier
What will be the correct way, going forward, to receive information regarding ...
17
votes
4
answers
10k
views
How do you fix Xcode 14 warning: NavigationLink presenting a value must appear inside a NavigationContent-based NavigationView. Link will be disabled
Since installing Xcode 14, I am now getting the following error message printed in my console:
NavigationLink presenting a value must appear inside a
NavigationContent-based NavigationView. Link will ...
15
votes
5
answers
16k
views
iOS 16 Scene orientation issue
I always received this error when I tried to allowed only portrait orientation on my controller:
Error Domain=UISceneErrorDomain Code=101 "None of the requested orientations are supported by the ...
14
votes
4
answers
2k
views
iOS 16 keyboard safe area not updated on push
There's a strange keyboard issue on iOS 16, when pushing new screens. It seems the keyboard safe area is not updated when you come back from the pushed screen.
It's even reproducible with this chunk ...
12
votes
5
answers
11k
views
iOS 16 Simulator: Running an app in the simulator results in a ".xpc error"
After updating to macOS 13.0 Beta and installing Xcode 14.0 Beta we run an app where we set the target OS to 16. The following error occurs:
The iPhones simulators won't start either when started ...
12
votes
2
answers
2k
views
How to remove "search web" option for selected text iOS 16 xcode14 beta
I'm having trouble removing this tick when text is selected, I've tried this:
class CustomUITextField: UITextField {
open override func canPerformAction(_ action: Selector, withSender sender: Any?) ...
11
votes
1
answer
2k
views
iOS16 Bug Keyboard breaks layout on sheet dismissal SwiftUI
In iOS16 faced a bug with keyboard inside sheet, when sheet is dismissing keyboard disappears(what is ok), but layout is not updated. I saw only 1 question on same problem and wondering maybe somebody ...
10
votes
2
answers
9k
views
Fixed range for y-axis in Swift Charts
I want that my y-axis always shows a range from 0-60 even though there are data sets that do not represent the full range.
E.g. if I'm showing a data set with values of just 10 and 40 the y-axis range ...
10
votes
5
answers
7k
views
How to implement Passkeys
I'm trying to learn more about Apple Passkeys. I use firebase as a backend and it seems like actually integrating it in my site is a hassle without having a custom backend…
Are there any solutions for ...
10
votes
1
answer
3k
views
SwiftUI Plain List How to remove top header padding in iOS16
I'm looking for a way to remove top section padding in my SwiftUI List
With iOS 15, we can do UITableView.appearance().sectionHeaderTopPadding = 0
However, with iOS 16, List has been reimplemented ...
9
votes
2
answers
21k
views
Xcode - physical iOS - unsupported OS version (iOS 16) (cannot launch on real device)
After updating OS version on my iPhone to iOS 16, I got message in Xcode telling that the version install on the physical device is unsupported, hence I cannot launch the app on that device :(
9
votes
4
answers
2k
views
Incomplete Swipe-back gesture causes NavigationPath mismanagement
I am looking for solutions to the following bug in my example code below. I have tried to implement the Navigator Pattern with SwiftUI 4 and the iOS 16.0 Navigation API changeset.
The example below ...
9
votes
4
answers
2k
views
Swift / iOS 16 Empty SwiftUI List Background Color
My app is built in SwiftUI and mostly works as is with iOS 16 apart from a couple of design quirks which I'm currently working on a fix for.
One of the quirks is the background colours of lists. ...
9
votes
4
answers
3k
views
Implemented iOS AppIntents don't show in Shortcuts
I'm trying to test out the new AppIntents API that is currently on iOS16 Beta. Looking at the documentation, the implementation seems pretty straight forward, but after implementing it, I'm not seeing ...
9
votes
5
answers
8k
views
iOS16+ Present UIViewController in landscape only for single screen not working [Swift 5.7]
Before iOS 16 presenting a single screen in landscape is fine for portrait application. The working code is as below.
Remark: Whole application is in Portrait mode only.
override public var ...
9
votes
3
answers
2k
views
DatePicker with graphical style breaks layout constraints on iOS 16.0
The following code breaks the layout constraints when running on Xcode-14.0.0-Beta 5 with iOS 16.0
struct ContentView: View {
@State var date = Date()
var body: some View {
...
9
votes
1
answer
2k
views
Apple/iPhone/iOS Development Distribution Developer Mode required since iOS 16
I have developed (and used) an iOS App for years now which I do not want to publish to the App Store. Until iOS 16 everything was fine with development/distribution, I think that I needed to release a ...
9
votes
2
answers
789
views
Vision scan not recognising GS1 barcode special character on iOS16
We are using the Vision library to scan a GS1 barcode.
The library does not recognize the special character "GS" in the iOS 16 versions.
"GS" --> Group Separator character (...
9
votes
2
answers
5k
views
iOS 16 Beta 5 AVAudioSession setCategory produces strange error 'what'
After recently installing iOS 16 beta 5, we are experiencing an issue with try AVAudioSession.sharedInstance().setCategory(<category>, options: .mixWithOthers), in which we get an error, and ...
9
votes
0
answers
1k
views
SwiftUI iOS 16 NavigationPath inside TabView Warning: NavigationAuthority
I have a TabView and each Tab has it's own NavigationPath which I am handling inside an ObservableObject.
@MainActor final class Router: ObservableObject {
@Published var homeNavigationPath = ...
9
votes
0
answers
1k
views
Why does the navigation title display mode change from large to inline when popped in iOS 16?
When I pop from a pushed view that has a display mode of inline the display mode of the parent view which was originally large is changed to inline and the user has to scroll down for the title to ...
9
votes
1
answer
2k
views
How to recreate the iOS 16 Lock Screen Widget Vibrant effect in SwiftUI 4.0?
I am looking for a way to reproduce the "Vibrant" iOS 16 effect that occurs on Lock Screen Widget on iOS 16 because my app should be able to display a preview of the widget while the user is ...
8
votes
3
answers
8k
views
Toolbar bottom iOS 16 - SwiftUI
I would like to have a bottom toolbar with SwiftUI.
The following is working in iOS 15, but not in iOS 16.
In iOS 16 the toolbar is not showing. (It's working if I change the placement...)
Text("...
8
votes
2
answers
739
views
TextField(_:text:axis:) breaks keyboard avoidance inside ScrollView in iOS 16
Automatic keyboard avoidance seems to work fine if it's a regular TextField (i.e. one that doesn't expand on an axis), whether or not it is contained in a ScrollView
Keyboard avoidance also seems to ...
8
votes
4
answers
988
views
Nested ScrollView in a List + refreshable strange behaviour in iOS 16
In my SwiftUI app I've a List with nested ScrollView, since I've updated my iPhone to iOS 16 the refresh on the main List has a strange behavior.
It seems that every ScrollView has their own refresh. ...
8
votes
0
answers
299
views
NavigationTitle delay on iOS 16.1 when using NavigationSplitView
Is anyone else facing this issue with iOS 16.1 NavigationSplitView where the NavigationTitle loads after the view is loaded? – works fine on iOS 16.0. (https://i.stack.imgur.com/G0IUG.gif)
It's ...
8
votes
0
answers
3k
views
Hide navigation bar in iOS16 + xcode 14 beta not working
We use Firebase's Crashlytics and in the last 2 days we've seen a spike in crashes with navigationController?.setNavigationBarHidden on iOS 16 devices. I was able to reproduce the crash after ...
7
votes
2
answers
15k
views
SwiftUI NavigationView vs NavigationStack for iOS 15/16
I'm trying to make my iPhone apps (targeting iOS 15 and above) fully compatible with iOS 16 without success!
I don't know how to have NavigationView for iOS 15 and NavigationStack for iOS 16 in the ...
7
votes
1
answer
7k
views
How to get an iPad's device name on iOS16?
UIDevice.current.name it's worked if used iOS15, but when I tested on iOS16 (beta3)
still return 'iPad' name all the time.
See related WWDC 2022 video file
https://developer.apple.com/videos/play/...
7
votes
2
answers
4k
views
ITMS-90338: Non-public API usage PROCESSING ERROR - Previously Working
Upon uploading a binary to App Store Connect, I receive this email from Apple:
ITMS-90338: Non-public API usage - The app references non-public selectors in [PROJECT NAME HERE]: callWithArguments:, ...
7
votes
2
answers
2k
views
Safari in iOS 16 autofocusing form elements
I noticed that Safari in new iOS 16.0 autofocuses an input element if:
type=number or text
pattern=\d*
margin-top on containing element is 48px (I did not test the precise cut-off value here)
Test ...
7
votes
1
answer
1k
views
Extract App Intents Metadata - very slow build step
The app intents extraction from the new AppIntents framework takes a lot of time, even when changes in code don't touch the intents directly.
In the build log reasons for this step to happen differ, ...
7
votes
2
answers
2k
views
How to localize title and description? (LocalizedStringResource)
I am working on my SwiftUI project and added some AppIntents for the Shortcuts app. Currently I am not able to localize the title and description. The title and the description are of type ...
7
votes
3
answers
530
views
SwiftUI AppIntents iOS16: How to localize Summary?
Im trying to localize the Summary of my new SwiftUI AppIntent on my Swift project for making new Shortcuts.
I am not able to localize the Summary.
I have created a AppShortcuts.strings with Localize ...
7
votes
0
answers
500
views
primary action of menu in ios 16 not working
Does anyone know why the primary action of Menus in SwiftUI is not working since iOS 16 beta?
Menu {
Button {
print("action 1")
} label: {
Text("...
7
votes
4
answers
922
views
How to get rid of "Highlight" context menu item in PDFView?
I'm using PDFKit to render a PDF and I have added custom menus using "UIMenuController". But it is now deprecated from iOS 16 onwards.
I remove share、lookup menu items with code below:
@...
6
votes
1
answer
916
views
How to return UISearchController under a title on an iPad with iOS 16?
On iPad with iOS 16 searchController displaying on the right side. Like this:
How can I return the searchController's "default" view? Like this:
6
votes
1
answer
2k
views
Transition animation not working in iOS16 but was working in iOS15
I have a SwiftUI Form with a custom chart view (not Swift Charts). A long press toggles to a different type of chart. These charts use the .transition(.slide) modifier. In iOS 15 these transitioned as ...