iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts

Post

Replies

Boosts

Views

Activity

Could someone test if Settings in iOS 18.2 are broken ?
Apparently, settings do not show anymore the apps settings in iOS 18.2. I tested on simulators (Xcode 16.2) both on iOS 18.1 and iOS 18.2 and got very different results: In iOS 18.1 simulator, I see the settings of a lot of apps. In iOS 18.2 simulator, not a single app setting. That is a really serious issue in simulator for development (I filed a bug report FB16175635), but would be really critical on device as it would make it impossible to adjust setting of many apps. Unless I missed something (meta setting ?) in iOS 18.2 ? I have not upgraded to 18.2 notably for this reason. So I would appreciate if someone who has upgraded could make the test and report ? select Settings on Home page scroll to Apps category tap here to access the list Does the list show anything ? Thanks for your help.
1
1
1.1k
Jan ’25
Guidance on Integrating Meta Ads with Google AdMob Bidding Mediation and Testing Issues
Hello, I am currently working on integrating Meta Audience Network (Meta) with Google AdMob using bidding mediation for an iOS app. The goal is to show ads through meta , with AdMob acting as the mediation layer. I have successfully set up both the Meta SDK and Google AdMob SDK, as well as the GoogleMobileAdsMediationFacebook adapter. My AdMob and Meta accounts are both linked for mediation, and I have configured the correct placement IDs for Meta within AdMob. Currently i am creating a demo project with demo accounts i haven't added app live link as my app isn't on AppStore and haven't added any payment method. However, I am encountering a couple of issues and need some guidance: 1. Test Ads Work, but Real Ad Unit Fails: • When using test AdMob ad unit IDs, everything works fine, and ads are shown as expected. • But when I use my original AdMob ad unit ID, I get the error: “Publisher data not found.” • Does this mean my app is not fully set up or is there something else I might be missing in my configuration? • Is it necessary to go live on the App Store to get ads from the real ad unit, even for testing purposes? 2. Meta Ads via Bidding Mediation: • I have integrated Meta through AdMob’s bidding mediation system. But i am showing ads using GADBannerView is it right way to show meta ads that are mediated with google admob. If i have to show ads with FBAdView from where to get withBidPayload value for this function adView.loadAd(withBidPayload: "what_here") 3. Payment Method Requirements: • My app is still in the demo/testing phase and is not live on the App Store. I have not added any payment methods in either AdMob or Meta. • Is it necessary to add a payment method for testing purposes, or is this only required when I start monetizing and going live? I would appreciate any advice or pointers to ensure the setup is correct and to understand why the original ad unit ID isn’t working during testing. Thank you for your time and assistance!
0
0
512
Jan ’25
Assistance Needed: App Submission Issue (ITMS-90426)
Hello, We submitted our app on TestFlight, but received an automated response with the following error: ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it. Our app is developed entirely in Objective-C, and we’re unsure why it’s looking for SwiftSupport. Despite attempting several potential solutions, the error persists. Could someone please assist us with understanding why this is happening and advise on how to proceed with the submission? Any guidance would be greatly appreciated. Thank you for your help.
1
0
433
Jan ’25
Logging to the Mac's console is totally unreliable, especially with release builds
I've noticed issues with logging in the Mac's console app for a very long time now (from Xcode 15?) but have just spent several hours trying to objectively observe and monitor what's going on and try to set up reliable logging. But I've totally been unable to and my conclusion is that logging just absolutely cannot be relied upon at all, its so chronically bad as to be unusable. If I for example add some logging lines right at the start of didFinishLaunchingWithOptions() and use a variety of logging mechanisms NSLog(), print(),os_log_with_type(), OSLog() (AppDelegate is in Obj-C and calls Obj-C logging, then calls a swift function for Swift logging), then none of them are reliable. If the app is build/installed via Xcode then logging is reliable within Xcode's console and also within the Mac's console app. But then if the app is uploaded/installed via Testflight it's a very different matter. Sometimes, but not very often, the logging is as expected, but more often than not, some of it is missing. How much is missing seems totally random, sometimes its a little, sometimes its a lot, and something else that very very often happens is there's lots of duplicate logging, each logging line will appear 2 or three times. Here's a very simple example to illustrate what happens (in this example for simplicity I'm just showing using NSLog, don't focus on that as I know NSLog is "old", its the exact same result regardless of how the logging is actually performed). - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { appDelegate = self; NSLog(@"Log line 1"); NSLog(@"Log line 2"); NSLog(@"Log line 3"); NSLog(@"Log line 4"); NSLog(@"Log line 5"); When the app is downloaded from Testflight then only very rarely will I see 5 lines of logging, sometimes it'll be 4, sometimes 2, sometimes none. And quite often the logging is duplicated i.e. I might see for example in the Console app: Log line 1 Log line 1 Log line 2 Log line 2 Log line 3 Log line 3 In general it's just totally unusable and unreliable. It just cannot be be used at all. Why is it this bad? What can be done to make logging reliable and useful? I've spent days and days reading the recommended approaches, trying things out, including the new stuff like OSLog etc. But it remains dreadful. What is the recommended approach to make logging 100% reliable? There's never any problem with Xcode's console, it's only with the Mac's console app. However, when an app is being tested which has been installed from Testflight then using Xcode's console can't be used. So If a QA team find problems with a Testflight build and attach the Console log its utterly useless as its contents are effectively random.
1
0
478
Jan ’25
Writing to Printer with Core Bluetooth
I have a very cheap Bluetooth-connected printer. And I want to print out a word or two via Core Bluetooth. It's an iOS app with the SwiftUI framework. The following is what I have for an ObservableObject class. import Foundation import CoreBluetooth class BluetoothManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeripheralDelegate { @Published var connectedDevices: [CBPeripheral] = [] @Published var powerOn = false @Published var peripheralConnected = false private var centralManager: CBCentralManager! private var peripheralName = "LX-D02" private var connectedPeripheral: CBPeripheral? private var writeCharacteristic: CBCharacteristic? private let serviceUUID = CBUUID(string:"5833FF01-9B8B-5191-6142-22A4536EF123") private let characteristicUUID = CBUUID(string: "FFE1") override init() { super.init() self.centralManager = CBCentralManager(delegate: self, queue: nil) } func startScanning() { if centralManager.state == .poweredOn { centralManager.scanForPeripherals(withServices: nil, options: nil) } } func centralManagerDidUpdateState(_ central: CBCentralManager) { if central.state == .poweredOn { powerOn = true print("Bluetooth is powered on") } else { print("Bluetooth is not available") } } func centralManager(_ central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : Any], rssi RSSI: NSNumber) { if !connectedDevices.contains(peripheral) { if let localName = advertisementData["kCBAdvDataLocalName"] as? String { if localName == peripheralName { connectedDevices.append(peripheral) centralManager.connect(peripheral, options: nil) centralManager.stopScan() peripheralConnected = true print("Connected: \(peripheral.identifier.uuidString)") } } } } func centralManager(_ central: CBCentralManager, didConnect peripheral: CBPeripheral) { connectedPeripheral = peripheral peripheral.delegate = self let services = [serviceUUID] peripheral.discoverServices(services) //discoverServices(peripheral: peripheral) } func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: (any Error)?) { guard let error = error else { print("Failed connection unobserved") return } print("Error: \(error.localizedDescription)") } func peripheral(_ peripheral: CBPeripheral, didDiscoverServices error: Error?) { if let error = error { print("Failing to discover servies: \(error.localizedDescription)") return } discoverCharacteristics(peripheral: peripheral) } /* Return all available services */ private func discoverServices(peripheral: CBPeripheral) { peripheral.discoverServices(nil) } private func discoverCharacteristics(peripheral: CBPeripheral) { guard let services = peripheral.services else { return } for service in services { peripheral.discoverCharacteristics(nil, for: service) } } func peripheral(_ peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?) { guard let characteristics = service.characteristics else { return } for characteristic in characteristics { let characteristicUUID = characteristic.uuid print("Discovered characteristic: \(characteristicUUID)") peripheral.setNotifyValue(true, for: characteristic) if characteristic.properties.contains(.writeWithoutResponse) { writeCharacteristic = characteristic print("You can write!!!") // Never read... } if characteristic.properties.contains(.write) { print("You can write?") writeCharacteristic = characteristic // Being read... } } func writeToPrinter() { guard let peripheral = connectedPeripheral else { print("Ughhh...") return } if let characteristic = writeCharacteristic { if let data = "Hello".data(using: .utf8, allowLossyConversion: true) { peripheral.writeValue(data, for: characteristic, type: .withoutResponse) peripheral.writeValue(data, for: characteristic, type: .withResponse) // -> Message sent successfully } } } func peripheral(_ peripheral: CBPeripheral, didWriteValueFor characteristic: CBCharacteristic, error: Error?) { if let error = error { print("Writing error: \(error.localizedDescription)") return } print("Message sent successfully") } } My app has no trouble connecting to the bluetooth-connected printer. Initially, I called discoverServices(peripheral:) to get all services And I get a service identifier (5833FF01-9B8B-5191-6142-22A4536EF123) for my printer. peripheral(_:didDiscoverCharacteristicsFor:error:) doesn't return a thing for .writeWithoutResponse but does return a characteristic for .write. Eventually, if I call writeToPrinter(), peripheral.writeValue(data, for: characteristic, type: .withoutResponse) returns WARNING: Characteristic <CBCharacteristic: 0x3019040c0, UUID = 5833FF02-9B8B-5191-6142-22A4536EF123, properties = 0x8, value = (null), notifying = NO> does not specify the "Write Without Response" property - ignoring response-less write If I call peripheral.writeValue(data, for: characteristic, type: .withResponse) , there is no error. But I get no output from the printer. What am I doing wrong? Thanks.
1
0
436
Jan ’25
iPad - Bluetooth Peripheral MTU No More Than 20 Bytes
All, Thanks in advance! I'm having a very hard time increasing the MTU to any value beyond 20. The research I've done states iOS 16.1 and beyond supports up to 512 bytes. Yet, the peripheral device will only read 20 bytes. It's to be noted that I'm using Expo SDK 51 Bare Workflow, and the react-native-ble-plx library. I have the app functioning as both Central and Peripheral on iOS 18.1 devices, and data is successfully being written and read to the characteristic. Because the Expo app is Bare Workflow, I'm able to make any configurations via Xcode, and if there is any patches needed to the react-native-ble-plx library, we have the architecture to support that too. I wanted to provide that context before being recommended to go to the Expo forums (which I have/will be). I also added the CoreBluetooth framework to the project in hopes that would overwrite the react-native-ble-plx imports, but I noticed react-native-ble-plx uses Swift while CoreBluetooth is Objective-C. Looking forward to your responses!
1
0
558
Jan ’25
Application must be updated by the developer issue
Hi All, I am facing with ****** issue, searched through many similar topics, but did not find solution, hope someone can help me! Common information: iOS VPN application min. deployment iOS 15.0 Xcode 14.2 Testing on iPhone with iOS 16.0.2 / 15.5 Problem description Application is builded, installed on iPhone and launched from XCode. After a new VPN configuration is added by application using NETunnelProviderManager. No errors are occurred during all this steps. However I can not enable VPN and in VPN settings I observe "Update required" message: "Application must be updated by the developer before VPN can be connected"
8
1
1.6k
Jan ’25
UIViewController.view.backgroundColor auto changed when present
This is easy to reproduce,in dark mode, 2 UIViewControllers A and B, A present B. code: class AAA: UIViewController { override func viewDidLoad() { super.viewDidLoad() navigationItem.title = "AAA" view.backgroundColor = .systemBackground } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { present(UINavigationController(rootViewController: BBB()), animated: true) } } class BBB: UIViewController { override func viewDidLoad() { super.viewDidLoad() navigationItem.title = "BBB" view.backgroundColor = .systemBackground } override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { dismiss(animated: true) } } before present: after present: Obviously, the backgroundColor of the view has changed. I guess it's because view's backgroundColor is the same as the the window, so changed the color to distinguish between the controller and the background, but this brought unexpected changes which is confusing. I want to know how this happened and how I can manually control it
1
0
275
Jan ’25
Safari with Prevent Cross-Site Tracking enabled bypasses NEDNSProxyProvider
Hi, I’ve encountered an issue with Safari’s behavior when Prevent Cross-Site Tracking is enabled in iOS, related to DNS filtering via an implemented NEDNSProxyProvider. Here’s a step-by-step breakdown: In Safari, when attempting to query a blocked domain (according to the filtering policy of the NEDNSProxyProvider), the page is blocked as expected. Closing Safari without closing the tab with the blocked domain. Reopening Safari – Expected result: The page remains blocked; Actual result: The page loads and bypasses the NEDNSProxyProvider (no logs are received for this flow). Tapping the refresh button causes the page to be blocked, as the DNS Proxy Provider intercepts the new request. Note: This issue is only reproducible in general tabs in Safari. In private tabs, a fresh DNS query is generated each time, and the blocking behavior works as expected. I also tested Google Chrome, where the domain is blocked consistently. I attempted to filter this issue via Content Filter, but the only connection received by NEFilterDataProvider is for com.apple.Safari.SearchHelper with ssl.gstatic.com. Could you advise on how to handle this behaviour? Would be grateful to hear any ideas
4
0
634
Dec ’24
Rooted iPhone 15 Pro
iOS 18.2 (22C152) My phone is currently on lockdown mode and I have gotten alerts from Experian that my information is on the dark web as well as having to reset all my accounts. However this has not fixed the issue. Even if I hard factory reset settings etc the root makes its way very shortly after, if not immediately. Though I recently got these notifications and purchased the phone in Feb. 2024 the has been an ongoing issue for a few years. I can elaborate if needed. To make it short I have a reinstalled root on my phone. Apple nor Spectrum (who I have my phone with) have been able to assist with this issue. I have been able to clarify this ”hijacking” with the Geek Squad who didn’t want their legal team involved when asking for a report so the PD can do an internal cyber investigation. So, I’ve just lived with it. Let me know what your thoughts to resolve this issue would be before spending thousands to find a resolution on my own. Side note before asked: what I’ve been told may be it’s ”gateway” is via “DNS hijacking” with WiFi or internally hotspot. I can also elaborate if needed-I’m not a web developer, however I do know where this issue stems from whom has their masters in such industry as well as 30 years experience. It’s annoying and inconvenient at this point and I’m looking for clarity, resolution and if no justice for the criminal then liability. thank you! please refrain from saying “APpLe CaNt bE hiJaCked“ ..
1
0
540
Dec ’24
UIColor labelColor in macOS made-for-iPad app is not solid black
When my iOS app runs on macOS in "designed for iPad" mode, the system foreground colour RGBA values seem strange. Looking at [UIColor labelColor], [UIColor secondaryLabelColor] etc. on iOS, I see values like these: (Light Mode) // R G B A fg0 = 0 0 0 255 fg1 = 10 10 13 153 fg2 = 10 10 13 76 fg3 = 10 10 13 45 Note in particular that fg0, aka labelColor, is solid black. When I run it on my Mac, the values I see are: // R G B A fg0 = 0 0 0 216 fg1 = 0 0 0 127 fg2 = 0 0 0 66 fg3 = 0 0 0 25 Here, fg0 has alpha = 216. The result is that it looks like a dark grey, on a white background. Of course it's reasonable for macOS to have a different colour palette than iOS - but native macOS apps seem to have solid 100% black as their foreground colour. Do others see this? What should I be doing? Note that I'm getting colour values using UIColor's getRed: blue: green: alpha: method and then using these colour values for some custom GPU drawing. Previously I was using solid black and white, but at some point I updated it to use UIColor in order to respond to light/dark-mode changes.
0
0
398
Dec ’24
Xcode 16.2 not running unit tests
I update my Xcode to latest 16.2. However I am unable to run the unit tests which were working fine when I used Xcode 15. Also I am using a CI/CD tools which has Xcode 15.3 and also using iOS 17.5 device to run unit tests and those are also working fine. I am getting following 3 different types of errors when I try running tests. Command SwiftCompile failed with a nonzero exit code Command SwiftEmitModule failed with a nonzero exit code PhaseScriptExecution failed with a nonzero exit code Any help how I can fix this?
3
1
1.1k
Dec ’24
Issue with Live CallerID URL Caching
I've been testing the Live CallerID feature using the Apple-provided local server example - live-caller-id-lookup-example. I've been running a local server with tunneling using ngrok for the initial setup. Everything was working perfectly with the following setup: @main final class CallerID: LiveCallerIDLookupProtocol { var context: LiveCallerIDLookupExtensionContext { LiveCallerIDLookupExtensionContext( serviceURL: URL(string: "https://example-tunnel.ngrok.io")!, tokenIssuerURL: URL(string: "https://example-tunnel.ngrok.io")!, userTierToken: Data(base64Encoded: "BBBB")! ) } } However, after I updated the URLs to the production ones, I encountered an issue: @main struct CallerID: LiveCallerIDLookupProtocol { var context: LiveCallerIDLookupExtensionContext { LiveCallerIDLookupExtensionContext( serviceURL: URL(string: "https://example.net/")!, tokenIssuerURL: URL(string: "https://example/issue")!, userTierToken: Data(base64Encoded: "BBBB")! ) } } The problem is that during calls or when updating PIR parameters, the application still attempts to connect to the initial ngrok tunnel URLs instead of using the new production URLs. I can confirm this because the logs on my local server show incoming requests, indicating that the application is still referencing the old ngrok tunnel URLs. Steps I’ve taken to resolve the issue include: Deleting and reinstalling the application. Using reset(forExtensionWithIdentifier:) Unfortunately, these attempts have not been successful. I even extracted the binary of the app and extension to inspect the strings, confirming that the correct production URLs are present. The server was started with the following command: PIRService --hostname 127.0.0.1 service-config.json Could this be some sort of caching bug on the iOS side, or am I missing something?
0
0
386
Dec ’24
Is Settings.bundle deprecated? What required-reason API code to use?
I'm referring to the use of a "settings bundle" plist to cause the main Settings app to display your app's preferences which the app can then read via NSUserDefaults, as described here: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/UserDefaults/Preferences/Preferences.html#//apple_ref/doc/uid/10000059i-CH6 I am wondering if this is actually deprecated, or something. I ask because, (1), it still has the high-quality old-style documentation, and (2) there doesn't seem to be a "required reason API" code for using it. Specifically, the NSUserDefaults required reason API codes are CA92.1 : "This reason does not permit reading information that was written by other apps or the system" 1C8F.1 : "This reason does not permit reading information that was written by apps, app extensions, or App Clips outside the same App Group or by the system." C56D.1: "...third-party SDK..." - nope. AC6B.1: "... com.apple.configuration.managed ..." - nope. None of the codes permit reading preferences that have been set by the Settings app using this method.
4
0
1.9k
Dec ’24
App Settings Not Appearing with Xcode 16.2
I recently encountered an issue with Xcode 16.2 while attempting to integrate Settings.bundle into a new app. I added Settings.bundle as a new file (using the provided template), but when I ran the app (the default "Hello World" project), the expected three default controls (Name, Enabled, Slider) did not appear in the app's settings. To troubleshoot, I downgraded my system to macOS Sonoma 14.7.2 and Xcode 15.4 (on a 2023 Mac Mini, M2). After this downgrade, everything worked as expected. With a new project, adding Settings.bundle, and running the app, the settings entry for the app appeared, including the three default fields. This behavior suggests a potential issue or incompatibility with Xcode 16.2.
3
3
1.3k
Dec ’24
App built with Xcode 16.2 is greater then 100 mb vs the app built with Xcode 15.4
I have an app written in swift. It has multiple pods dependencies installed. When the app is generated with Xcode 15.4 the size of app is ~148Mb and when the same app is generated with Xcode 16.2 the size is ~246MB When I extracted and analysed the app, it was observed that one of the framework installed via pods Dependencies("DocumentReaderCore") was consuming more size(42.9 MB vs 215 MB) the DocumentReaderCore present in the Payload/.app/Frameworks/DocumentReaderCore.framework/DocumentReaderCore was of type linux executable when generated using Xcode 15.4 vs the other was od document type and size was 215MB.
1
0
504
Dec ’24
Critical Issue in iOS 18 Beta: UITabBarController Child View Controller Incorrectly Added as UITabBarItem, Leading to Application Crash
I am writing to report an issue I encountered with iOS 18 beta that affects my application, which has been available on the App Store for over two years and currently has over 60,000 active users. My application utilizes a UITabBarController to manage multiple tabs, where each tab hosts a UIViewController embedded within a UINavigationController. The application operates in two different states, where users may have either 5, 4, or 3 tabBarItems depending on their configuration. The issue arises when fewer than 5 tabs are present. In these cases, I add child view controllers to the UITabBarController to ensure they are displayed above the tab bar, rather than below it. The relevant code snippet is as follows: tabBarController.addChild(childController) tabBarController.view.addSubview(childController.view) Prior to iOS 18, this implementation functioned as expected. However, with the release of iOS 18, adding a child view controller to the UITabBarController results in the child being incorrectly added as a UITabBarItem. This misbehavior leads to an application crash when the unintended tab is selected. The crash trace is as follows: "Inconsistency in UITabBar items and view controllers detected. No view controller matches the UITabBarItem '<UITabBarItem: 0x142d9c480> selected'." I have attached screenshots from iOS 18 and previous versions to illustrate the issue, which compares the expected behavior in earlier iOS versions with the problematic behavior in iOS 18. I appreciate your attention to this matter and look forward to any guidance or resolution you can provide.
6
0
2.4k
Dec ’24
Open Share Extension
Hello, everyone! Help me please to find answer. I have two applications: App-1 with share extension and App-2 without it. From the second app I can open share extension via UIActivityViewController. But I need this extension in the second application to open immediately by pressing a button, and not through UIActivityViewController. Can I do this?
3
0
1.6k
Dec ’24
Some colors are missing during first app launch
Recently I decided to download my app from the App Store and found out that during the first launch some colors were missing or displayed incorreclty. For example one button was blue, although switching dark mode on and off solved button color it. Some colors were completely missing and the tab bar buttons were blue as well. Any advices? I'm using iOS 18.2 and XCode 16.1
1
0
332
Dec ’24