iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

UITabBarController render glitch since iOS18 beta 1 & 2 when activating tabs.
We have a UITabBarController in our iPhone App which has 5 tabs with UITableViewControllers (constructed from the storyboard). Before iOS18 beta 1 (and 2) this was working fine without any problems (objective-C). Since iOS18 beta 1 (and beta 2 still has this problem) a strange render glitch occurs when activating a tab from the tab bar at the bottom. As soon as a tab is activated (by tapping on the icon at the bottom) the tab with the UITableViewController becomes visible and draws its content starting at the very top of the screen (pos 0,0) right through/over the Navigation bar which at that point is showing a title and a rightBarButtonItem. The tab with the UITableViewController seems not aware there is a navigation bar visible. Then after ~0.3 seconds the tab with the UITableViewContoller is automatically rendered again or moved down and now its content starts below the UINavigationBar as expected, this is 100% reproducible and occurs on every activation of a tab in the UITabBarController. Is anyone else also getting this behavior in their App since iOS18? I'm aware that UITabBarController is being renewed but I can't find any information on why this behavior might occur. I was hoping beta 2 would solve the problem but it doesn't. Constructing the UITabBarController in the code with the new UITab objects (instead of constructing them from the storyboard) also shows this problem.
3
0
276
3w
App Transport Security (ATS) blocking https request to valid server, only in production build testflight
Hi, We are developing react native app, and we are having issue with ATS policy in production build distributed to TestFlight internal testing, requests to https are being killed. The preview build ad-hoc distribution is working fine. (I am testing the app on physical device) I will described what I've tried and supply you with logs from different tools. I tried to disable ATS - requests are working enable ATS (no change to default config) - requests are failing with following error Task <55618987-64A8-4C04-9B00-2EFF074D796C>.<1> finished with error [-1022] Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSLocalizedDescription=The resource could not be loaded because the App Transport Security policy requires the use of a secure connection., NSErrorFailingURLStringKey=<private>, NSErrorFailingURLKey=<private>, _NSURLErrorRelatedURLSessionTaskErrorKey=<private>, _NSURLErrorFailingURLSessionTaskErrorKey=<private>, NSUnderlyingError=0x30127bb10 {Error Domain=kCFErrorDomainCFNetwork Code=-1022}} I tried to check server if it had met ATS requirements and ran ats-diagnostic ./TLSTool s_client -connect api.rankacy.com:443 * input stream did open * output stream did open * output stream has space * protocol: TLS 1.2 * cipher: ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 * trust result: unspecified * certificate info: * 0 + ecPublicKey 256 ecdsa-with-SHA384 'api.rankacy.com' * 1 + ecPublicKey 384 sha256-with-rsa-signature 'E6' * 2 + rsaEncryption 4096 sha256-with-rsa-signature 'ISRG Root X1' nscurl https://api.rankacy.com/ --verbose --ats-diagnostics Starting ATS Diagnostics Configuring ATS Info.plist keys and displaying the result of HTTPS loads to https://api.rankacy.com/. A test will "PASS" if URLSession:task:didCompleteWithError: returns a nil error. ================================================================================ Default ATS Secure Connection --- ATS Default Connection ATS Dictionary: { } Result : PASS --- ================================================================================ Allowing Arbitrary Loads --- Allow All Loads ATS Dictionary: { NSAllowsArbitraryLoads = true; } Result : PASS --- ================================================================================ Configuring TLS exceptions for api.rankacy.com --- TLSv1.3 ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionMinimumTLSVersion = "TLSv1.3"; }; }; } Result : PASS --- --- TLSv1.2 ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionMinimumTLSVersion = "TLSv1.2"; }; }; } Result : PASS --- --- TLSv1.1 ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionMinimumTLSVersion = "TLSv1.1"; }; }; } Result : PASS --- --- TLSv1.0 ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionMinimumTLSVersion = "TLSv1.0"; }; }; } Result : PASS --- ================================================================================ Configuring PFS exceptions for api.rankacy.com --- Disabling Perfect Forward Secrecy ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- ================================================================================ Configuring PFS exceptions and allowing insecure HTTP for api.rankacy.com --- Disabling Perfect Forward Secrecy and Allowing Insecure HTTP ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionAllowsInsecureHTTPLoads = true; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- ================================================================================ Configuring TLS exceptions with PFS disabled for api.rankacy.com --- TLSv1.3 with PFS disabled ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionMinimumTLSVersion = "TLSv1.3"; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- --- TLSv1.2 with PFS disabled ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionMinimumTLSVersion = "TLSv1.2"; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- --- TLSv1.1 with PFS disabled ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionMinimumTLSVersion = "TLSv1.1"; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- --- TLSv1.0 with PFS disabled ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionMinimumTLSVersion = "TLSv1.0"; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- ================================================================================ Configuring TLS exceptions with PFS disabled and insecure HTTP allowed for api.rankacy.com --- TLSv1.3 with PFS disabled and insecure HTTP allowed ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionAllowsInsecureHTTPLoads = true; NSExceptionMinimumTLSVersion = "TLSv1.3"; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- --- TLSv1.2 with PFS disabled and insecure HTTP allowed ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionAllowsInsecureHTTPLoads = true; NSExceptionMinimumTLSVersion = "TLSv1.2"; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- --- TLSv1.1 with PFS disabled and insecure HTTP allowed ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionAllowsInsecureHTTPLoads = true; NSExceptionMinimumTLSVersion = "TLSv1.1"; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- --- TLSv1.0 with PFS disabled and insecure HTTP allowed ATS Dictionary: { NSExceptionDomains = { "api.rankacy.com" = { NSExceptionAllowsInsecureHTTPLoads = true; NSExceptionMinimumTLSVersion = "TLSv1.0"; NSExceptionRequiresForwardSecrecy = false; }; }; } Result : PASS --- I am running out of ideas. Also it's hard to test because the preview ad-hoc build is working fine. So only after submitting the app to TestFlight I am having this issue Looking for your response Martin
3
0
230
2w
SwiftUI, REST, and websockets
I'm coming back to iOS development after years away and diving head-first into SwiftUI. It's a lot of fun, but I've hit a brick wall. The scenario is I have a main view (which itself is a tabview, not important other than that it's not the top-level of the view hierarchy). This has subviews that rely on data coming back from a REST call to the cloud, but then some subviews need to turn around and make subsequent network calls to set up websockets for realtime updates. In the main view's .onAppear, I fire off an async REST call, it returns JSON that gets parsed into a ModelView. The ViewModel is declared in the top view like this: class ViewModel: ObservableObject { @Published var appData = CurrentREST() // Codables from JSON @State var dataIsLoaded : Bool = false func fetchData() async { await _ = WebService().downloadData(fromURL: "current") { currentData in DispatchQueue.main.async { self.appData = currentData self.dataIsLoaded = true } } } } The main view declares the model view: struct HomeTabView: View { @ObservedObject var viewModel = ViewModel() @Binding private var dataReceived: Bool ... } In the toplevel view, the REST call is triggered like this: .onAppear { if !viewModel.dataIsLoaded { Task { await viewModel.fetchData() DispatchQueue.main.async { self.dataReceived = true } } } } The viewModel gets passed down to subviews so they can update themselves with the returned data. That part all works fine. But it's the next step that break down. A subview needs to go back to the server and set up subscriptions to websockets, so it can do realtime updates from then on. It's this second step that is failing. The dataReceived binding is set to true when the REST call has completed. The viewModel and dataReceived flags are passed down to the subviews: SummaryView(viewModel: viewModel, dataIsLoaded: self.dataReceived) What needs to happen next is inside the subview to call a function to wire up the next websocket steps. I've tried setting up: struct SummaryView: View { @ObservedObject var viewModel: ViewModel @State var dataIsLoaded: Bool = false ... }.onChange(of: dataIsLoaded) { setupWebSocket() } Problem is, the onChange never gets called. I've tried various permutations of setting up a @State and a @Binding on the view model, and a separate @State on the main view. None of them get called and the subview's function that wires up the websockets never gets called. The basic question is: How do you trigger a cascading series of events through SwiftUI so external events (a network call) can cascade down to subviews and from there, their own series of events to do certain things. I haven't gone deep into Combine yet, so if that's the solution, I'll go there. But I thought I'd ask and see if there was a simpler solution. Any suggestions or pointers to best practices/code are most appreciated.
3
0
229
3w
State Restoration: Deleting current state data
In the past, it seemed that if you used the app switcher and killed the app, that state restoration data would not persist, and starting the app again would not load any stored state data. But now (at lest in iOS 17) that is no longer the case. There are situations where the old state might cause issues, which we obviously need to fix, but users should be able to clear the state data. I am not using sessions and am using the older methods - application:shouldSaveApplicationState: and application:shouldRestoreApplicationState:. My question is, how can I tell my users to reset/clear state restoration data if needed?
0
0
156
3w
Maximum Number of Bluetooth Pairings (not connections)
Hello, Our app is going to be used in an industrial setting where users will connect to many devices a day via Bluetooth to complete an installation process. They will only connect to one device at a time, so connection limit isn't an issue. What we're wondering about is the limit on number of pairings (found in Settings > Bluetooth > MY DEVICES). This is important because pairings can't be removed programatically. I seem to remember reading somewhere the limit was ~30 devices, but I can't find that document anymore. Does anyone know if this limit is correct, or where I could find a document regarding this?
1
0
209
3w
Disable iOS Screen Mirroring for Apps
Hello Apple, I am concerned about the new iOS Screen Mirroring that is available on iOS. I have an app that is only meant to be viewed on iPhones (not Macs or Computers, due to security reasons. I am assuming that Screen Mirroring is using AirPlay underneath, otherwise is there an API being planned or coming that can disable this functionality or is there a way for my app to opt out out of iOS Screen Mirroring? Thanks.
1
0
336
3w
iPhone 11PM Bricked Overnight While Running iOS 18 Beta
So I left the phone on the counter overnight at around 50% and I didn't plug it in. The next day, the phone was dead and completely unresponsive to anything. I've already had this issue once, but without beta, and I managed to solve it by a hard reset. This time, however, the phone is completely bricked; I can't enter recovery mode, DFU mode, reset, charge, nothing. I suspect something broke when the phone was trying to update to the next beta overnight. I don't really know what to do. I want to get the phone working and off the beta, but I can't because nothing works right now.
2
0
379
3w
IOS 18 Bata
I downloaded the iOS 18 and my iPhone 15 pro max has just been unusable. My dial pad keeps crashing my cameras don’t work, my iphone is overheating to the point my phone won’t charge, I’m not getting calls text nothing. I wish I never downloaded this Bata because now I’m forced to get a new phone and I’m sorry after this I willl NOT be getting any more iPhones!
0
0
170
3w
iOS18 beta2: NavigationStack, Views Being Popped Automatically
This is a report of an issue that appears to be a regression regarding NavigationStack. I have been aware of an issue where views are being automatically popped within NavigationView / NavigationStack since iOS 15, and it seems to be reoccurring in iOS 18.0 beta2. Below is the reproducible code. Additionally, in my environment, this problem does not occur iOS 18 simulator, but it does happen on an iPhone XS Max(real device) with iOS 18 beta 2. Environment: Xcode: Version 16.0 beta (16A5171c) iOS: 18.0 (22A5297f) iPhone: XS Max (real device) import SwiftUI @main struct iOS16_4NavigationSample2App: App { var body: some Scene { WindowGroup { NavigationStack { NavigationLink { ContentView() } label: { Text("Content") } } } } } enum Kind { case none, a, b, c } struct Value: Hashable, Identifiable { let id: UUID = UUID() var num: Int } @MainActor class ContentModel: ObservableObject { @Published var kind: Kind = .a @Published var vals: [Value] = { return (1...5).map { Value(num: $0) } }() init() {} } struct ContentView: View { @StateObject private var model = ContentModel() @State private var selectedData: Value? @State private var isShowingSubView = false @Environment(\.dismiss) private var dismiss init() { } var body: some View { if #available(iOS 16.0, *) { List(selection: $selectedData) { ForEach(model.vals) { val in NavigationLink(value: val) { Text("\(val.num)") } } } .navigationDestination(isPresented: .init(get: { selectedData != nil }, set: { newValue in if !newValue && selectedData != nil { selectedData = nil } }), destination: { SubView(kind: model.kind) }) } } } struct SubView: View { init(kind: Kind) { print("init(kind:)") } init() { print("init") } var body: some View { Text("Content") } } This code was shared in a different issue [iOS 16.4 NavigationStack Behavior Unstable].
8
1
406
2w
phone crashes, panics, and shuts down entirely after 5 minutes of use
i got the iOS 18 dev beta around a week ago (big mistake) and everything was good for a week, before it started acting up. it starts to lag immensely, then it crashes from whatever app it's currently using, panics, and then shuts down my phone. it's been going on for around a week, and i've tried everything. hard/forced reset (did the trick, now it doesn't.) tried connecting to itunes (doesn't recognise the device, either cause the cable is bad, or the version's bugged.) tried connecting to apple devices (same reason as the previous.) recovery mode (STILL doesn't recognise the device.) i'm going on a trip to norway in 2 days, so getting my phone fixed is essential. i do recall having a backup with iOS 17, yet i don't know if i can back up versions from 1-2 weeks ago. i might book a reservation at a genius bar to see what's going on. i'm on an iphone se (3rd gen), and have been using it for about 1 and a half years. this issue is most likely due to the iOS beta, and i don't have a clue on what else might be affecting this. can someone help me out here? it would be greatly, GREATLY appreciated.
0
0
141
3w
Can an automaker app and a Carplay app (when automaker is not possible) live in the same App?
Hi, I'm trying to investigate if there is any way to have an app that displays an automaker app when the Carplay environment has the automaker protocol string, and displays a Carplay App (Driving Task) when there isn't the automaker protocol string. I was able to start developing an automaker app, but with an iOS16.0 deprecated method (with UIScreen Notifications), I'm not able to do it via the scene delegate... There is any kind of documentation of how to do it? I think the clue may be in the scene delegate with the property Preferred Default Scene Session Role, where I think the automaker app is a Window Application Session Role, but the scene delegate is not triggered when I open the Carplay App in the simulator. So am I missing something? Is there a way to do it or have I to publish two apps in order to use the two kind of carplay apps... ? Thank you very much.
1
0
192
3w
API requests being blocked by ITP
We develop an SDK that requires sharing a device-specific identifier with our web API, in order to guarantee that certain artifacts are only used on the correct device. For the device-specific identifier, we use UIDevice.currentDevice.identifierForVendor which should not be restricted under ATT. In production, many developers are getting back to us with complaints of web requests being blocked: nw_endpoint_handler_path_change [C1 [our url]:443 waiting parent-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, uses wifi)] blocked tracker Connection 1: received failure notification Connection 1: failed to connect 1:50, reason -1 Connection 1: encountered error(1:50) Task <FA03088C-DDFC-437E-A06F-E05CC930E3E0>.<1> HTTP load failed, 0/0 bytes (error code: -1009 [1:50]) Task <FA03088C-DDFC-437E-A06F-E05CC930E3E0>.<1> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x3031118f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 "(null)" UserInfo={_NSURLErrorBlockedTrackerFailureKey=true, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=50, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, uses wifi}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <FA03088C-DDFC-437E-A06F-E05CC930E3E0>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <FA03088C-DDFC-437E-A06F-E05CC930E3E0>.<1>" ), NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=..., NSErrorFailingURLKey=..., _kCFStreamErrorDomainKey=1} Interestingly, I've made a few observations: The blacklist seems to be persistent, across devices. The blacklist stays in place regardless of whether we send no identifiable data in the web request (in fact, an empty ping request to our URL still gets blocked) The only way to get past the block is to use ATT, and request from the user that we track them across websites. This is false, because we don't track any user data whatsoever; and iOS disables ATT by default (in the settings app, users have to opt-in). Our iOS SDK already has an xcprivacy manifest mentioning the fact that we use a device-specific identifier, and that we send it to our web API URL. Still, we get blocked. How can we fix this? We can standup a proxy URL but I'd imagine it's only a matter of time before that also gets blocked. Apple has not provided any guidance on the specifics of how domains get blocked, and how they can be unblocked.
1
3
274
3w
UI Binding Issue with Consecutive Modal Prompts on Latest iOS Versions
Hi team, Currently, I am using two Modal prompts consecutively to display force update popups based on a condition. However, there's an issue where the UI thread is occasionally not binding properly after dismissing the first prompt. Please ensure that after dismissing the first prompt, the second prompt is not bound. After reviewing everything, I understand this is an iOS core library binding issue and it's occurring from the latest iOS version onwards. Could you please provide me with a solution to resolve this issue? Thank you!
0
1
219
4w
Request for clarification of Developer mode
Hi Guys, I want to support my client for enable the developer mode, But they not accept to connect with any other devices(Mac Xcode) to enable developer mode. They are nearly 10 people to enable developer mode. But I think without mac we can't enable developer mode in some of devices. So I need a clarification with IOS versions. That's only we are excepting to list out which IOS versions don't have developer mode option default. Please list out that IOS versions Like below: default developer mode available IOS 17.4.1 default developer mode not available IOS 17.5.1
1
0
171
1w