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

Xcode Documentation

Posts under Xcode tag

3,451 Posts
Sort by:
Post not yet marked as solved
7 Replies
16k Views
Hi I bought the new MacBook Air m1 and install Xcode 12 on that and I try to run my React Native project on that but I could run normally on intel base MacBook (my old macbook). I face with some error in my new MacBook. I see this errors: 1- building for iOS Simulator, but linking in object file built for iOS, file '/Users/hosein/Desktop/sporty-app/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64 I fixed this with adding the arm64 on Excluded Architectures 2- module map file '/Users/hosein/Library/Developer/Xcode/DerivedData/Sporty-ficshtjjzxcsgkaohfxowaxpyivr/Build/Products/Debug-iphonesimulator/YogaKit/YogaKit.modulemap' not found I get number 2 when I want run app on simulator but when I run on real device I don't have any errors. How can I fix this error (number 2)? Note: I am running the xxxx.xcworkspace and my target iOS version in pod and general in Xcode is 10.0
Posted
by xrois.
Last updated
.
Post marked as solved
3 Replies
91 Views
I have no idea how to solve this. I am not using many local variables, yet I am hitting the 512 KiB stack size limit for secondary threads. My app has already been close to hitting this, now it's definitely hitting it. How the heck do I trace this down? Instruments has nothing about stack memory usage.
Posted
by kode54.
Last updated
.
Post not yet marked as solved
0 Replies
53 Views
Hi there, Working on my first game project and I'm really at a loss here. I have Unity Ads installed in my mobile game project and it works perfectly fine in Unity and if I directly upload a build from Xcode to my iPhone. If I try to Archive the build in Xcode and load it for Distribution on the App Store, all of the Ads don't play. I'm not sure how to see if TestFlight is throwing any errors with regards to the Ads, but everything else in the game works perfectly fine including IAPs. I'd greatly appreciate any suggestions, guidance, or just outright instructions. Thanks so much in advance!
Posted
by Mansdferg.
Last updated
.
Post not yet marked as solved
6 Replies
738 Views
I have not been able to upload my app to App Store Connect using Xcode 13.2.1 for the past few hours. Steps to reproduce the problem: Windows > Organizer > Distribute App > App Store Connect > Upload I have tried to repeat the process multiple times. Xcode would return different errors on each attempt: Error Fetching App Record: App record request failed with error: "Unexpected Status Code" App Store Connect Operation Error: Unable to authenticate
Posted Last updated
.
Post not yet marked as solved
13 Replies
17k Views
After I updated to Mac OS Catalina I'm no more able to run the simulator. I always get this: "Unable to boot the Simulator - launchd failed to respond".I'm runningMac OS 10.15 CatalinaXcode 10.3I can't update to Xcode 11 (anyway my collegue installed Xcode 11 and he's getting the same error too)I already try these:- Simulator/Hardware/Erase all contents and services... (the result was a black screen on simulator and nothing happened)- Delete all simulators and download them again- /private/tmp directorysudo mkdir /private/tmp sudo chmod 1777 /private/tmp- I tried thisxcrun simctl shutdown all xcrun simctl delete $(xcrun simctl list | grep -o '[0-9A-F]\{8\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{4\}-[0-9A-F]\{12\}' | xargs) xcrun simctl delete unavailableNothing seems working... The simulator looks working in the morning, than after few builds it stop working.Ideas?
Posted
by luca.davi.
Last updated
.
Post not yet marked as solved
4 Replies
307 Views
When I generate an xctestrun file using Xcode 14 with: xcodebuild build-for-testing -project UITestTesting.xcodeproj -scheme UITestTesting -destination 'id=00008020-000545362EE1002E' -derivedDataPath ./build I'm able to see the xctestrun file at "/Users/noahmartin/Desktop/UITestTesting/Build/Build/Products/UITestTesting_iphoneos16.0-arm64.xctestrun" However, I can't use it to run tests on my iOS 16 iPad. I'm trying to invoke the test like this: xcodebuild test-without-building -xctestrun "/Users/noahmartin/Desktop/UITestTesting/Build/Build/Products/UITestTesting_iphoneos16.0-arm64.xctestrun " -destination 'id=00008020-000545362EE1002E' -derivedDataPath ./build And getting this error: xcodebuild: error: Unable to find a destination matching the provided destination specifier: { id:00008020-000545362EE1002E } Available destinations for the "Transient Testing" scheme: { platform:macOS, arch:arm64e, id:00006001-0012198A0102801E } { platform:macOS, arch:arm64, id:00006001-0012198A0102801E } { platform:macOS, arch:x86_64, id:00006001-0012198A0102801E } { platform:macOS, arch:arm64e, variant:Mac Catalyst, id:00006001-0012198A0102801E } { platform:macOS, arch:arm64, variant:Mac Catalyst, id:00006001-0012198A0102801E } { platform:macOS, arch:x86_64, variant:Mac Catalyst, id:00006001-0012198A0102801E } { platform:macOS, arch:arm64e, variant:DriverKit, id:00006001-0012198A0102801E } { platform:macOS, arch:arm64, variant:DriverKit, id:00006001-0012198A0102801E } { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006001-0012198A0102801E } { platform:iOS Simulator, id:3113F5B7-7358-4ADE-9660-667872D113A7, OS:16.0, name:iPad (9th generation) } { platform:iOS Simulator, id:D7232872-AC19-4DF1-BF18-D23C2C2A5BFE, OS:16.0, name:iPad Air (5th generation) } { platform:iOS Simulator, id:EE6444F9-2664-4907-9481-08CE44D028E9, OS:16.0, name:iPad Pro (9.7-inch) } { platform:iOS Simulator, id:10063708-10B3-4510-A41F-E948B2D09DB3, OS:16.0, name:iPad Pro (11-inch) (3rd generation) } { platform:iOS Simulator, id:794714E1-25E0-474A-BA79-F5E0EFA3E646, OS:16.0, name:iPad Pro (12.9-inch) (5th generation) } { platform:iOS Simulator, id:809FAD25-CFE5-44CA-B642-0FF2A0E638E5, OS:16.0, name:iPad mini (6th generation) } { platform:iOS Simulator, id:055D580A-859B-42F8-B306-BD8CB68BF1CC, OS:16.0, name:iPhone 8 } { platform:iOS Simulator, id:228440FE-9536-401D-9221-E909761468FE, OS:16.0, name:iPhone 8 Plus } { platform:iOS Simulator, id:D2F30B3E-32F9-44B2-9B02-20A1B6FEDFC3, OS:16.0, name:iPhone 11 } { platform:iOS Simulator, id:1677A963-4BBC-4DE3-896B-2D93FBF10A1B, OS:16.0, name:iPhone 11 Pro } { platform:iOS Simulator, id:67F569A4-B422-406F-961A-C9093F4EA861, OS:16.0, name:iPhone 11 Pro Max } { platform:iOS Simulator, id:927F62C4-CB4E-487A-B021-0A986B9B700A, OS:16.0, name:iPhone 12 } { platform:iOS Simulator, id:AAAE026B-A40E-4D84-9447-91B2034B6FDA, OS:16.0, name:iPhone 12 Pro } { platform:iOS Simulator, id:96E6D2AB-140B-496F-8C31-71A12412AB0C, OS:16.0, name:iPhone 12 Pro Max } { platform:iOS Simulator, id:B68ACAB0-A87A-4384-B9F8-63ECF09D9564, OS:16.0, name:iPhone 12 mini } { platform:iOS Simulator, id:E6FFBA89-6B9E-4A76-A99E-0510E1EFE97B, OS:16.0, name:iPhone 13 } { platform:iOS Simulator, id:0ECA5023-8C7B-4CFA-B264-E0539509E61A, OS:16.0, name:iPhone 13 Pro } { platform:iOS Simulator, id:203AC07C-503F-476E-9F14-DA7FA4D63131, OS:16.0, name:iPhone 13 Pro Max } { platform:iOS Simulator, id:16AA1AE3-1D75-4358-A4FB-8A73141A0551, OS:16.0, name:iPhone 13 mini } { platform:iOS Simulator, id:FAC28F61-2CF8-40C1-AB2D-64CE6F11B96B, OS:16.0, name:iPhone SE (3rd generation) } Ineligible destinations for the "Transient Testing" scheme: { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device } { platform:macOS, name:Any Mac } { platform:macOS, variant:Mac Catalyst, name:Any Mac } { platform:tvOS, id:dvtdevice-DVTiOSDevicePlaceholder-appletvos:placeholder, name:Any tvOS Device } { platform:tvOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-appletvsimulator:placeholder, name:Any tvOS Simulator Device } { platform:watchOS, id:dvtdevice-DVTiOSDevicePlaceholder-watchos:placeholder, name:Any watchOS Device } { platform:watchOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-watchsimulator:placeholder, name:Any watchOS Simulator Device } I am able to launch the test directly from xcode, or with the "project" and "scheme" flags and xcodebuild test but I can't get the xctestrun file to work with iOS 16. This method works fine for iOS 15/Xcode 13. Is there anything I'm missing to make this work with the new betas? Also filed as FB10129497
Posted Last updated
.
Post not yet marked as solved
1 Replies
71 Views
Hi there, The problem is that when I just drag and change the position of my label in xib, it does not effect properly in my app. @IBOutlet weak var Example: UILabel! is connected to the label in xib file. In total there are 3 labels, so I want to see them normal, but now it looks like the first label is inside the second label. The second and third label has huge spacing, and they are in very center. The first label is on very left side. Appreciate your ideas.
Posted
by Rasi100.
Last updated
.
Post not yet marked as solved
12 Replies
3.5k Views
I was wondering if anyone else was having this issue when distributing their iOS App for Ad Hoc or Development deployment with Xcode 13.3 RC. Xcode generates the following error 'ipatool failed with an exception' with references to 'libswift_Concurrency'. It only seems to happen when the following is true: The App utilises Swift Concurrency The Deployment Target is set to 14.0 Disabling rebuilding with Bitcode seems to work around the issue however this is less than ideal. Feel free to reference my feedback FB9951218 where I've attached a minimal project that reproduces the issue.
Posted
by tomhut.
Last updated
.
Post not yet marked as solved
7 Replies
492 Views
Following the sample notes at https://developer.apple.com/documentation/widgetkit/creating-lock-screen-widgets-and-watch-complications, when I try to preview the Watch widget, I get an error saying: Cannot preview in this file WidgetEntryPointFactory' does not conform to NonUIEntryPoint RemoteHumanReadableError: Type 'WidgetEntryPointFactory' does not conform to NonUIEntryPoint (in framework at path /System/Library/PrivateFrameworks/ChronoCore.framework/Support/WidgetPreviewsExtensionAgent.bundle) ================================== |  MessageSendFailure: Message send failure for <ServiceMessage 187: update> App widgets preview fine though. Am I doing something obviously wrong?
Posted
by AndyQ.
Last updated
.
Post not yet marked as solved
43 Replies
55k Views
I am trying to update XCode to 13.2 on Monterey. It's stuck at "Installing 7.49GB of 7.49GB" (been for a while...). I tried rebooting the mac and and the install is still stuck. Reported issue on Feedback assistant (number FB9808696). What can I do? Previous version of XCode still runs ok.
Posted
by randomdev.
Last updated
.
Post not yet marked as solved
0 Replies
53 Views
Recently we get more and more problems due to non bootstraping or starting simulator clones on parallel testing. Unit & UI-Tests were all successful but the status is failed, because of this errors 'The test runner encountered an error (Failed to prepare device 'Clone 1 of iPhone 12' for impending launch.' The test runner encountered an error (Failed to prepare device 'Clone 4 of iPhone 12' for impending launch. CI environments are MacMinis based on intel and apple silicons, with Xcode 13.3.1.
Posted Last updated
.
Post not yet marked as solved
0 Replies
46 Views
Hi When I run my tests using the Xcode IDE (i.e. test plans) with parallel execution, I can see that my tests are evenly distributed to multiple iOS simulators but the same is not achieved by using the xcodebuild tool using terminal xcodebuild test-without-building -parallel-testing-enabled YES -parallel-testing-worker-count 3 -maximum-parallel-testing-workers 3 -destination "platform=iOS Simulator,name=iPhone 13,OS=15.2" -xctestrun "/var/folders/x5/ps80s0290qv1j5hn53mvxsf00000gq/T/tmp.QB6StvRC/XCTest-Gherkin-Example_TestPlan1_iphonesimulator15.5-x86_64.xctestrun" -resultBundlePath "/var/folders/x5/ps80s0290qv1j5hn53mvxsf00000gq/T/tmp.QB6StvRC/GherkinLocal.xcresult"
Posted Last updated
.
Post not yet marked as solved
1 Replies
102 Views
I have a SPM framework project that includes both Swift code and JSON file resources. With a package file that looks like this: let package = Package( name: "MyTestData", products: [ .library( name: "MyTestData", targets: [ "MyTestData", ] ), ], targets: [ .target( name: "MyTestData", dependencies: [], path: "Sources", sources: ["ios"], resources: [ .copy("payloads"), .copy("snippets"), ] ), ] ) Now all the SPM packages resolve correctly and the code compiles and works, yet the Xcode workspace is showing errors like this: Now payloads and snippets are not projects and I've tried all sorts of variations of path, sources, exclude, resource in my Package file and either I get the errors and everything works, or the errors disappear and the project doesn't work. I don't know what the issue is and there's nothing in the resolving or build logs. Does anyone know what might be the problem here?
Posted
by drekka.
Last updated
.
Post not yet marked as solved
1 Replies
59 Views
On two different Macs I get intermittent errors where SDK include files are not found. The file that contains the include statement, and the included file not found are different most times. When I check for the file it exists. A rebuild often works. Xcode 13.1 with MacOSX12.0.sdk and 13.3 with MacOSX12.3.sdk I've looked in the system console for error around the failure time, but cannot see anything. AFAIK i do not have any automatic updates selected. I checked timestamps of files/folders involved, and none are recent. Example error: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/algorithm:653:10: 'memory' file not found #include <memory>
Posted
by wba.
Last updated
.
Post not yet marked as solved
1 Replies
95 Views
I bought a new Mac book pro (M2) today and restored my Time Machine backup into the new Mac. I'm able to run XCode developed apps on a simulator fine. When I try to run the app i developed on my iPhone 12 (15.5 version of iOS) It gives me this error "This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility." I restarted both my Mac and iphone with no luck. My Mac is running System Version: macOS 12.4 (21F2081)  Kernel Version: Darwin 21.5.0 My iPhone is 15.5. I do have a developer program account. Do I need to add something in Developer Program site to allow this new mac to install apps on iPhone? Any help is greatly appreciated. I did this long time back on my old mac, and i'm totally lost how I authorize my new Mac to install apps i developed. Thank Ez
Posted
by Ezonw.
Last updated
.
Post not yet marked as solved
0 Replies
77 Views
Hi! So, I made a game a while ago on my old apple ID, and I submitted it to Testflight and everything, and I was updating it for a while, and then I stopped. I still have the Xcode project for the app on my mac, but the thing is, I now have a new Apple Id, and I want to submit the same app again, and continue updating it, but on my new Apple ID and not my old one. When I try to submit the app to Testflight, it tells me that there is already an app with that name and that I cannot submit it. I still have access to my other developer account on my old Apple ID, but it will expire in about a month. Is there a way I can transfer ownership of the app to my new Apple ID? Or maybe just delete it from testflight on my old account so I can resubmit it on my new account? If anyone knows how that would be awesome, thanks!
Posted
by Sepren7.
Last updated
.
Post not yet marked as solved
2 Replies
240 Views
It was fantastic news to hear, last year, that Xcode was getting a Vim mode. Apple's implementation of it was a great first step, but it was missing a bunch of key features. Most importantly the dot command (and by, extension, macros) and creating marks in files, which are functions that I use/rely on on a daily basis. I thought I would finally be able to stop having to self-sign Xcode (which causes problems) in order to use XVim2 plugin, but no such luck. Will these features get added in for Xcode 14 (they don't seem to be in the beta) or are they far out on the roadmap?
Posted Last updated
.
Post not yet marked as solved
6 Replies
6.2k Views
I'm trying to convert an existing project to use Swift Package Manager projects for its external dependencies. Previously I was using Carthage.My project includes a private framework named HypnoLib, a share extension, and the main application. Both the share extension and the app depend on the private framework. The private framework depends on several SPM packages, one of which is named LlamaLib.The private framework and the app build fine, but when I try to build the share extension I get these errors:&lt;module-includes&gt;:2:9: note: in file included from &lt;module-includes&gt;:2:#import "Headers/HypnoLib-Swift.h" ^/Users/samalone/Library/Developer/Xcode/DerivedData/Succubus-ajafbtomyfjhlgbqdzjavilgugud/Build/Products/Debug-iphonesimulator/HypnoLib.framework/Headers/HypnoLib-Swift.h:185:9: error: module 'LlamaLib' not found@import LlamaLib; ^&lt;unknown&gt;:0: error: could not build Objective-C module 'HypnoLib'Looking at the automatically generated file HypnoLib-Swift.h I see:@import Foundation; @import LlamaLib;but I don't see imports for the other two SPM libraries that are used by HypnoLib.So I guess my questions are:Why does HypnoLib-Swift.h try to import LlamaLib but not the other two SPM packages used in HypnoLib?Why can't LlamaLib be found when my share extension tries to import HypnoLib?
Posted Last updated
.