Xcode Cloud

RSS for tag

Automate workflows to test, analyze, build, and distribute your app, and integrate them with other developer tools, such as TestFlight and App Store Connect.

Xcode Cloud Documentation

Post

Replies

Boosts

Views

Activity

Requesting permission for MusicKit in Xcode Cloud
I am experimenting with Swift Testing and Xcode Cloud and would like to write some tests that require to use MusicKit functionality. For example I'd like to fetch an album via MusicCatalogRessourceRequest to test an initializer of another struct. However this test fails because the permission to access the music library is not granted. Once the permission is granted, the test works as expected. Things I have tried: Add NSPrivacyAccessedAPITypes to the Info.plist. This did not show any effect. Below is the corresponding snippet Trying to tap the button programmatically. Once again this did not show any effect. The Info.plist snippet: <key>NSPrivacyAccessedAPITypes</key> <array> <string>NSPrivacyAccessedAPIMediaLibrary</string> </array> The code snippet to tap the button: let systemAlerts = XCUIApplication(bundleIdentifier: "com.apple.springboard") let allowButton = systemAlerts.buttons["Allow"] if allowButton.exists { allowButton.tap() } What am I doing wrong here? I need access to MusicKit functionalities to write meaningful tests. Thank you
0
0
110
4d
Initial Setup of Xcode Cloud won't grant Github access
I'm trying to set up Xcode Cloud for the first time. When I go through the "Get Started" flow and get to "Grant Access to Your Source Code" step, when I click the "Grant Access" button, I get "This Operation Could Not Be Completed." It has the correct URL to my Github repo. Github is working fine in Xcode itself: I can push and pull changes and view repo history. I've tried: restarting Xcode rebooting the Mac Removing the Github account from Xcode and adding it back Creating a new Github personal token and removing the Github account from Xcode and using the new token to add it back I've looked through my Github settings and don't see anything that might cause an issue. I filed FB16511549 to report this. The error dialog in Xcode automatically filled the feedback fields, and says: "API Invalid status code: 500. XcodeCloudCombineAPI.XCCResponseError:1" I'm running Xcode 16.2 (16C5032a) on an M4 MacBook Pro running Sequoia 15.3.1 (24D70). Does anyone have any insights or ideas of other things to try? Thanks.
4
3
337
1w
XCode Cloud Scan dependencies, Module not found
Hi everyone, We're developing a mobile app with Flutter and I linked my GitHub with XCode Cloud. This is the first time we're using XCode Cloud and we are struggling with the build, they fail every time. A little context, we started by adding the ci_post_clone.sh script, then adding a few files in the versioning, etc... Now it looks like the build is going through be we are facing issues with the part: Scan dependencies of GeneratedPluginRegistrant.m It's throwing an error: Module 'cloud_firestore' not found, even though the module is installed before by performing a pod install. It's building locally on both Flutter with IntelliJ and XCode, we tried several times to flutter clean or pod deintegrate but nothing works! Any clue? Thanks,
1
0
212
2w
Xcode 16.2 Framework Signing Issues with Cloud Managed Developer ID in Automated Builds
Xcode 16.2 Framework Signing Issues with Cloud Managed Developer ID in Automated Builds Issue Description After upgrading from Xcode 15.4 to 16.2, our macOS app's frameworks are failing notarization with the error "The binary is not signed with a valid Developer ID certificate" for embedded frameworks when building through fastlane. This worked correctly in Xcode 15.4. Importantly, manually archiving and notarizing through the Xcode GUI still works correctly - the issue only occurs during automated builds. Build Configuration We use fastlane to build and notarize our macOS app: build_mac_app( scheme: 'Runner', export_method: "developer-id", xcargs: '-allowProvisioningUpdates' ) This generates the following xcodebuild commands: Archive: xcodebuild -workspace ./Runner.xcworkspace -scheme Runner -destination 'generic/platform=macOS' -archivePath /path/to/archive -allowProvisioningUpdates archive Export with plist: xcrun -exportArchive -exportOptionsPlist '/path/to/plist' -archivePath /path/to/archive -exportPath '/output/path' -allowProvisioningUpdates Export options plist contents: &amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &amp;lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&amp;gt; &amp;lt;plist version="1.0"&amp;gt; &amp;lt;dict&amp;gt; &amp;lt;key&amp;gt;installerSigningCertificate&amp;lt;/key&amp;gt; &amp;lt;string&amp;gt;Developer ID Installer: Company Inc (1234567891)&amp;lt;/string&amp;gt; &amp;lt;key&amp;gt;method&amp;lt;/key&amp;gt; &amp;lt;string&amp;gt;developer-id&amp;lt;/string&amp;gt; &amp;lt;key&amp;gt;signingStyle&amp;lt;/key&amp;gt; &amp;lt;string&amp;gt;automatic&amp;lt;/string&amp;gt; &amp;lt;/dict&amp;gt; &amp;lt;/plist&amp;gt; Notarization: ditto -c -k --rsrc --keepParent "My App.app" "My App.app.zip" xcrun notarytool submit "My App.app.zip" --output-format json --wait --key /path/to/key --key-id ABCDEFGHIJ --issuer 12345678-abcd-1234-5678-fc2d96b1735a Error Output Notarization fails with the following errors: { "severity": "error", "code": null, "path": "My App.app.zip/My App.app/Contents/Frameworks/some_package.framework/Versions/A/some_package", "message": "The binary is not signed with a valid Developer ID certificate.", "docUrl": "https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/resolving_common_notarization_issues#3087721", "architecture": "arm64" } Key Details Using Xcode Cloud managed Developer ID certificates (not local certificates) ✅ Building, archiving, and notarizing through Xcode GUI works correctly Automatic signing is enabled Expected Behavior Frameworks should be automatically signed with the cloud managed Developer ID certificate during the export process, as they were in Xcode 15.4. Has there been a change in how framework signing is handled with cloud managed certificates in Xcode 16.2's command line tools? Any guidance on how to ensure frameworks are properly signed during automated builds when using automatic signing with cloud managed Developer ID certificates would be appreciated.
1
3
264
1w
Xcode Cloud won't load from Xcode or App Store Connect
I am setting up a new app and am having problems with Xcode Cloud. From Xcode if I click on the "Cloud" button under the Report Navigator I get a spinner for a long time then get the message "Could not load Xcode Cloud data". I also visited the "Xcode Cloud" tab under my app in App Store Connect and I get a spinner and nothing loads. This is a recent account and I'm setting up Xcode Cloud for the first time. Below is what I've tried and I'm out of ideas on how to get this working. In Xcode, I signed out and back in as the Account Holder Closed Xcode and reopened This occurred yesterday and today and have not seen a problem under the Apple System Status page On the latest Xcode 16.2 Checked the Signing & Capabilities tab in Xcode and my team a bundle Id is correct and it's happy with signing. At this time on my machine I am using the distribution profile.
11
2
369
1w
Inconsistent behavior across different test environments and simulators
I'm working on Apple Watch UI tests and have noticed different results between local and Xcode Cloud environments. I tested all cases locally, and they worked fine. However, when running the tests on Xcode Cloud, some issues caused them to fail: The test requires clicking a button to display the built-in keyboard, but on Xcode Cloud, the keyboard never appears, no matter how long I wait. The app unexpectedly closes during testing, displaying the error message: "Failed to launch application {Your app} is not running." These failures occurred on two different simulator destinations (Ultra 49mm 11.2 / Series 7 45mm 11.2) and can only be reproduced on specific simulators. Has anyone encountered a similar issue?
0
0
192
6d
macOS test case - Could not launch app
Hi, Overview I am using Xcode Cloud for my multi platform app. The macOS test case fails, however the iOS test case runs and succeeds. I don't have any UI test cases written, the test case are simple and have nothing platform (macOS) specific. Questions What can I do to fix this? Is there any user privileges needed to launch the macOS app for testing? I ask because when I ran the UI tests locally it launched the app and asked for my macOS user password. Just wondering if that is the reason it didn't launch in Xcode Cloud. Error: <Appname> encountered an error (Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/resultbundle.xcresult.(Underlying Error: Could not launch "AppnameTests. The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error. (Underlying Error: The operation couldn't be completed. Launch failed. (Underlying Error: Launch job spawn failed) ))) × Could not launch "<Appname>" × Could not launch "AppnameTests" × AppnameUITests.testExample() Failed to get launch progress for <XCUIApplicationImpl: 0x600000564630 <BundleID> at /Volumes/workspace/TestProducts/Debug-Dev/<Appname>.app>: Could not launch "app name". The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error. (Underlying Error: The operation couldn't be completed. Launch failed. (Underlying Error: Launch job spawn failed)) AppnameUITests.swift:28 * AppnameUITests.testLaunchPerformance) Failed to get launch progress for «XCUIApplicationimpl: 0x60000054630 <BundleID> at /Volumes/workspace/TestProducts/Debug-Dev/<Appname>.apps: Could not launch "<Appname>". The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error. (Underlying Error: The operation couldn't be completed. Launch failed. (Underlying Error: Launch job spawn failed)) AppnameUITests.swift:37 g * AppnameUITestsLaunchTests.testLaunch) Failed to get launch progress for «XCUIApplicationimpl: 0x60000054630 <BundleID> at /Volumes/workspace/Testroducts/Debug-Dev/<Appname>.apps: Could not launch "<Appname>". The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error. (Underlying Error: The operation couldn't be completed. Launch failed.
6
0
2.5k
Feb ’23
Cannot find "renamed.swift" in scope
I use xcode to rename a view in my project. It renamed the file, the struct, and all related items. However; since doing that my xcode cloud workflow fails, indicating that the it cannot find it in scope. I have confirmed that the file shows up in my BuildPhases - Compile Sources. I have confirmed it exists in my git repo, but Xcode Cloud still fails to find it in scope. I have confirmed it shows up in the correct Target Membership. I even tried removing it from the BuildPhases and re-adding it. How can I resolve this issue? Is there something else I can look at? btw, application builds fine locally on my machine.
1
0
231
Jan ’25
Can't get Xcode Cloud to work
I have an app I am toying with and I am seeing the following error in github's Xcode automation from Apple. My other apps work fine fine in xcode cloud with the same project setup. Run scheme_list=$(xcodebuild -list -json | tr -d "\n") 2025-02-05 03:15:56.669 xcodebuild[2841:17672] Writing error result bundle to /var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T/ResultBundle_2025-05-02_03-15-0056.xcresult xcodebuild: error: Unable to read project 'Legacy Letters.xcodeproj'. Reason: The project ‘Legacy Letters’ cannot be opened because it is in a future Xcode project file format (70). Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode. /opt/homebrew/Cellar/ruby@3.0/3.0.7/lib/ruby/3.0.0/json/common.rb:216:in `parse': 809: unexpected token at '' (JSON::ParserError) from /opt/homebrew/Cellar/ruby@3.0/3.0.7/lib/ruby/3.0.0/json/common.rb:216:in `parse' from -e:1:in `<main>'
3
0
196
2w
Need help. How to get Xcode Cloud to 'resolve package dependencies.'
My organization just started having problems with Xcode Cloud this week. We have created a pretty simple 'Build on Pull Request'. The problem is our builds have started failing immediately because with the error. "Could not resolve package dependencies:" What is even more frustrating is the dependency that reported failed seem to changes every time. This did not happen before this week. Our build process is fairly vanilla, through Xcode. (We are NOT using CLI xcodebuild) I can build a locally just fine from a clean build, and cleaning derived data. Nothing has changed in our dependencies. We are not using any private dependencies. So I am stumped on what else to do how to debug, and fix this, because I am not sure how to encourage the Xcode Cloud build runner/server that the dependences are available and to jsut go get them. Any help would be great, because we just started using Xcode Cloud to get away from Fastlane (which was causing problems), and it would be frustrating if this is a sign of things to come. Sincerely, Stan
1
0
234
3w
Building visionOS app with Firebase Source Distribution in Xcode Cloud
I have a working Xcode Cloud setup for my iOS and macOS targets, and I'm trying to add visionOS support. The issue is that Firebase requires using their source distribution for visionOS (instead of their default binary distribution). Locally, this works by launching Xcode with: open -a Xcode --env FIREBASE_SOURCE_FIRESTORE project.xcodeproj For Xcode Cloud, I've added a ci_post_clone.sh script that sets this environment variable for visionOS builds: #!/bin/bash if [[ $CI_PRODUCT_PLATFORM == "xrOS" ]]; then echo "Running setup for visionOS..." export FIREBASE_SOURCE_FIRESTORE=1 fi However, I'm getting the following error during build: an out-of-date resolved file was detected at /.../project.xcworkspace/xcshareddata/swiftpm/Package.resolved, which is not allowed when automatic dependency resolution is disabled So since setting FIREBASE_SOURCE_FIRESTORE=1 changes which SPM dependencies are required: Normal setup uses: abseil-cpp-binary, grpc-binary Source distribution needs: abseil-cpp-swiftpm, grpc-ios, boringssl-swiftpm What's the recommended way to handle this in Xcode Cloud when maintaining builds for all platforms? Should I be using separate workflows with different branches for different platforms? Or is there a better approach? System: Xcode 16.2 Using SPM for dependency management Firebase iOS SDK 10.29.0 Building for iOS, macOS, and visionOS Thanks in advance for any guidance!
0
0
217
3w
Xcode cloud build hanging at 46 percent, even though all stages have completed successfully
My Xcode cloud pipeline seems to be stuck at 46% inside the archiving step for some reason. When I run my project locally, it works, and uploading my build manually through Xcode to app store connect works too. However, when I try to build my app using Xcode cloud, it gets stuck after the archiving step has successfully completed. All checkmarks are green, but the archiving step does not terminate after one hour. I tried switching the cloud Xcode version, the cloud macOS version, changing my code. Nothing works and Xcode cloud is completely bricked. How do I fix this? There is no error message at all. The build is just stuck at 46% and nothing happens.
1
0
252
Jan ’25
Xcode Cloud - TestFlight Internal Testing Processing Stuck for Over 8 Hours
I am experiencing significant delays with TestFlight Internal Testing processing in Xcode Cloud. The build has been stuck in the processing state for over 8 hours, which is significantly longer than our usual deployment time. Issue Details: Product: Xcode Cloud / TestFlight Internal Testing Time in Processing: 8+ hours Build Status: Stuck in "Processing for TestFlight Internal Testing" Workflow Type: iOS App Distribution Steps to Reproduce: Triggered Xcode Cloud workflow for iOS app Build completed successfully TestFlight Internal Testing processing started Processing has not completed after 8+ hours Technical Information: Xcode Version: Xcode 15.4 iOS App Target Version: iOS16.4 Attempted Troubleshooting: Verified all certificates and provisioning profiles are valid and up-to-date Confirmed the build was successful in Xcode Cloud Checked that the app binary size has not changed significantly Reviewed all workflow logs for potential errors or warnings Is there a known issue with TestFlight processing times currently? Are there any steps we can take to resolve or expedite this process? Can you investigate if there are any specific issues with our build that might be causing this delay? Please let me know if you need any additional information to assist with this issue. App Information: App Name:Simple Voice Recorder - Audio Bundle Identifier: id6443528409 Thank you for your assistance in resolving this issue. Best regards,
1
0
278
Jan ’25
Verification failed with status INVALID_APP_IDENTIFIER using Sandbox
I get this error: Verification failed with status INVALID_APP_IDENTIFIER we use this method: payload = signed_data_verifier.verify_and_decode_notification(notification_data) I use Production environment (this is automatically set in our server) and use my device (connected to Mac) to test the purchase. When trying to purchase I get the Sandbox environment in the Widget. This works when manually setting the environment to Sandbox before calling the function. The time it works because it does not check the apple app id (because of the environment). Now my question is: Which is the apple app id? Is it the App Id "Apple-ID" in the app store connect? Or is it the TeamId+BundleId? Could it be that my function doesnt work because the Payment was done in Sandbox and the environment is Production?
0
0
179
3w
Xcode Cloud randomly fails to resolve package dependencies
Hi folks, I've been having this issue for the last few months, where Xcode Cloud fails to resolve Swift package dependencies while compiling my builds, seemingly at random. Some of my Xcode Cloud builds will fail after several minutes, with an error log looking like that : xcodebuild: error: Could not resolve package dependencies: failed downloading 'https://dl.google.com/firebase/ios/bin/grpc/1.62.2/rc0/grpcpp.zip' which is required by binary target 'grpcpp': downloadError("The request timed out.") Whenever this happens, I have to manually restart an Xcode Cloud build process (or several builds, since the error can happen multiple times in a row), to the point it's becoming increasingly painful to rely on Xcode Cloud for my workflow. The failing packages are mostly random (meaning, it's not always the same one that Xcode fails to resolve), but they are always publicly accessible, even though I have an environment variable set in my Xcode workflows to retrieve a single Github private dependency (maybe this has some kind of importance). Could anyone tell me if this is an isolated issue, or if I could do anything on my end to resolve this ? Thank you !
6
1
664
Dec ’24
Export archive fails due to No signing certificate "iOS Distribution" found
We are encountering build failures during the following stages on Xcode Cloud: • Export archive for ad-hoc distribution -> fail • Export archive for development distribution -> fail • Export archive for app-store distribution -> fail Run command: 'xcodebuild -exportArchive -archivePath /Volumes/workspace/tmp/a603f613-f0a2-4053-9316-2f25ca93250d.xcarchive -exportPath /Volumes/workspace/adhocexport -exportOptionsPlist /Volumes/workspace/ci/ad-hoc-exportoptions.plist '-DVTPortalRequest.Endpoint=http://172.16.56.69:8089' -DVTProvisioningIsManaged=YES -IDEDistributionLogDirectory=/Volumes/workspace/tmp/ad-hoc-export-archive-logs -DVTSkipCertificateValidityCheck=YES -DVTServicesLogLevel=3' Error Command exited with non-zero exit-code: 70 2025-01-21T05:11:20.962717086Z error: exportArchive There is a problem with the request entity 2025-01-21T05:11:20.962756880Z 2025-01-21T05:11:20.962760011Z error: exportArchive No signing certificate "iOS Distribution" found 2025-01-21T05:11:20.962764378Z 2025-01-21T05:11:20.962767137Z error: exportArchive There is a problem with the request entity 2025-01-21T05:11:20.962771440Z 2025-01-21T05:11:20.962774232Z error: exportArchive No signing certificate "iOS Distribution" found The build process was functioning correctly until this morning with same branch. We also have verified that our certificates are valid and successfully uploaded to TestFlight using these certificates on the local Xcode environment. This appears to be an issue on the Xcode Cloud side as no significant configuration changes were made on our end.
4
5
534
Jan ’25
Multiple issues on Xcode Cloud, WeatherKit and TestFlight after changing bundle id
After changing the bundle identifier of my app, I’ve encountered several issues that I can’t seem to resolve, even though I’ve followed all the necessary steps. The app with the previous identifier was live on Testflight, and working perfectly fine, but now I’m facing the following problems: WeatherKit Authentication Issue WeatherKit has stopped working, and I’m getting authentication errors. I’ve updated the app in the Developer Portal to reflect the new bundle ID, but it still doesn’t authenticate properly. Xcode Cloud Configuration Issue: Xcode is asking me to set up Xcode Cloud again, which I understand is expected after a bundle ID change. However, during the setup process, it fails to recognize my remote repository, even though the repository is correctly added and visible under the Source Control tab. TestFlight Internal Testing Issue: I manually uploaded a build to TestFlight, but internal testers cannot use it because the invitation appears as invalid. This wasn’t an issue with the app’s previous identifier. It seems like the bundle ID change has caused some fundamental issues that I can’t resolve despite following all the usual instructions. Has anyone experienced this before or knows how to resolve these problems? I'm using the latest Xcode 16.2 on Mac OS Sequoia 15.2
0
0
302
Jan ’25
Xcode Cloud unable to execute iOS tests
All tests build and run locally just fine. Xcode Cloud can build my code, but always fails to run tests with the below errors. How can I even begin to troubleshoot this? I think my setup is pretty straightforward. Just a simple test plan that execute some unit tests with Swift Testing. Run command: 'xcodebuild test-without-building -destination 'platform=iOS Simulator,id=1EB80431-1A0B-4AD8-8EA6-968EA09C3F23' -resultBundleVersion 3 -resultBundlePath /Volumes/workspace/resultbundle.xcresult -resultStreamPath /Volumes/workspace/tmp/resultBundleStream679e7ce9-a095-4be5-8dfa-4c9df982e547.json -IDEPostProgressNotifications=YES -DTDKDisableSymbolCopying=YES -test-timeouts-enabled YES -maximum-test-execution-time-allowance 1800 -hideShellScriptEnvironment -maximum-parallel-testing-workers 8 -testProductsPath /Volumes/workspace/TestProducts.xctestproducts' (6378) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal ill before starting test execution.)) May be related to: https://developer.apple.com/forums/thread/725660
1
0
273
Jan ’25