iOS is the operating system for iPhone.

Posts under iOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

App crashing in MacOs 10.15, xcode 16, but working in Sonoma's xcode16
Hello. I don't even know where to start. We have a React Native application with some native modules that have never been an issue. The app was working under Sonoma Xcode16, yesterday I autoupdated my MacOS to Squoia, and the application won't build using the newest Xcode16 and Xcode command line tools. The builds system crashes in the middle of building the app and throws a really vague description: unexpected service error: The Xcode build system has crashed. Build again to continue. I Post the report summary (without the kernel triage), since I can't find what's wrong after updating most of my libraries... ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: XCBBuildService [95423] Path: /Applications/Xcode.app/Contents/SharedFrameworks/XCBuild.framework/Versions/A/PlugIns/XCBBuildService.bundle/Contents/MacOS/XCBBuildService Identifier: com.apple.dt.XCBBuildService Version: 1.0 (23000.1.226) Build Info: XCBuild-23000001226000000~21 (16A242d) Code Type: ARM-64 (Native) Parent Process: Xcode [73582] Responsible: Xcode [73582] User ID: 501 Date/Time: 2024-09-19 18:13:24.6355 -0600 OS Version: macOS 15.0 (24A335) Report Version: 12 Anonymous UUID: 43B52D98-515B-9112-EEEB-8F7C77E1126D Sleep/Wake UUID: 95C65D73-8F98-45C7-BF7A-5799C9E1CAA4 Time Awake Since Boot: 130000 seconds Time Since Wake: 27974 seconds System Integrity Protection: enabled Crashed Thread: 11 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 6 Abort trap: 6 Terminating Process: XCBBuildService [95423] Application Specific Information: abort() called Thanks in advance. Edit: already tried with this, which is indeed a library I am using, but still keeps crashing: Stack Overflow Solution based on some library update
0
1
188
3w
Apple Intelligence not available on Shared iPad
I am trying to use Apple Intelligence on a shared iPad. I cannot use Apple Intelligence even though I have registered my Apple Acount. Apple Intelligence does not appear in the device settings. Please tell me the following Can I use Apple Intelligence on my Shared iPad device? If so, is it an expected behavior that Apple Intelligence settings are not displayed on the Shared iPad device? The specifications of the devices used are as follows OS: iPadOS 18.1 beta3 Model: iPad Air-13inch(M2)
2
0
357
3w
Some of the new restriction settings available in iOS18 do not install settings on the device
I was checking the operation of items that are now available on devices with iOS 18 or later, but when I distribute to Shared iPad devices, the following 3 items are not installed on the device and cannot be controlled. allowiPhoneMirroring allowPersonalizedHandwritingResults allowWritingTools Please let us know the following. Are the above 3 items available on Shared iPad? If so, please tell us how to solve the problem that the items are not installed on the Shared iPad device and the control does not work. The specifications of the device used are as follows OS : iOS18.1 beta3 Model : iPad Air 13-inch(M2)
1
0
541
3w
Universal Linking not working
Hi Team, Universal linking is not working with safelink and when using the amazon SES. https://docs.aws.amazon.com/ses/ When we have email template and click on the links we are unable to open the app with safe links, does anyone faced this problem before for when using safe link with amazon SES or any other services. Please help me to resolve this issue as soon as possible.
1
1
171
3w
iOS18 Must appear crash bug
1、 hook respondsToSelector: 接口,比如 hook 后的接口名字为 yy_respondsToSelector: 2、在 yy_respondsToSelector 中使用传入的参数 aSelector。示例代码如下: (BOOL) yy_respondsToSelector:(SEL)aSelector { if ([self yy_respondsToSelector:aSelector]) { return YES; } if ([self.selectorNameArray containsObject:NSStringFromSelector(aSelector)]) { return YES; } return NO; } 2、在自定义 UIViewController,比如 YYViewController,实现下述代码 (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; NSMutableArray *vcs = [[NSMutableArray alloc]init]; [vcs addObject:[[UIViewController alloc] init] ]; [vcs addObject:[[UIViewController alloc] init] ]; self.navigationController.viewControllers = vcs; } 3、当页面 YYViewController加载并执行 viewDidAppear 时候, App 一定会出现崩溃,因为 aSelector 是一个非法指针,访问就会崩溃
1
0
161
3w
iOS18.0 and iOS18.1 will inevitably crash. - (BOOL) respondsToSelector:(SEL)aSelector aSelector may be invalid, resulting in a crash
Hook respondsToSelector: interface. For example, the name of the hooked interface is yy_respondsToSelector: 2. Use the passed parameter aSelector in yy_respondsToSelector. The sample code is as follows: (BOOL) yy_respondsToSelector:(SEL)aSelector { if ([self yy_respondsToSelector:aSelector]) { return YES; } if ([self.selectorNameArray containsObject:NSStringFromSelector(aSelector)]) { return YES; } return NO; } 2. In a custom UIViewController, such as YYViewController, implement the following code (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; NSMutableArray *vcs = [[NSMutableArray alloc]init]; [vcs addObject:[[UIViewController alloc] init] ]; [vcs addObject:[[UIViewController alloc] init] ]; self.navigationController.viewControllers = vcs; } 3. When the page YYViewController is loaded and viewDidAppear is executed, App There will definitely be a crash, because aSelector is an illegal pointer, and access will crash
0
0
146
3w
Unable to Vertify App/ Preview only on iPhone
Choose the real iPhone device on my Xcode and build for running. Xcode warn me to vertify the Developer App certification in VPN & Device Management. When I get through it as vertify. The setting page still ask me to vertify the app. I press the "Vertify App" Button and press "Vertify" but it can't work. And it also cannot preview when I choose my device in the previewer. But both work well on my iPad Air. I can pass the vertify app and also can preview through Xcode. I searched the problem in forum.i found someone who has the same problem. https://developer.apple.com/forums/thread/744579 I try to change my network environment, reboot the device, reboot the develop laptop, but still cannot work. I'm using Xcode Version 16.0 (16A242d) iPhone 14 Pro with iOS 18.0 (22A3354) iPad Air 3 with iPad OS 17.6.1
0
0
144
3w
ios 18 Crash
My project use manual reference counting and crash with UIAlertController when touch to Action Button: UIAlertController alert = [[UIAlertController alertControllerWithTitle:@"fsđs" message:@"fsđs" preferredStyle:UIAlertControllerStyleAlert ]autorelease]; UIAlertAction actionOk = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:nil]; [alert addAction:actionOk]; [self.window.rootViewController presentViewController:alert animated:YES completion:^{ }];
2
1
338
3d
Cannot Play mp3 File via AudioContext in iOS 18 Safari
I have a Safari extension that plays audio via the javascript AudioContext API. It was working fine under iOS 17 and is now broken under iOS 18. It does not play audio at all. I've tried in both the iOS 18 public beta and the iOS 18.1 developer beta. It is broken in both of them. I've also created Feedback item FB15170620 which has a url attached to a page I created which demonstrates the issue.
0
0
223
3w
Metal addCompletedHandler causes crash with Swift 6 (iOS)
The following code runs fine when compiled with Swift 5, but crashes when compiled with Swift 6 (stack trace below). In the draw method, commenting out the addCompletedHandler line fixes the problem. I'm testing on iOS 18.0 and see the same behavior in both the simulator and on a device. What's going on here? import Metal import MetalKit import UIKit class ViewController: UIViewController { @IBOutlet var metalView: MTKView! private var commandQueue: MTLCommandQueue? override func viewDidLoad() { super.viewDidLoad() guard let device = MTLCreateSystemDefaultDevice() else { fatalError("expected a Metal device") } self.commandQueue = device.makeCommandQueue() metalView.device = device metalView.enableSetNeedsDisplay = true metalView.isPaused = true metalView.delegate = self } } extension ViewController: MTKViewDelegate { func mtkView(_ view: MTKView, drawableSizeWillChange size: CGSize) {} func draw(in view: MTKView) { guard let commandQueue, let commandBuffer = commandQueue.makeCommandBuffer() else { return } commandBuffer.addCompletedHandler { _ in } // works with Swift 5, crashes with Swift 6 commandBuffer.commit() } } Here's the stack trace: Thread 10 Queue : connection Queue (serial) #0 0x000000010581c3f8 in _dispatch_assert_queue_fail () #1 0x000000010581c384 in dispatch_assert_queue () #2 0x00000002444c63e0 in swift_task_isCurrentExecutorImpl () #3 0x0000000104d71ec4 in closure #1 in ViewController.draw(in:) () #4 0x0000000104d71f58 in thunk for @escaping @callee_guaranteed (@guaranteed MTLCommandBuffer) -> () () #5 0x0000000105ef1950 in __47-[CaptureMTLCommandBuffer _preCommitWithIndex:]_block_invoke_2 () #6 0x00000001c50b35b0 in -[MTLToolsCommandBuffer invokeCompletedHandlers] () #7 0x000000019e94d444 in MTLDispatchListApply () #8 0x000000019e94f558 in -[_MTLCommandBuffer didCompleteWithStartTime:endTime:error:] () #9 0x000000019e95352c in -[_MTLCommandQueue commandBufferDidComplete:startTime:completionTime:error:] () #10 0x0000000226ef50b0 in handleMainConnectionReplies () #11 0x00000001800c9690 in _xpc_connection_call_event_handler () #12 0x00000001800cad90 in _xpc_connection_mach_event () #13 0x000000010581a86c in _dispatch_client_callout4 () #14 0x0000000105837950 in _dispatch_mach_msg_invoke () #15 0x0000000105822870 in _dispatch_lane_serial_drain () #16 0x0000000105838c10 in _dispatch_mach_invoke () #17 0x0000000105822870 in _dispatch_lane_serial_drain () #18 0x00000001058237b0 in _dispatch_lane_invoke () #19 0x00000001058301f0 in _dispatch_root_queue_drain_deferred_wlh () #20 0x000000010582f75c in _dispatch_workloop_worker_thread () #21 0x00000001050abb74 in _pthread_wqthread ()
3
1
334
3w
Background Decoration View Overlapping Collection View Cells
I am encountering an issue with my UICollectionView layout where the background decoration view is overlapping the collection view cells. Below is the relevant code for my layout configuration: let itemSize = NSCollectionLayoutSize( widthDimension: .absolute(60), heightDimension: .absolute(100) ) let item = NSCollectionLayoutItem(layoutSize: itemSize) let groupSize = NSCollectionLayoutSize( widthDimension: .fractionalWidth(1), heightDimension: .absolute(100) ) let group = NSCollectionLayoutGroup.horizontal( layoutSize: groupSize, subitems: [item] ) let section = NSCollectionLayoutSection(group: group) section.decorationItems = [ NSCollectionLayoutDecorationItem.background(elementKind: "customBackgroundElementKind") ] return section Problem: The background decoration view is appearing on top of the collection view cells, which results in the cells being obscured. This issue is specific to iOS 18 and does not occur on iOS 17 and below. Request: Can anyone provide guidance or suggest a solution to ensure the decoration view does not overlap the collection view cells specifically on iOS 18? Thank you!
4
2
310
3w
SwiftUI @main Accessing UserDefaults Too Early Before applicationDidFinishLaunching
I'm working on a macOS and iOS app using SwiftUI. And received bug from very few user that they are being logged out, even tho they didn't. So i'm assuming issue is relevant to this forum post, and that the keychain data and user defaults aren't available very early on in an app's lifecycle (presumably from cold start). There is fix available for iOS but didn't find anything relevant to isProtectedDataAvailable for macOS. I'm accessing UserDefaults in my @main view's sub view. It seems that UserDefaults is accessed too early, before applicationDidFinishLaunching. And therefore, not getting user data on launch sometimes. This issue is very rare, i'm not able to reproduce this, but assuming this can be cause based on some form post, also because view's onAppear calls before applicationDidFinishLaunching.
3
0
210
3w
[iOS18] Crash in `static NSDecimal./ infix(_:_:)`
Crashed: com.apple.main-thread 0 Foundation 0x2bd25c specialized static NSDecimal._integerDivide(dividend:divisor:maxResultLength:) + 1996 1 Foundation 0x2c1c0c specialized NSDecimal._divide(by:roundingMode:) + 2432 2 Foundation 0x372710 static NSDecimal./ infix(_:_:) + 64 Crashed: com.um.positions.fiber.queue 0 Foundation 0x2bdc94 <redacted> + 1996 1 Foundation 0x2c2644 <redacted> + 2432 2 Foundation 0x372804 $sSo9NSDecimala10FoundationE1doiyA2B_ABtFZ + 64 After iOS18, some new crashes appeared, but they never appeared before iOS18. How to avoid such crashes? I checked the API documentation and there is no relevant modification, https://developer.apple.com/documentation/foundation/1409398-nsdecimaldivide However, I parsed iOS_22A5326g/../Foundation.framework/Foundation, and found that this EXC_BREAKPOINT is newly added You can reproduce it with the following code: let a: Decimal = .greatestFiniteMagnitude let b: Decimal = .greatestFiniteMagnitude let c = a / b // if < iOS18, c = 1. if = iOS18, will crashed ;< print(c)
3
1
404
3w
SwiftUI: .textSelection(.enabled) not working in List on iOS 18
In iOS 18, textSelection(_:) not working in List. So, I can't copy text. Works on iOS 17 and earlier. Is this a bug and is there any solution? // Not Work: iOS 18 struct ContentView: View { var body: some View { List { Text("Hello World") .textSelection(.enabled) } } } // Work: iOS 18 and earlier struct ContentView: View { var body: some View { Text("Hello World") .textSelection(.enabled) } }
2
3
270
3w
Bluetooth connection unexpectedly timing out with macOS Sequoia
After the macOS Sequoia update, my app seems to have an issue with Bluetooth communication between macOS and iOS that uses CoreBluetooth for Central-Peripheral communication. Setup: The iPhone (in my case: iPhone 14 Pro with iOS 18.0 (22A3354)) acts as the Central, and the Mac (in my case: 14" MacBook Pro 2023 with macOS 15.0 (24A335)) as the Peripheral. I’ve implemented a mechanism where the Central (iPhone) sends a message to the Peripheral (Mac) every 15 seconds to keep the connection alive (Because it needs to wait for notify characteristic updates). I never noticed this kind of issue before, but with macOS Sequoia I get it permanently. Issue: The connection drops unexpectedly after a period of time (sometimes 20 seconds, sometimes a few minutes) with CBErrorDomain - code 6: The connection has timed out unexpectedly. Sample Code: Peripheral (Mac): ContentView (Peripheral).txt ContentViewModel (Peripheral).txt Central (iPhone): ContentView (Central).txt ContentViewModel (Central).txt Reproduce: I attached sample code including the Central-Sample (for iPhone) and Peripheral-Sample (for Mac). Just run the Peripheral-Sample (after granting Bluetooth permissions). Then run the Central-Sample and select the Mac device in the list After selecting it should connect, discover the service & characteristic and should start writing messages to it. After some time the func centralManager(_ central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: (any Error)?) {should get called with timed out unexpectedly error. Could anyone please look into this issue and advise on whether there’s a known bug or any workaround? Any guidance would be greatly appreciated, as this impacts the stability of Bluetooth communication between the devices. Thanks in advance. Logs: I also ran the console.app during this issue which got these errors (if this is helpful): console_logs.txt
4
2
671
1w
Considering Alternatives to SwiftUI for a Complex App
I am working on an application that has some complex navigation needs, and I'm considering abandoning SwiftUI, at least in a few core areas of the app. I found SwiftUI intuitive and useful for simple things like: Using a state to toggle the appearance or disappearance of an element Using state to alter the look of UI elements Watching the values of built-in interfaces like TextField or Slider Controlling out-of-the-box UI elements like NavigationSplitView But now I've got a UI that depends on a data model that can change at any time, and from that data I'll display lists of objects, and objects in detail, and all of this will be displayed according to a NavigationPath that depends on the data model's internal structure. This means that, for instance, I may be in the detail view of element X after having traveled to it from the detail view of element Y which was tapped in a list of XYZ, which was the result of tapping into part of the detail view of element W. This whole path could be invalidated by an update to the data model when it's received from the network. Furthermore, any element could have it's details changed, or be deleted, and I'd want the UI to reflect that right away if possible. For the navigation work, I'm still optimistic that custom edits to a NavigationPath could be the way to go. However, for propagating data updates around my app, I know @State, @Bindable, etc are intended to handle this kind of thing, but when I'm try to send these bindings through the circuitous path of views I mentioned above, and I run into any unexpected hiccup, it feels like I'm at a disadvantage when debugging because I'm relying on opaque SwiftUI Magic to handle things under the hood in a way I don't really understand. I could put more effort into learning how this works, and potentially come up against some platform limitations, bugs, or other dead-ends, or I could just use Pub/Sub and a network of custom queues/pipes, and send updates around my app the old fashioned way, but using primitives whose functions are clear to me. I've been using SwiftUI for about a year and it still trips me up, and I have watched a few WWDC talks on the topic. I'd appreciate any advice on this front from the frequenters of this forum. Thanks for reading my post.
3
0
230
1w
Issue with Sandbox Account on iPhone (iOS) for In-App Purchase Testing
Hi everyone, I'm currently working on testing in-app purchases for my app, and I'm having issues with logging into a sandbox account on my iPhone. Here's the situation: I created a sandbox account via App Store Connect. I signed out of my regular Apple ID from the App Store and attempted to log in with my sandbox account during an in-app purchase. I receive a verification code on my phone, and it seems like the login is working. However, after entering the code, I keep getting redirected back to the "Sign in with Apple Account" screen. It doesn’t fully log me in. I’ve tried resetting network settings, restarting the device, and even creating a new sandbox account, but nothing seems to work. I'm running the app through Expo prebuild and attempting to test purchases, but without being able to log into the sandbox environment, I can’t move forward. Has anyone encountered this issue before or know how to fix it? Any help would be greatly appreciated! Thanks!
0
0
183
4w
Xcode Build System Crashes After Update to Xcode 16
Hi everyone, I've recently upgraded macOS to sequoia and Xcode 16 and am encountering an issue with the build system crashing. The error message I receive is: Unexpected service error: The Xcode build system has crashed. Build again to continue. I've already tried cleaning the build folder, resetting the Xcode preferences, and restarting Xcode, but the issue persists. My app previously built fine with Xcode 15, and nothing significant has changed in my project except for the Xcode upgrade. #Reactnative #Xcode #iOS #MacOs #sequoia
1
3
2.9k
3w