Build, test, and submit your app using Xcode, Apple's integrated development environment.

Posts under Xcode tag

200 Posts

Post

Replies

Boosts

Views

Activity

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
8
5.4k
Oct ’25
Xcode 15's "Replace Container" feature replaces the container with incorrect permissions?
I recently updated to Xcode 15.0 and seem to be encountering permissions related errors after using the Replace Container function to replace an app container. Similarly, editing the current run scheme and choosing a new App Data container fails with an identical error. It seems like the Documents directory and other similar directories are blocked from being able to write. Here is an example of what appears in the log after replacing the container: Failed to create directory /var/mobile/Containers/Data/Application/A3C32E7A-34F3-4C69-B037-478027F2A4AC/Library/Preferences because of 13. Couldn't write values for keys ( "/google/measurement/app_instance_id" ) in CFPrefsPlistSource<0x280a82760> (Domain: com.google.gmp.measurement, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Directory needed os_unix.c:47395: (13) lstat(/private/var/mobile/Containers/Data/Application/A3C32E7A-34F3-4C69-B037-478027F2A4AC/Documents) - Permission denied os_unix.c:47395: (13) lstat(/private/var/mobile/Containers/Data/Application/A3C32E7A-34F3-4C69-B037-478027F2A4AC/Documents/<redacted>.sqlite) - Permission denied os_unix.c:46898: (13) statfs(/private/var/mobile/Containers/Data/Application/A3C32E7A-34F3-4C69-B037-478027F2A4AC/Documents/<redacted>.sqlite) - Permission denied Steps to reproduce: Create a new app and replace -viewDidLoad: with the following. This will write a string to a new file and read that string: NSFileManager * const fileManager = [NSFileManager defaultManager]; NSURL * const documentsDirectoryURL = [[fileManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; if (!documentsDirectoryURL) { [NSException raise:@"DocumentsDirectoryException" format:@"Application documents directory URL is nil"]; } NSURL * const fileURL = [documentsDirectoryURL URLByAppendingPathComponent:@"test.txt"]; if ([fileManager fileExistsAtPath:[fileURL path]]) { NSError *error; if (![[NSFileManager defaultManager] removeItemAtPath:[fileURL path] error:&error]) { [NSException raise:@"DocumentsDirectoryException" format:@"Encountered error removing file: %@",error]; } } NSString * const fileContents = [NSString stringWithFormat:@"Date: %@",[NSDate date]]; NSError *error; if (![[fileContents dataUsingEncoding:NSUTF8StringEncoding] writeToURL:fileURL options:0 error:&error]) { [NSException raise:@"DocumentsDirectoryException" format:@"Encountered error writing to file: %@",error]; } NSString * const writtenFileContents = [[NSString alloc] initWithData:[NSData dataWithContentsOfURL:fileURL] encoding:NSUTF8StringEncoding]; NSLog(@"Written file contents: %@", writtenFileContents); Run the app and observe the log message "Written file contents: ..." Save the app container via Window > Devices & Simulators by clicking the app, clicking the "(...)" button, and then clicking "Download Container..." Use the same procedure in step 3 but instead, click "Replace Container..." and choose the existing app container that was downloaded Run the app again and observe that it fails with the following exception message: *** Terminating app due to uncaught exception 'DocumentsDirectoryException', reason: 'Encountered error writing to file: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “test.txt” in the folder “Documents”." UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/CF1E09C8-7BE2-4D87-8AD2-648AFBE038A5/Documents/test.txt, NSUnderlyingError=0x2831d4d50 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}' Is anyone else encountering this issue and can confirm? Are my next steps to create a bug report? Is there a manner to escalating the bug report? This is a pretty core piece of functionality for QA and testing apps.
30
7
12k
Jun ’24
Xcode 15: "Cycle inside ...; building could produce unreliable results" due to DSTROOT=/
Offering this here for those who may run into the same issue... There is more than one reason you may get the following error message when attempting to build your targets: Cycle inside ...; building could produce unreliable results But if you just switched to Xcode 15 and you are currently customizing DSTROOT to set the root install location for the deliverables (app, bundle, etc) built by your Target, Xcode 15 will refuse to build any target with dependencies on other targets that use the same underlying configuration. There is obviously no real cycle: Xcode 15 is just confused by both targets sharing the same DSTROOT. For example, if you set up your projects with: DSTROOT=/ INSTALL_PATH=/Applications (notice that DSTROOT=/ is even mentioned in the docs) Xcode will wrongfully detect a circular dependency as both targets share the build destination and thus refuse to build. The solution is to not customize DSTROOT, thus allowing it to have a directory name that is target-dependent and thus fairly immune to collisions. Instead, customize the INSTALL_ROOT setting. While this setting does not appear in the Build Phases tab, it defaults to reusing the DSTROOT value. If you set it explicitly, it allows DSTROOT to remain for other purposes, while using the value of INSTALL_ROOT to deploy your deliverables: INSTALL_ROOT=/ INSTALL_PATH=/Applications This allows the build system to proceed without errors.
29
16
42k
Oct ’23
Wrong fonts loaded from Storyboards in Xcode 15
We use Storyboards and custom fonts in our app. Once we started developing new features for iOS 17 and did the first build in Xcode 15, we've noticed that in quite a few places incorrect fonts are set to views. In some places it is incorrect weight, while in other it's completely different font. Some observations: Fonts may change the next time app is build. E.g., instead of SF Pro Display Semibold we got SF Pro Display Heavy, and then after few relaunches it switched to Nunito Bold 😵‍💫 We’ve ensured that correct font is set in Storyboard, and even tried to re-assign it. That didn’t help. All custom fonts are properly added to a target and are registered in info.plist All custom fonts are listed in UIFont.familyNames, so they are indeed registered with the system. Wrong fonts are loaded on both development environment and in TestFlight builds We’ve never experienced anything similar before Xcode 15 What we've tried: Re-assigning fonts in Storyboard. Creating new Storyboard in Xcode 15 and copying screens into it. I wonder if anybody else having similar issues and maybe knows the workaround. Thank you. P.S. I've filed a Feedback to Apple: FB12903371
29
22
12k
Aug ’24
Xcode 15 linking error
Hi, I am getting a linking error when building my app to run against an iOS17 device, using Xcode15. Same project builds and runs fine with Xcode 14 and iOS16. The linking error just says: clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal (use -v to see invocation) Not sure what I should try to overcome this. I can't run my app on an iOS17 device. It builds, links and runs just fine on a simulator.
29
17
30k
Oct ’23
Xcode 26.4: IBOutlets/IBActions gutter circles missing — cannot connect storyboard to code (works in 26.3)
I’m seeing a regression in Xcode 26.4 where Interface Builder will not allow connecting IBOutlets or IBActions. Symptoms: The usual gutter circle/dot does not appear next to IBOutlet / IBAction in the code editor Because of this, I cannot: drag from storyboard → code drag from code → storyboard The class is valid and already connected to the storyboard (existing outlets work) Assistant Editor opens the correct view controller file Important: The exact same project, unchanged, works perfectly in Xcode 26.3. I can create and connect outlets/actions normally there. ⸻ Environment Xcode: 26.4 macOS: 26.4 Mac Mini M4 Pro 64G Ram Project: Objective-C UIKit app using Storyboards This is a long-running, ObjC, project (not newly created) ⸻ What I’ve already tried To rule out the usual suspects: Verified View Controller Custom Class is correctly set in Identity Inspector Verified files are in the correct Target Membership Verified outlets are declared correctly in the .h file: @property (weak, nonatomic) IBOutlet UILabel *exampleLabel; Opened correct file manually (not relying on Automatic Assistant) Tried both: storyboard → code drag code → storyboard drag Tried using Connections Inspector Clean Build Folder Deleted entire DerivedData Restarted Xcode Updated macOS to 26.4 Ran: sudo xcodebuild -runFirstLaunch Confirmed required platform components installed Reopened project fresh ⸻ Observations In Xcode 26.4 the outlet “connection circles” are completely missing In Xcode 26.3 they appear immediately for the same code Existing connections still function at runtime — this is purely an Interface Builder issue ⸻ Question The gutter circles appearance has always been flaky in Xcode over the 13+ years I've been using it but now with 26.4 they have completely disappeared. Has anyone else seen this in Xcode 26.4, or found a workaround? At this point it looks like a regression in Interface Builder, but I haven’t found any mention of it yet.
29
12
3.2k
1w
Project Won't Build with .h File
This morning my xCode project stopped building. I'm using XCode 14.2 and Mac OS 12.6.6. A .h file has been in the project for years and the project has been built hundreds of times with this file. Today XCode stopped building the project with two errors; The .h C header file has only this: #include <stdio.h> void func(char *foo, char *bar); XCode reports an error: Expected identifier or '(' with the underscore unuder the void return type. Obviously this is a spurious error. Also the analyzer reports: header 'headerfilename.h' is not a member of any targets in the current scheme that build for running. XCode shows that this is in the project in the Identity and Type pane. The project shows this in the pane but with header files the check box is not checked - only .c and .m files, so this is apparently a spurious error as well. This is weird because I didn't do anything to change this. Also there are a lot of other .h files in the project that are used. In, order to fix this I have cleared the build folder and rebuilt the project. removed the .h file from the project and built the project, then added it and built it with the .h file in the project. In Identity and Type info pane the .h file shows Target Membership in the project. I removed the whole group with the file and added it again being sure to check the box for target membership but it still won't build this .h file. Other files are added to the group but not this one. I have experienced a lesser version of this before with .h files but after building the project a couple of times XCode fixed itself. Not this time. XCode got up this morning on the wrong side of the bed and it decided it won't build with this header and I can't add it to the project. Any suggestions?
29
0
7.4k
Jul ’23
Xcode 14.3: App built is not able to open on iOS 13.6
When building app with Xcode 14.3, I can't open the app. It works fine with Xcode 14.2. Here is the log: Assertion failed: (gotLocation), function applyFixupsToImage_block_invoke_3, file /Library/Caches/com.apple.xbs/Sources/dyld/dyld-750.4.2/dyld3/Loading.cpp, line 779. dyld: Assertion failed: (gotLocation), function applyFixupsToImage_block_invoke_3, file /Library/Caches/com.apple.xbs/Sources/dyld/dyld-750.4.2/dyld3/Loading.cpp, line 779. Environment: iOS 13.5.1 or 13.6.1 (we received report from these 2 version) Device: iPhone 7 Plus (received 2 reports only come from this device). Screen recording: https://youtu.be/Qmmo2NjRcBY And by the way, this list on 14.3 is not showing enough simulators.
29
11
14k
Oct ’23
Unusual errors in xcodebuild
I am getting the following errors when running xcodebuild from the command line: xcodebuild[22187:279813] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore xcodebuild[22187:279813] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore What does this mean, and how do I fix it?
29
9
73k
Sep ’22
App build with Xcode 14.3 crash on launch
Build for release Xcode version 14.3 launch on iOS 13.6 log {"app_cohort":"2|date=1680174000000&sf=143441&tid=e41c65db43313258cf184d5608cdcc841480dcd8fe87718b212f9c3f10d6f146&ttype=i","app_name":"myApp","app_version":"1.10.0","timestamp":"2023-03-30 19:24:36.00 +0800","slice_uuid":"7a485574-1c6d-307d-b432-48a794dace50","adam_id":1039749242,"build_version":"2303301","bundleID":"com.myApp","share_with_app_devs":0,"is_first_party":0,"bug_type":"109","os_version":"iPhone OS 13.6 (17G68)","incident_id":"937E7410-DD2F-4494-BF73-AC0EEFFA0A0B","name":"myApp","is_beta":1} Incident Identifier: 937E7410-DD2F-4494-BF73-AC0EEFFA0A0B Beta Identifier: 8D1CE473-6B17-4B99-9780-8D7C94C9A2F9 Hardware Model: iPhone8,1 Process: myApp [2748] Path: /private/var/containers/Bundle/Application/46C86A3C-40BF-4E81-AA72-7DCE695E9CEA/myApp.app/myApp Identifier: com.myApp Version: 2303301 (1.10.0) AppStoreTools: 14E221 AppVariant: 1:iPhone8,1:13 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.myApp [803] Date/Time: 2023-03-30 19:24:36.7597 +0800 Launch Time: 2023-03-30 19:24:35.6722 +0800 OS Version: iPhone OS 13.6 (17G68) Release Type: User Baseband Version: 7.70.01 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Assertion failed: (gotLocation), function applyFixupsToImage_block_invoke_3, file /Library/Caches/com.apple.xbs/Sources/dyld/dyld-750.4.2/dyld3/Loading.cpp, line 779. Highlighted by Thread: 0 Backtrace not available Unknown thread crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000009 x2: 0x000000016efa3f10 x3: 0x0000000000000014 x4: 0x000000016efa3b10 x5: 0x0000000000000000 x6: 0x000000016efa4890 x7: 0x000000016efa49a8 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x2e342e3035372d64 x11: 0x2f33646c79642f32 x12: 0x2f33646c79642f32 x13: 0x2e676e6964616f4c x14: 0x6e696c202c707063 x15: 0x000a2e3937372065 x16: 0x0000000000000209 x17: 0x0000000000000053 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016efa3b10 x21: 0x0000000000000014 x22: 0x000000016efa3f10 x23: 0x0000000000000009 x24: 0x0000000000000006 x25: 0x0000000000008fa4 x26: 0x00000000000072dd x27: 0x00000001033c1934 x28: 0x0000000001f27380 fp: 0x000000016efa3ae0 lr: 0x00000001032d3ee8 sp: 0x000000016efa3aa0 pc: 0x00000001032ccf68 cpsr: 0x40000000 esr: 0x00000000 Address size fault Binary images description not available Error Formulating Crash Report: Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯ EOF
28
22
13k
May ’23
Xcode Canvas Simulator cause multiple diagnosticd processes to run and 100% CPU
The Xcode Canvas Simulator (for Xcode 14 and even 15 ..beta 6) cause multiple springboard and diagnosticd processes to run at nearly 100% CPU , cause the MacBook M1 to heat. This happens every time. This is usually triggered after the Canvas show an error which live previewing the code as I edit it. I have tried clearing the derived data but it doesn't seem to help. This happens with all projects. I am unable to use live previews because of this issue. The are often other processes with the string Poster in them. Like PhotosPosterProvider , CollectionsPoster , ExtragalacticPoster running high on usage at the same time.
28
20
7.4k
Dec ’23
Build can't be Submitted App Store Connect Error
When I try to submit a build to a public TestFlihgt Group, I get the following error: This build is using a beta version of Xcode and can’t be submitted. Make sure you’re using the latest version of Xcode or the latest seed release found on the releases tab in News and Updates Adding new builds was working fine earlier today, about 5 hours ago. I am not using a beta version of Xcode, just the latest version downloaded from the App Store, version 15.0.1 (15A507). Also, this is not the first build of this group, as I have added many builds to this group before, even a few hours before this error with the same hardware and software configuration. I am using a MacBook Pro M2 Pro, running macOS Ventura 14.1 (23B74).
28
12
6.2k
Nov ’23
Apple Watch (waiting for first unlock) in Xcode
I'm continuously getting this message in Xcode and I can't run my app on my Apple Watch. I'm running the latest versions of everything. I have tried to restart my Mac, my iPhone, my Watch. I tried to unpair and pair it back. Nothing is working. I also updated Xcode to 14.0.1 RC and that didn't help. How can I get this working? We're unable to do any work on our Watch App without this working. Thanks
28
13
17k
Jun ’23
Share extension - App not showing in share menu on first attempt since iOS 14
Something weird seems to start happening after upgrade to Xcode 12 and iOS 14. App use to show fine in share menu option before, but suddenly it is acting weirdly and only showing on second attempt onwards. My aim is to get web page url. Here's my share activation rule. <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <dict> <key>NSExtensionActivationSupportsText</key> <true/> <key>NSExtensionActivationSupportsWebPageWithMaxCount</key> <integer>1</integer> <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> <integer>1</integer> </dict> <key>NSExtensionJavaScriptPreprocessingFile</key> <string>fetch</string> </dict> <key>NSExtensionMainStoryboard</key> <string>MainInterface</string> <key>NSExtensionPointIdentifier</key> <string>com.apple.share-services</string> </dict> I have even tried on new project and added share extension with activation rule above. It also does the same, and app only show in share option from second time onwards. This issue mainly happening in Safari. It used to work fine before iOS 14, i also didn't find anything in iOS 14 change log regarding share extension that can cause the issue. Can anyone help me pointing out where it could be wrong or some possible reason. Thanks in advance!!!
28
0
24k
Aug ’21
XCode 7.1 Slow to Install on MacBook
Computer: 12" MacBook 1.3 GHz (512 GB SSD).OS: OSX 10.11.1Tick Tock:1825 Turned ok Macbook for first time.1830 Installed Pages, Numbers, Keynote, OSX El Capitan Update. Setup FileVault for Full Disk Encrpytion.1900 Went to meeting, used Notes.2000 Came back from meeting.2100 Installed Sublime Text 3, Homebrew (XCode Command Line Tools).2200 Installed dot files, but did not compleate (took forever, ironic).2300 Watched end of Mets game.0000 Battery at 30% plugged into wall charger to recharge.0006 Started Download of XCode 7.1 from App Store.0010 Download Complete0200 Started Writing this.0210 Still not installed.Now I understand that these CPUs are terminally limited, and that they will underclock under heavy sustained load. That effect seems to be compounded with charging the device while using it's CPU intensivly. But over 2 hours to extract and install XCode 7.1 is insane. Progress is being made on the install, the bar moves slowly, very slowly towards the right of the screen. But it's still pretty crazy that it's taking this long.
37
1
63k
Apr ’23
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?
Replies
30
Boosts
8
Views
5.4k
Activity
Oct ’25
This method should not be called on the main thread as it may lead to UI unresponsiveness.
I have the same problem with the main function
Replies
30
Boosts
9
Views
32k
Activity
Mar ’24
Xcode 13 Beta 5 stuck on "Making iPhone ready for development" with iOS 15 Beta 5 iPhone
Xcode 13 Beta 5 stuck on "Making iPhone ready for development" with iOS 15 Beta 5 iPhone, won't start installing & debugging code on the device. Waited for about 1 hour, still same. Tried restoring the iPhone with 15B5 IPSW, or restoring to 14.7.1 then updating to 15B5, both did not work. Anybody has this same issue?
Replies
30
Boosts
1
Views
14k
Activity
Mar ’23
Xcode 15's "Replace Container" feature replaces the container with incorrect permissions?
I recently updated to Xcode 15.0 and seem to be encountering permissions related errors after using the Replace Container function to replace an app container. Similarly, editing the current run scheme and choosing a new App Data container fails with an identical error. It seems like the Documents directory and other similar directories are blocked from being able to write. Here is an example of what appears in the log after replacing the container: Failed to create directory /var/mobile/Containers/Data/Application/A3C32E7A-34F3-4C69-B037-478027F2A4AC/Library/Preferences because of 13. Couldn't write values for keys ( "/google/measurement/app_instance_id" ) in CFPrefsPlistSource&lt;0x280a82760&gt; (Domain: com.google.gmp.measurement, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Directory needed os_unix.c:47395: (13) lstat(/private/var/mobile/Containers/Data/Application/A3C32E7A-34F3-4C69-B037-478027F2A4AC/Documents) - Permission denied os_unix.c:47395: (13) lstat(/private/var/mobile/Containers/Data/Application/A3C32E7A-34F3-4C69-B037-478027F2A4AC/Documents/&lt;redacted&gt;.sqlite) - Permission denied os_unix.c:46898: (13) statfs(/private/var/mobile/Containers/Data/Application/A3C32E7A-34F3-4C69-B037-478027F2A4AC/Documents/&lt;redacted&gt;.sqlite) - Permission denied Steps to reproduce: Create a new app and replace -viewDidLoad: with the following. This will write a string to a new file and read that string: NSFileManager * const fileManager = [NSFileManager defaultManager]; NSURL * const documentsDirectoryURL = [[fileManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject]; if (!documentsDirectoryURL) { [NSException raise:@"DocumentsDirectoryException" format:@"Application documents directory URL is nil"]; } NSURL * const fileURL = [documentsDirectoryURL URLByAppendingPathComponent:@"test.txt"]; if ([fileManager fileExistsAtPath:[fileURL path]]) { NSError *error; if (![[NSFileManager defaultManager] removeItemAtPath:[fileURL path] error:&amp;error]) { [NSException raise:@"DocumentsDirectoryException" format:@"Encountered error removing file: %@",error]; } } NSString * const fileContents = [NSString stringWithFormat:@"Date: %@",[NSDate date]]; NSError *error; if (![[fileContents dataUsingEncoding:NSUTF8StringEncoding] writeToURL:fileURL options:0 error:&amp;error]) { [NSException raise:@"DocumentsDirectoryException" format:@"Encountered error writing to file: %@",error]; } NSString * const writtenFileContents = [[NSString alloc] initWithData:[NSData dataWithContentsOfURL:fileURL] encoding:NSUTF8StringEncoding]; NSLog(@"Written file contents: %@", writtenFileContents); Run the app and observe the log message "Written file contents: ..." Save the app container via Window &gt; Devices &amp; Simulators by clicking the app, clicking the "(...)" button, and then clicking "Download Container..." Use the same procedure in step 3 but instead, click "Replace Container..." and choose the existing app container that was downloaded Run the app again and observe that it fails with the following exception message: *** Terminating app due to uncaught exception 'DocumentsDirectoryException', reason: 'Encountered error writing to file: Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “test.txt” in the folder “Documents”." UserInfo={NSFilePath=/var/mobile/Containers/Data/Application/CF1E09C8-7BE2-4D87-8AD2-648AFBE038A5/Documents/test.txt, NSUnderlyingError=0x2831d4d50 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}' Is anyone else encountering this issue and can confirm? Are my next steps to create a bug report? Is there a manner to escalating the bug report? This is a pretty core piece of functionality for QA and testing apps.
Replies
30
Boosts
7
Views
12k
Activity
Jun ’24
Preview crashes consistency in Xcode 16 beta
In the first Xcode 16 beta, none of my SwiftUI previews work - they all just crash on start up. Has anybody run into this and found a workaround? Have tried all the usual steps of cleaning the project/restarting Xcode.
Replies
30
Boosts
14
Views
13k
Activity
Mar ’26
Xcode 15: "Cycle inside ...; building could produce unreliable results" due to DSTROOT=/
Offering this here for those who may run into the same issue... There is more than one reason you may get the following error message when attempting to build your targets: Cycle inside ...; building could produce unreliable results But if you just switched to Xcode 15 and you are currently customizing DSTROOT to set the root install location for the deliverables (app, bundle, etc) built by your Target, Xcode 15 will refuse to build any target with dependencies on other targets that use the same underlying configuration. There is obviously no real cycle: Xcode 15 is just confused by both targets sharing the same DSTROOT. For example, if you set up your projects with: DSTROOT=/ INSTALL_PATH=/Applications (notice that DSTROOT=/ is even mentioned in the docs) Xcode will wrongfully detect a circular dependency as both targets share the build destination and thus refuse to build. The solution is to not customize DSTROOT, thus allowing it to have a directory name that is target-dependent and thus fairly immune to collisions. Instead, customize the INSTALL_ROOT setting. While this setting does not appear in the Build Phases tab, it defaults to reusing the DSTROOT value. If you set it explicitly, it allows DSTROOT to remain for other purposes, while using the value of INSTALL_ROOT to deploy your deliverables: INSTALL_ROOT=/ INSTALL_PATH=/Applications This allows the build system to proceed without errors.
Replies
29
Boosts
16
Views
42k
Activity
Oct ’23
Wrong fonts loaded from Storyboards in Xcode 15
We use Storyboards and custom fonts in our app. Once we started developing new features for iOS 17 and did the first build in Xcode 15, we've noticed that in quite a few places incorrect fonts are set to views. In some places it is incorrect weight, while in other it's completely different font. Some observations: Fonts may change the next time app is build. E.g., instead of SF Pro Display Semibold we got SF Pro Display Heavy, and then after few relaunches it switched to Nunito Bold 😵‍💫 We’ve ensured that correct font is set in Storyboard, and even tried to re-assign it. That didn’t help. All custom fonts are properly added to a target and are registered in info.plist All custom fonts are listed in UIFont.familyNames, so they are indeed registered with the system. Wrong fonts are loaded on both development environment and in TestFlight builds We’ve never experienced anything similar before Xcode 15 What we've tried: Re-assigning fonts in Storyboard. Creating new Storyboard in Xcode 15 and copying screens into it. I wonder if anybody else having similar issues and maybe knows the workaround. Thank you. P.S. I've filed a Feedback to Apple: FB12903371
Replies
29
Boosts
22
Views
12k
Activity
Aug ’24
Xcode 15 linking error
Hi, I am getting a linking error when building my app to run against an iOS17 device, using Xcode15. Same project builds and runs fine with Xcode 14 and iOS16. The linking error just says: clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal (use -v to see invocation) Not sure what I should try to overcome this. I can't run my app on an iOS17 device. It builds, links and runs just fine on a simulator.
Replies
29
Boosts
17
Views
30k
Activity
Oct ’23
Xcode 26.4: IBOutlets/IBActions gutter circles missing — cannot connect storyboard to code (works in 26.3)
I’m seeing a regression in Xcode 26.4 where Interface Builder will not allow connecting IBOutlets or IBActions. Symptoms: The usual gutter circle/dot does not appear next to IBOutlet / IBAction in the code editor Because of this, I cannot: drag from storyboard → code drag from code → storyboard The class is valid and already connected to the storyboard (existing outlets work) Assistant Editor opens the correct view controller file Important: The exact same project, unchanged, works perfectly in Xcode 26.3. I can create and connect outlets/actions normally there. ⸻ Environment Xcode: 26.4 macOS: 26.4 Mac Mini M4 Pro 64G Ram Project: Objective-C UIKit app using Storyboards This is a long-running, ObjC, project (not newly created) ⸻ What I’ve already tried To rule out the usual suspects: Verified View Controller Custom Class is correctly set in Identity Inspector Verified files are in the correct Target Membership Verified outlets are declared correctly in the .h file: @property (weak, nonatomic) IBOutlet UILabel *exampleLabel; Opened correct file manually (not relying on Automatic Assistant) Tried both: storyboard → code drag code → storyboard drag Tried using Connections Inspector Clean Build Folder Deleted entire DerivedData Restarted Xcode Updated macOS to 26.4 Ran: sudo xcodebuild -runFirstLaunch Confirmed required platform components installed Reopened project fresh ⸻ Observations In Xcode 26.4 the outlet “connection circles” are completely missing In Xcode 26.3 they appear immediately for the same code Existing connections still function at runtime — this is purely an Interface Builder issue ⸻ Question The gutter circles appearance has always been flaky in Xcode over the 13+ years I've been using it but now with 26.4 they have completely disappeared. Has anyone else seen this in Xcode 26.4, or found a workaround? At this point it looks like a regression in Interface Builder, but I haven’t found any mention of it yet.
Replies
29
Boosts
12
Views
3.2k
Activity
1w
Project Won't Build with .h File
This morning my xCode project stopped building. I'm using XCode 14.2 and Mac OS 12.6.6. A .h file has been in the project for years and the project has been built hundreds of times with this file. Today XCode stopped building the project with two errors; The .h C header file has only this: #include <stdio.h> void func(char *foo, char *bar); XCode reports an error: Expected identifier or '(' with the underscore unuder the void return type. Obviously this is a spurious error. Also the analyzer reports: header 'headerfilename.h' is not a member of any targets in the current scheme that build for running. XCode shows that this is in the project in the Identity and Type pane. The project shows this in the pane but with header files the check box is not checked - only .c and .m files, so this is apparently a spurious error as well. This is weird because I didn't do anything to change this. Also there are a lot of other .h files in the project that are used. In, order to fix this I have cleared the build folder and rebuilt the project. removed the .h file from the project and built the project, then added it and built it with the .h file in the project. In Identity and Type info pane the .h file shows Target Membership in the project. I removed the whole group with the file and added it again being sure to check the box for target membership but it still won't build this .h file. Other files are added to the group but not this one. I have experienced a lesser version of this before with .h files but after building the project a couple of times XCode fixed itself. Not this time. XCode got up this morning on the wrong side of the bed and it decided it won't build with this header and I can't add it to the project. Any suggestions?
Replies
29
Boosts
0
Views
7.4k
Activity
Jul ’23
Xcode 14.3: App built is not able to open on iOS 13.6
When building app with Xcode 14.3, I can't open the app. It works fine with Xcode 14.2. Here is the log: Assertion failed: (gotLocation), function applyFixupsToImage_block_invoke_3, file /Library/Caches/com.apple.xbs/Sources/dyld/dyld-750.4.2/dyld3/Loading.cpp, line 779. dyld: Assertion failed: (gotLocation), function applyFixupsToImage_block_invoke_3, file /Library/Caches/com.apple.xbs/Sources/dyld/dyld-750.4.2/dyld3/Loading.cpp, line 779. Environment: iOS 13.5.1 or 13.6.1 (we received report from these 2 version) Device: iPhone 7 Plus (received 2 reports only come from this device). Screen recording: https://youtu.be/Qmmo2NjRcBY And by the way, this list on 14.3 is not showing enough simulators.
Replies
29
Boosts
11
Views
14k
Activity
Oct ’23
Unusual errors in xcodebuild
I am getting the following errors when running xcodebuild from the command line: xcodebuild[22187:279813] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore xcodebuild[22187:279813] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore What does this mean, and how do I fix it?
Replies
29
Boosts
9
Views
73k
Activity
Sep ’22
App build with Xcode 14.3 crash on launch
Build for release Xcode version 14.3 launch on iOS 13.6 log {"app_cohort":"2|date=1680174000000&sf=143441&tid=e41c65db43313258cf184d5608cdcc841480dcd8fe87718b212f9c3f10d6f146&ttype=i","app_name":"myApp","app_version":"1.10.0","timestamp":"2023-03-30 19:24:36.00 +0800","slice_uuid":"7a485574-1c6d-307d-b432-48a794dace50","adam_id":1039749242,"build_version":"2303301","bundleID":"com.myApp","share_with_app_devs":0,"is_first_party":0,"bug_type":"109","os_version":"iPhone OS 13.6 (17G68)","incident_id":"937E7410-DD2F-4494-BF73-AC0EEFFA0A0B","name":"myApp","is_beta":1} Incident Identifier: 937E7410-DD2F-4494-BF73-AC0EEFFA0A0B Beta Identifier: 8D1CE473-6B17-4B99-9780-8D7C94C9A2F9 Hardware Model: iPhone8,1 Process: myApp [2748] Path: /private/var/containers/Bundle/Application/46C86A3C-40BF-4E81-AA72-7DCE695E9CEA/myApp.app/myApp Identifier: com.myApp Version: 2303301 (1.10.0) AppStoreTools: 14E221 AppVariant: 1:iPhone8,1:13 Beta: YES Code Type: ARM-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.myApp [803] Date/Time: 2023-03-30 19:24:36.7597 +0800 Launch Time: 2023-03-30 19:24:35.6722 +0800 OS Version: iPhone OS 13.6 (17G68) Release Type: User Baseband Version: 7.70.01 Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Description: DYLD, Assertion failed: (gotLocation), function applyFixupsToImage_block_invoke_3, file /Library/Caches/com.apple.xbs/Sources/dyld/dyld-750.4.2/dyld3/Loading.cpp, line 779. Highlighted by Thread: 0 Backtrace not available Unknown thread crashed with ARM Thread State (64-bit): x0: 0x0000000000000006 x1: 0x0000000000000009 x2: 0x000000016efa3f10 x3: 0x0000000000000014 x4: 0x000000016efa3b10 x5: 0x0000000000000000 x6: 0x000000016efa4890 x7: 0x000000016efa49a8 x8: 0x0000000000000020 x9: 0x0000000000000009 x10: 0x2e342e3035372d64 x11: 0x2f33646c79642f32 x12: 0x2f33646c79642f32 x13: 0x2e676e6964616f4c x14: 0x6e696c202c707063 x15: 0x000a2e3937372065 x16: 0x0000000000000209 x17: 0x0000000000000053 x18: 0x0000000000000000 x19: 0x0000000000000000 x20: 0x000000016efa3b10 x21: 0x0000000000000014 x22: 0x000000016efa3f10 x23: 0x0000000000000009 x24: 0x0000000000000006 x25: 0x0000000000008fa4 x26: 0x00000000000072dd x27: 0x00000001033c1934 x28: 0x0000000001f27380 fp: 0x000000016efa3ae0 lr: 0x00000001032d3ee8 sp: 0x000000016efa3aa0 pc: 0x00000001032ccf68 cpsr: 0x40000000 esr: 0x00000000 Address size fault Binary images description not available Error Formulating Crash Report: Failed to create CSSymbolicatorRef - corpse still valid ¯\_(ツ)_/¯ EOF
Replies
28
Boosts
22
Views
13k
Activity
May ’23
Xcode Canvas Simulator cause multiple diagnosticd processes to run and 100% CPU
The Xcode Canvas Simulator (for Xcode 14 and even 15 ..beta 6) cause multiple springboard and diagnosticd processes to run at nearly 100% CPU , cause the MacBook M1 to heat. This happens every time. This is usually triggered after the Canvas show an error which live previewing the code as I edit it. I have tried clearing the derived data but it doesn't seem to help. This happens with all projects. I am unable to use live previews because of this issue. The are often other processes with the string Poster in them. Like PhotosPosterProvider , CollectionsPoster , ExtragalacticPoster running high on usage at the same time.
Replies
28
Boosts
20
Views
7.4k
Activity
Dec ’23
Build can't be Submitted App Store Connect Error
When I try to submit a build to a public TestFlihgt Group, I get the following error: This build is using a beta version of Xcode and can’t be submitted. Make sure you’re using the latest version of Xcode or the latest seed release found on the releases tab in News and Updates Adding new builds was working fine earlier today, about 5 hours ago. I am not using a beta version of Xcode, just the latest version downloaded from the App Store, version 15.0.1 (15A507). Also, this is not the first build of this group, as I have added many builds to this group before, even a few hours before this error with the same hardware and software configuration. I am using a MacBook Pro M2 Pro, running macOS Ventura 14.1 (23B74).
Replies
28
Boosts
12
Views
6.2k
Activity
Nov ’23
Simulator beta 15 is too slow
I installed Xcode 15 beta 5 as well as the simulator, the iOS simulator runs very very slow, it takes nearly 30 mins to start the device, and after it's started, it's very lag, can anyone help?
Replies
28
Boosts
23
Views
15k
Activity
Dec ’23
Apple Watch (waiting for first unlock) in Xcode
I'm continuously getting this message in Xcode and I can't run my app on my Apple Watch. I'm running the latest versions of everything. I have tried to restart my Mac, my iPhone, my Watch. I tried to unpair and pair it back. Nothing is working. I also updated Xcode to 14.0.1 RC and that didn't help. How can I get this working? We're unable to do any work on our Watch App without this working. Thanks
Replies
28
Boosts
13
Views
17k
Activity
Jun ’23
Share extension - App not showing in share menu on first attempt since iOS 14
Something weird seems to start happening after upgrade to Xcode 12 and iOS 14. App use to show fine in share menu option before, but suddenly it is acting weirdly and only showing on second attempt onwards. My aim is to get web page url. Here's my share activation rule. <key>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>NSExtensionActivationRule</key> <dict> <key>NSExtensionActivationSupportsText</key> <true/> <key>NSExtensionActivationSupportsWebPageWithMaxCount</key> <integer>1</integer> <key>NSExtensionActivationSupportsWebURLWithMaxCount</key> <integer>1</integer> </dict> <key>NSExtensionJavaScriptPreprocessingFile</key> <string>fetch</string> </dict> <key>NSExtensionMainStoryboard</key> <string>MainInterface</string> <key>NSExtensionPointIdentifier</key> <string>com.apple.share-services</string> </dict> I have even tried on new project and added share extension with activation rule above. It also does the same, and app only show in share option from second time onwards. This issue mainly happening in Safari. It used to work fine before iOS 14, i also didn't find anything in iOS 14 change log regarding share extension that can cause the issue. Can anyone help me pointing out where it could be wrong or some possible reason. Thanks in advance!!!
Replies
28
Boosts
0
Views
24k
Activity
Aug ’21
Xcode Simulator m1 - can't pick images
Hi, can anybody confirm that there are a problem with the image picker on Xcode 12.4 / Sim 12.4 on the new apple silicon MacBook m1? Best, Dominik
Replies
28
Boosts
2
Views
20k
Activity
Jul ’22
XCode 7.1 Slow to Install on MacBook
Computer: 12" MacBook 1.3 GHz (512 GB SSD).OS: OSX 10.11.1Tick Tock:1825 Turned ok Macbook for first time.1830 Installed Pages, Numbers, Keynote, OSX El Capitan Update. Setup FileVault for Full Disk Encrpytion.1900 Went to meeting, used Notes.2000 Came back from meeting.2100 Installed Sublime Text 3, Homebrew (XCode Command Line Tools).2200 Installed dot files, but did not compleate (took forever, ironic).2300 Watched end of Mets game.0000 Battery at 30% plugged into wall charger to recharge.0006 Started Download of XCode 7.1 from App Store.0010 Download Complete0200 Started Writing this.0210 Still not installed.Now I understand that these CPUs are terminally limited, and that they will underclock under heavy sustained load. That effect seems to be compounded with charging the device while using it's CPU intensivly. But over 2 hours to extract and install XCode 7.1 is insane. Progress is being made on the install, the bar moves slowly, very slowly towards the right of the screen. But it's still pretty crazy that it's taking this long.
Replies
37
Boosts
1
Views
63k
Activity
Apr ’23