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

Xcode Documentation

Posts under Xcode subtopic

Post

Replies

Boosts

Views

Activity

Can't seem to get Unit Test target working when I create. Multiplatform project
In Xcode Version 16.1 Create a new Project, choose Multiplatform, App For testing system, choose XCTest and UI Tests In the project, open the newly generated template Unit test file Click either of the diamonds in the left margin (either to run the example test or the entire file) Expected Result: Code compiles and then Runs the test/tests Actual Result: Code compiles, but then never completes testing (the top status bar is stuck saying "Testing..." forever.) Am I missing something?
0
0
416
Dec ’24
xcodebuid failed at signing step although there is no issue building and distributing from Xcode GUI
Hi all, I have a host application to register and start network system extension. I created 2 provisional profiles that grant SystemExtension and NetworkExtension capabilities for the host app, and NetworkExtension for the network system extension. I'm able to archive and distribute (direct distribution) the app from XCode GUI. However, when I use xcodebuild command to build the project, it gave me this error: error: No profile for team 'TEAMID' matching 'Host APP Distribution Profile' found: Xcode couldn't find any provisioning profiles matching 'TEAMID/Host APP Distribution Profile'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. error: No profile for team 'TEAMID' matching 'My NetworkExt Distribution Profile' found: Xcode couldn't find any provisioning profiles matching 'TEAMID/My NetworkExt Distribution Profile'. Install the profile (by dragging and dropping it onto Xcode's dock item) or select a different one in the Signing & Capabilities tab of the target editor. I already installed those 2 provisioning profiles assign them to my targets in XCode. There is no error from Xcode when building and distributing it. Does anyone have the same issue? How could you solve it. Thanks! An
0
0
235
Dec ’24
iOS xcode app, During "Distribute app" get error The archive contains nothing that can be signed
I had successfully distributed my app months ago and trying same today and get "The archive contains nothing that can be signed. Verify that your build process has compiled binaries and copied in bundled resources." message when I click the "Distribute app" button. My project is a simple iOS xcode project that I had success in same operation back on Feb 8, 2024, same project code and settings. Verbose log: 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodWatchOSAdHoc: 0x600004700d70> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodWatchOSEnterprise: 0x600004700c30> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodTVOSEnterprise: 0x600004700c90> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Accepted distribution method <IDEDistributionMethodiOSEnterprise: 0x600004700c70> 2025-01-22 00:49:43 +0000 [MT] Accepted distribution method <IDEDistributionMethodDevelopmentSigned: 0x600004700c80> 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodTVOSDevelopmentSigned: 0x600004700d30> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodWatchOSDevelopmentSigned: 0x600004700d90> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodDeveloperIDNotarizedApp: 0x600004700d40> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodDeveloperID: 0x600004700cf0> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodSaveBuiltProducts: 0x600004700ca0> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodDevelopmentSignedMac: 0x600004700d60> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodExportArchive: 0x600004700c60> because it doesn't support distributing archive 2025-01-22 00:49:43 +0000 [MT] Rejected distribution method <IDEDistributionMethodMacApplication: 0x600004700d80> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSAppStoreDistribution: 0x600004700cd0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Accepted distribution method <IDEDistributionMethodiOSAppStoreDistribution: 0x600004700d10> 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodiOSAppStoreValidation: 0x600004700d20> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSAppStoreValidation: 0x600004700cc0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodMacAppStoreDistribution: 0x600004700c40> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodMacAppStoreValidation: 0x600004700c50> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodInAppPurchaseContentPackage: 0x600004700d50> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodMacAdHoc: 0x600004700d00> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Accepted distribution method <IDEDistributionMethodiOSAdHoc: 0x600004700cb0> 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSAdHoc: 0x600004700ce0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodWatchOSAdHoc: 0x600004700d70> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodWatchOSEnterprise: 0x600004700c30> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSEnterprise: 0x600004700c90> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Accepted distribution method <IDEDistributionMethodiOSEnterprise: 0x600004700c70> 2025-01-22 00:49:45 +0000 Accepted distribution method <IDEDistributionMethodDevelopmentSigned: 0x600004700c80> 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodTVOSDevelopmentSigned: 0x600004700d30> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodWatchOSDevelopmentSigned: 0x600004700d90> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodDeveloperIDNotarizedApp: 0x600004700d40> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodDeveloperID: 0x600004700cf0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodSaveBuiltProducts: 0x600004700ca0> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodDevelopmentSignedMac: 0x600004700d60> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodExportArchive: 0x600004700c60> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Rejected distribution method <IDEDistributionMethodMacApplication: 0x600004700d80> because it doesn't support distributing archive 2025-01-22 00:49:45 +0000 Available distribution methods: {( <IDEDistributionMethodiOSAppStoreDistribution: 0x600004700d10>, <IDEDistributionMethodiOSAdHoc: 0x600004700cb0>, <IDEDistributionMethodiOSEnterprise: 0x600004700c70>, <IDEDistributionMethodDevelopmentSigned: 0x600004700c80> )} 2025-01-22 00:49:45 +0000 Step failed: <IDEDistributionAnalyzeArchiveStep: 0x6000084ddd40>: Error Domain=IDEDistributionErrorDomain Code=5 "The archive contains nothing that can be signed." UserInfo={NSLocalizedDescription=The archive contains nothing that can be signed., NSLocalizedRecoverySuggestion=Verify that your build process has compiled binaries and copied in bundled resources.}
0
0
262
Jan ’25
iOS Build Availability in Xcode
When attempting to fix an issue that is only happening on a specific iOS build I noticed that I am not able to install that specific build on my simulator. Is there any way to get specific iOS builds that are not available through Xcode? Example: The bug I am trying to fix is only happening on 17.6.1 and 17.7.1. These specific builds are not available through Xcode. Attempted Resolution: I found a iPhone14,5_17.6.1_21G101_Restore.ipsw file but was not able to import it into Xcode for use nor was I able to use it on a physical device.
0
0
212
Nov ’24
[Xcode:BuildSettings] Keep some warnings as warnings while the rest as errors
We have a big iOS project and we are using .xcconfig files to define our compiler options and build settings. We have our SWIFT_TREAT_WARNINGS_AS_ERRORS set to YES so that all Swift related warnings will be reported as errors. Now, we are trying to migrate to Xcode 16.1 and set 'targeted' in the 'Strict Concurrency Checking' flag. This produces some errors that are related to Swift's concurrency checks. We are now planning to have an approach where we still want to keep SWIFT_TREAT_WARNINGS_AS_ERRORS as is but we want all concurrency related warnings to be still treated as warnings while the rest will get reported as errors. We found this new compiler option - https://forums.swift.org/t/warnings-as-errors-exceptions/72925. It looks like the one we want but I think it is still not out yet and we need to wait until Swift 6.1 (correct me if im wrong). Or is there any other way to do what we want to achieve?
0
0
337
Jan ’25
Linking static libraries openssl to Xcode 15.2 project fails due to link errors
Hello, I used to add openssl static libraries (libssl.a, libcrypto.a) that, I created on Mac, and add them after to my C++ project within XCode. With Xcode 14.2 (and before) all works fine. Switching to Xcode 15.2, tons of link errors rise (ld: Undefined symbols). I tried _ld_classic to force use 'old' linker but no success. Rebuild the static libraries with multiple config param or upgrade to recent openssl library does not help. Any clues what went wrong when linking static libraries with Xcode 15.2 project? Thx.
0
0
161
Jan ’25
XCode git commit showing other Projects
I imported few files in my Xcode project from other projects using drag and drop. Even though the files are copied in the new project and there are no softlinks pointing to the location of other project, the issue is whenever I do a git commit and push, Xcode keeps showing all the projects to commit to rather than just the current project. There seem to be no setting to permanently remove git dependency of other projects. Is there anyway to remove references to other projects?
0
0
277
Jan ’25
Build input file cannot be found
I have a project that imports SPM swift-navigation which in-turn imports SPM https://github.com/pointfreeco/swift-perception I have a test target it builds and runs with no issues in XCode however if I run with xcodebuild i get the below error (I have done basics removed derived data etc.) ❌ error: Build input file cannot be found: '/Users/chris/mtp-iOS-retail-iPhone/build/Build/Products/Debug/PerceptionMacros'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'Perception' from project 'swift-perception')
0
0
379
Dec ’24
Bonjour Capabilities
I'm a noobie but doing a tutorial where it requires me to add these capabilities to my project. Access Wi-Fi Information Network Extentions Bonjour Services I have the Access Wi-Fi and Network Extentions installed but I could not find Bonjour Services Any help would be much appreciated! Thanks
0
0
128
Jan ’25
Additional assets/icons won't be included in the build in versions above 15
Hello! Recently, I noticed that my build isn’t including additional assets (icons). I tried using two different versions of Xcode (16.1 and 15.4) on separate Macs, but I’m getting the same result. Not all icons are being included in the build. However, I found that if I set my minimum deployment version to 14, all of the icons appear as expected. Starting from target version 15 in Xcode, no additional icons are included. Is there any way to resolve this?
0
0
125
Nov ’24