Posts under Developer Tools & Services topic

Post

Replies

Boosts

Views

Activity

Issue with UIPopoverPresentationController position drifting on iPadOS 26.0
After upgrading my iPad to iPadOS 26.0, I noticed that when using UIPopoverPresentationController, the popover no longer appears at the expected position. According to the debug logs, the position of the arrow indicator is printed correctly. Interestingly, the issue can be fixed temporarily by switching between portrait and landscape orientations. Could you please help me resolve this issue? UIAlertController *newSheet = [UIAlertController alertControllerWithTitle:@"111111" message:@"2222222222222" preferredStyle:UIAlertControllerStyleActionSheet]; UIAlertAction *action = [UIAlertAction actionWithTitle:@"1112313" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) { }]; [newSheet addAction:action]; newSheet.modalPresentationStyle = UIModalPresentationPopover; UIPopoverPresentationController *popover = [newSheet popoverPresentationController]; popover.sourceView = cell; [self presentViewController:newSheet animated:YES completion:nil];
1
0
35
2d
How to install self signed certificate to iPhone simulator running iOS 18.5?
I am trying to communicate with the backend of my project. So I need to install the certificate into the simulator. I have the .pem file but when I drag-dropped it into the simulator, I got the error "Simulator device failed to complete the requested operation.". The simulator is an iPhone 16 Pro running iOS 18.5. Is there any way to install the cert to my simulator? PS: I can't use Apple Configurator or MDM because I am using the office's Mac. And I can't install anything there. So I can only do it manually.
3
0
146
2d
How do I run an arbitrary subprocess from an Xcode extension?
I'd like to start a subprocess from an Xcode extension. My prototype performCommandWithInvocation method looks like this: - (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation *)invocation completionHandler:(void (^)(NSError * _Nullable nilOrError))completionHandler { NSTask*task= [[NSTask alloc]init]; [task setExecutableURL:[NSURL fileURLWithPath:@"/bin/sh"]]; //option A: [task setArguments:@[@"-c",@"echo hello from sh"]]; //option B: [task setArguments:@[@"-c",@"/usr/bin/python3 -c 'print(\"hello from python3\")'"]]; [task launch]; [task waitUntilExit]; int status=[task terminationStatus]; printf("status: %d\n",status); completionHandler(nil); } So there's two options there: option A, or option B. (Uncomment to taste.) Option A does work. /bin/sh starts, and runs echo, and it prints hello to its stdout. I was foolish enough to let this convince me that this whole thing might be a goer. Option B does not work. I get an error: xcrun error: cannot be used with in an App Sandbox. Which is annoying, as virtually all of the scripts I want to run are written in Python, and I'd quite like this to be an option. How do I fix this? I tried removing the App Sandbox settings from my extension, but then Xcode refused to load it. I added Read/Write permissions to all the File Access settings in the App Sandbox section, even though most of them sounded irrelevant, but no improvement. Then I ticked every tick box I could find. My extension can debug, it can JIT, library validation is off, it can use the camera and access my photos and read the audio and my contacts and open sockets in any direction it wants and goodness knows what else. But it seems it still can't run python. How do I make this work? --Tom
0
0
53
2d
Transfer apps with previous Sandboxed Group Container
I know it was not possible previously, but wonder have things changed to support transfer of apps with this condition: Sandboxed Group Container You can only transfer sandboxed apps that are not sharing a group container. Our old company is having some issues and cannot continue, and would like to transfer to another company without doing the binary reassignment process which loses all the reviews. Thank you!
0
0
29
2d
Assets duplicating on Xcode 26.1 Beta 3
I've recently installed 26.1 Beta 3 alongside stable 26.0.1 When building my app with 26.0.1 the final .ipa size is ~17mb, however after building my app with 26.1 Beta 3 the size has increased up to ~22mb The main difference is Assets.car blowing from 1.1mb to 5.6mb (or 8.6mb if I include all icons settings). Upon examining I've found new liquid glass .icon file duplicating itself multiple times as png variants (any, dark, tinted, etc). Is anyone else experiencing this issue?
2
0
131
3d
SwiftData error: NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
I am using SwiftData for my model. Until Xcode 15 beta 4 I did not have issues. Since beta 5 I am receiving the following red warning multiple times: 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release This seems to be a CoreData warning. However, I am not using CoreData directly. I have no way to change the config of CoreData as used by SwiftData. My model just uses UUID, Int, String, Double, some of them as optionals or Arrays. I only use one attribute (.unique).
8
3
3.3k
3d
Xcode 26.0 Share Extension crashes with NSInternalInconsistencyException on iOS 26.0
Issue : When creating a new project in Xcode 26.0 and adding a Share Extension target without modifying any code, the app crashes upon displaying the extension screen with the following error: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The layout constraints still need update after sending -updateConstraints to <_UINavigationBarTitleControl: 0x105b9cc00; frame = (0 0; 0 0); layer = <CALayer: 0x10b834270>>. _UINavigationBarTitleControl or one of its superclasses may have overridden -updateConstraints without calling super. Or, something may have dirtied layout constraints in the middle of updating them. Both are programming errors.' Environment : Xcode 26.0 iOS 26.0 (physical device) Note: This issue does not occur when running on iOS 18.3.1 (physical device). Temporary Workaround : Adding the following implementation to the isContentValid method prevents the exception from occurring: Objective-C- (BOOL)isContentValid { // Do validation of contentText and/or NSExtensionContext attachments here if (@available(iOS 26, *)) { self.navigationController.navigationBarHidden = YES; } return YES; } Questions : Is there any alternative way to avoid this exception? Since this crash occurs with the default implementation generated by Xcode, is there any plan to fix it in future updates?
4
1
234
3d
Unable to re-enable Xcode Cloud — “opt-out request is being processed” message
Hi everyone, After opting out of Xcode Cloud, I tried to set it up again for my product. However, I’m getting the following message when attempting to reconnect to my source control provider: "Connecting Xcode Cloud with your source control provider was incomplete. Products cannot be configured to use Xcode Cloud while your team’s opt-out request is being processed." It’s been 7 days since I opted out, and I still haven’t been able to re-enable Xcode Cloud. I’ve tried reconnecting both GitHub and Bitbucket, but the same message appears in both cases. I’d like to know: How long does the opt-out (deregistration) process usually take to complete? Is there any way to check the current status or expedite the reactivation process? Team Type: Organization Region: Japan Any insights or similar experiences would be greatly appreciated. Thank you in advance!
2
0
48
4d
Linker nondeterminism (ld_new) involving branch islands
Hi, I'm investigating what looks like possibly nondeterministic behavior when linking large iOS app binaries. I do not have a concise reproduction of the issue yet, but am trying to hunt down possible leads. In particular, the problem appears to surface when invoking clang to link a binary and the resulting order of the 'branch island' instructions appears to be random each time the binary is linked (as shown by the link map output). I was wondering if anyone with insight into the linker's current implementation could shed light on whether that is expected, and if there is anything that can be done to prevent it. FWIW, it seems like it might be size-dependent as smaller app binaries don't appear to exhibit the same behavior. I'd be glad to share more specifics and hopefully a reproduction if I can ever find one eventually. Some environment info (Xcode 16.4 toolchain): clang -v: Apple clang version 17.0.0 (clang-1700.0.13.5) Target: arm64-apple-darwin24.6.0 Thread model: posix InstalledDir: /Applications/Xcode-16.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin ld -v: @(#)PROGRAM:ld PROJECT:ld-1167.5 BUILD 01:45:05 Apr 30 2025 configured to support archs: armv6 armv7 armv7s arm64 arm64e arm64_32 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em will use ld-classic for: armv6 armv7 armv7s i386 armv6m armv7k armv7m armv7em LTO support using: LLVM version 17.0.0 (static support for 29, runtime is 29) TAPI support using: Apple TAPI version 17.0.0 (tapi-1700.0.3.5)
2
0
198
4d
How are Assets removed?
Hello, I'm trying to figure out the behavior of AssetPackManager.shared.remove(assetPackWithID: ). I'm working with MapKit tiles and currently working on trying projecting them correctly which involves serving the AssetPack locally, downloading, checking alignment, and then deleting and changing. My question is that remove(assetPackWithID: ) completes successfully and the asset pack is removed. This is confirmed by trying to remove the AssetPack again which throws an error. However, the asset is still appearing on MapKit after the removal. This is a bit odd as this persists not only with force killing, but also restarting the device. Please advise on how to properly remove an AssetPack. Thank you iPhone 15 Pro Max (iOS 26.0.1) iPhone 17 Pro Max (iOS 26.0.1)
5
1
272
4d
Apple Watch can't always reconnect
Using Xcode to build and deploy the app to my watch, this is what I get: “Waiting to reconnect to Apple Watch. Previous preparation error: Transport error." And then “Connecting to Apple Watch. Xcode will continue when the operation completes.” And these messages continue to switch between each other. Sometimes the watch to connect and the application starts, but more often a scenario occurs with endless reconnection. I'm using: MacOS 14.4.1 (MacBook Pro 2019; 1.4 GHz Quad-Core Intel Core i5), Xcode 15.3, Watch OS 10.2 (Apple Watch SE 1), iOS 17.1.1 (iPhone 15 Pro). Methods I tried: Connecting Macbook, iPhone and Watch to the same WIfi network; Disabling Watch (and IPhone) from the "Devices and Simulators" menu and setting up Watch (and IPhone) from the beginning. Any help?
30
6
4.5k
4d
Failed to verify code signature when trying to install on iPad from XCode
Hi, run into this error today: Failed to verify code signature of /var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.QJh2l0/extracted/MyAwesome.app : 0xe8008015 (A valid provisioning profile for this executable was not found.) Project is an AUv3 app + extension. It builds and install fine on MacOS. It builds on iPad but can't install : that's when the error appears. Regarding provisioning files, I use Automatic manage signing and I can see that the Xcode Managed Profile looks fine an includes my iPad. The only thing I see that differ from other projects is that as an AUv3 project, I have both and App (host) and extension projects. Thus the bundle identifier for this extension project is not the same as it seems I have to use different identifiers. So app bundle id is x.y while extension is x.y.z (same x.y base)) Last but not least the project and IPA can be built fine on XCode Cloud. (Although I can't download the artifacts but it seems it's the same problem for many of us today...) macOS Version 15.4 (Build 24E248) Xcode 16.2 (23507) (Build 16C5032a) Thanks in advance for your help :)
7
0
302
4d
Chooser from Open Quickly missing in Xcode 26?
This whole time I was convinced that Apple just re-bound my favorite keyboard shortcut to something else in Xcode 26 and I just needed to find it and re-bind it, but it looks like they've gotten rid of it altogether and I'm losing my mind. For many years, selecting a type in the Open Quickly menu (Shift-Command-O) and hitting Shift-Option-Enter would bring up a chooser that would let you move a cursor around and select which open pane to open the file in (or create a new pane.) It was so useful and made working in Xcode so fast and it really seems like it's gone for good. Has this behaviour been changed? I don't see it mentioned in "What's New in Xcode 26?"
1
1
43
4d
Clicking on warning to open a file (from script)
I'm running a swift script that is emitting warning lines like this /Users/work/Documents/QuGame/QuGame/BoardTurnView.swift:1:1: warning: [dead-code] Debug-only symbol static SimpleTurn.== infix(SimpleTurn, SimpleTurn) -> Swift.Bool /Users/work/Documents/QuGame/QuGame/DataNotifications+PreviewData.swift:1:1: warning: [dead-code] Debug-only symbol DataNotifications.(addConversation)(to: QUBoardModel, local: GKPlayer, opponent: GKPlayer, texts: [Swift.String]) -> () /Users/work/Documents/QuGame/QuGame/DataNotifications+PreviewData.swift:1:1: warning: [dead-code] Debug-only symbol DataNotifications.loadBlankBoard() -> () These are correctly formatted for Xcode to detect the filename, line and columns. ` Showing Recent Issues [dead-code] Debug-only symbol static SimpleTurn.== infix(SimpleTurn, SimpleTurn) -> Swift.Bool [dead-code] Debug-only symbol DataNotifications.(addConversation)(to: QUBoardModel, local: GKPlayer, opponent: GKPlayer, texts: [Swift.String]) -> () [dead-code] Debug-only symbol DataNotifications.loadBlankBoard() -> () However, when the script is run as part of the post-actions, Xcode doesn't support clicking on the warning to take you to the file. I can map from the .o to the .swift by hunting the project directory (not-sandboxed) If I run the script as part of the Run Script Phase, I cannot back track to find the fully qualified location of the file as I'm sandboxed. All I have is BoardTurnView.o, DataNotiications+PreviewData.o etc. Anyone got any suggestions?
0
1
63
5d
Is it possible to view Xcode output from a scheme's archive post actions's script
In Xcode I've: select Product / Scheme / Edit scheme tap on Archive on the left hand side of the select post actions and + to add a new script Then in there I have added a script I want to run on the archive after its created. I'd like to be able to see the output the script churns out as it goes along but doesn't seem possible? If I just add something like echo "hello" to the start of the script then I don't see "hello" visible anywhere when I build an archive (via Product/Archive). I'm looking in the build navigator. Is there somewhere else to look or is it possible to get the logging into the navigator?
1
1
91
5d