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

Snapshot testing differences between local machine and Xcode Cloud
Hi, I’m using the snapshot testing library from https://github.com/pointfreeco/swift-snapshot-testing I recorded the snapshot tests on the iPhone 15 pro simulator on iOS 17.4 and Xcode 15.3 On my M1 Max MacBook Pro Within the tests found in https://github.com/fespinoza/sample-json-app/blob/84b81ee3fa1d24e97bbeded65487b32258a42325/SampleProjectTests/MovieDetails/MovieDetailsViewTests.swift I try to control all the traits and properties I can, to make sure the test is run in the same environment in Xcode Cloud For some reason though, on Xcode Cloud, Text with multiline strings have a different line height than on my machine and thus the test fail I don’t understand: why that happens how to debug this situation Does anyone here have any pointers? Reference Image From my machine Failure Image from Xcode Cloud P.S. thread initially posted in https://github.com/pointfreeco/swift-snapshot-testing/discussions/842 but i haven’t gotten any answers, trying here instead
1
0
866
Apr ’24
Xcode Cloud Invalid Signature TN2206 error
Hello guys, I've been dealing with one error in my xcode cloud configuration. I want to auto-deploy the app version to Testflight on something is merged to main branch. Of course if I do at my local environment it works perfect. But when I try to execute it at XCode Cloud I've got this error. I really don't have any idea about how to fix it. Thanks a lot for your time 😊 Invalid Signature. The main app bundle SyncTion at path SyncTion.app has following signing error(s): valid on disk SyncTion.app: does not satisfy its designated Requirement SyncTion.app: explicit requirement satisfied . Refer to the Code Signing and Application Sandboxing Guide at http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/AboutCS/AboutCS.html and Technical Note 2206 at https://developer.apple.com/library/mac/technotes/tn2206/_index.html for more information.
3
0
1.4k
Mar ’24
TestFlight提审时提示“你的请求无法完成请稍后再试”
我构建了一个新的应用程序,还未发布到应用市场,只是提交了测试,前面都是正常的 但是今天TestFlight提审时提示“你的请求无法完成请稍后再试” 内部测试包能上传,但是测试机下载测试时提示“所请求的应用不存在或不可用” 有哪位大大能帮忙解决么?急急急····
2
0
1.1k
Mar ’24
Xcode Cloud + Swagger-Codegen
Hi, I tried to put in place a workflow to automatically generate API data model using Swagger-Codegen on Xcode Cloud. In the ci_pre_xcodebuild.sh we install swagger-codegen using brew. But installation fails due to uninstalled Apple Command Line Tools. Error: python @3.12: the bottle needs the Apple Command Line Tools to be installed. Any thoughts about this ? Regards,
1
0
739
Mar ’24
Xcode cloud gives invalid signature error
Hi, We've been using Xcode cloud for one of our apps without issues for a while now. We're happy with it, and want to use it to build and publish all the apps we manage. But these past few days i've tried to set up a new app without success. I'm receiving the errors Invalid Signature. Code failed to satisfy specified code requirement(s). The file at path “{app}/Frameworks/hermes.framework/hermes” is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose “Clean All” in Xcode, delete the “build” directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/support/code-signing. Invalid Signature. Code failed to satisfy specified code requirement(s). The file at path “{app.app}/{app}” is not properly signed. Make sure you have signed your application with a distribution certificate, not an ad hoc certificate or a development certificate. Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). Additionally, make sure the bundle you are uploading was built using a Release target in Xcode, not a Simulator target. If you are certain your code signing settings are correct, choose “Clean All” in Xcode, delete the “build” directory in the Finder, and rebuild your release target. For more information, please consult https://developer.apple.com/support/code-signing. The errors seems aimed towards someone trying to build locally, as to my understanding, i can't affect the cloud signing used by the pipeline. Nonetheless, I've been trying to fix these by: Creating new certificates(both personal, and removing the xcode cloud ones) Deleting Xcode cloud data and starting over Changing, and testing, all relevant signing settings in project.pbxproj Testing various Xcode and MacOS versions in the config Creating provisioning profiles and specifying them in project.pbxproj Compared files and structures between a working project and this one Gone through all troubleshooting documentation and relevant posts and answers on various forums The issue only exists in Xcode cloud, and as far i can see there should be no issues with the servers. If i switch to the exact build, build it locally and publish it, there's no issue. Is there any more alternatives i can try before moving on from Xcode cloud to another solution?
1
2
1.7k
Mar ’24
500 status trying ciBuildRuns
Hello all! Since past Thursday, using this cURL: curl -X POST \ 'https://api.appstoreconnect.apple.com/v1/ciBuildRuns' \ --header 'Accept: */*' \ --header 'User-Agent: Thunder Client (https://www.thunderclient.com)' \ --header 'Authorization: Bearer XXXX' \ --header 'Content-Type: application/json' \ --data-raw '{ "data": { "type": "ciBuildRuns", "attributes": {}, "relationships": { "workflow": { "data": { "type": "ciWorkflows", "id": "NNNN" } }, "sourceBranchOrTag": { "data": { "type": "scmGitReferences", "id": "NNNN" } } } } } Of course, I removed the sensible information from my sample. This is the response: { "errors": [ { "status": "500", "code": "UNEXPECTED_ERROR", "title": "An unexpected error occurred.", "detail": "An unexpected error occurred on the server side. If this issue continues, contact us at https://developer.apple.com/contact/." } ] } I have written to Apple Support twice since they assure me that I will have a response in 2 working days, but I have not had any response. The rest of the API calls work correctly.
2
0
513
Mar ’24
Xcode Cloud build gets stuck after completion?
Recently, I have trouble with my Xcode Cloud builds, where they seemingly complete, but the very final step does not happen. I am building from the same codebase for both macOS and iOS (I have two “Archive” steps in my workflow, one for iOS and one for macOS). The iOS one usually completes fast without problems. The macOS log ending looks like this, and remains stuck forever, with the macOS build in the “spinning progress” state and never completing. Is there something I can do on my end to make this work better? I would not want to go back to manual builds, Xcode Cloud is convenient and was working well for a while, but this is really annoying lately.
2
0
2.1k
Nov ’22
How do I get the branch name for a manual build in XCode Cloud?
The available environment variables have this: CI_BRANCH The name of the source branch that Xcode Cloud checked out for the current build, for example, main. However, this is only available for builds started by a branch change. I tried using it in a manual build, and it was just an empty string. Is there a way to get the branch name for manually started workflows? You have to choose a branch to start one, so I'd assume that info is available somewhere.
0
0
462
Feb ’24
Xcode Cloud "The bundle version must be higher than the previously uploaded version."
I am getting an error on Xcode Build The bundle version must be higher than the previously uploaded version. I am at a loss. My bundle version is set at 20. The latest version uploaded has bundle version 18. The project is clearly higher than the most recently uploaded version. What am I doing wrong? I tried setting the Bundle version in both the General tab for the target, in the Build Settings and in the Info.plist. Which takes precedence? Fastlane reports the current build version as 18 on TestFlight. Confusingly, throughout Xcode, Bundle Version is variously referred to as both 'Bundle Version' and 'Current Project Version', and is 'Build' on App Store Connect. App Store Version is variously referred to as 'Version', 'Bundle version string (Short)', and 'Marketing Version'.
5
0
4.8k
Jan ’23
Xcode Cloud build speed
Hello! I'd love to be able to use Xcode Cloud, but I can't figure out how to make it fast enough. For example a build (from clean) that takes 30s on my M1 MacBook Pro takes 120s on Xcode Cloud. I looked at the build timelines for both local builds and cloud builds, and there is no apparent bottleneck on the cloud build. It appears to be compiling 10 to 12 files in parallel just like my local machine, just 4x slower. I'm on the free tier right now. Is it faster on the paid tiers?
1
0
745
Feb ’24
Xcode Cloud - How to see test crash abort_message
I have a crash in my app that occurs during a test - but only when running on Xcode Cloud - locally tests always pass fine. I have a crash report that looks like the one below. I understand that abort is being called and includes an abort_message which I could normally see in the console if the debugger was attached, but as this is Xcode Cloud, is there any way where I can actually see this abort message? Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: SIGNAL 6 Abort trap: 6 Triggered by Thread: 0 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x10cb497a2 __pthread_kill + 10 1 libsystem_pthread.dylib 0x10cad4f30 pthread_kill + 262 2 libsystem_c.dylib 0x7ff80014cd30 abort + 133 3 libc++abi.dylib 0x7ff8002961b2 abort_message + 241 4 libc++abi.dylib 0x7ff80028838a demangling_terminate_handler() + 266 5 libobjc.A.dylib 0x7ff80004266e _objc_terminate() + 104 6 libc++abi.dylib 0x7ff80029560b std::__terminate(void (*)()) + 6 7 libc++abi.dylib 0x7ff800298024 __cxa_rethrow + 100 8 libobjc.A.dylib 0x7ff800063a71 objc_exception_rethrow + 37 9 CoreFoundation 0x7ff8003f1a32 CFRunLoopRunSpecific + 738 10 GraphicsServices 0x7ff80fe9d08f GSEventRunModal + 137 11 UIKitCore 0x7ff805bbb53d -[UIApplication _run] + 972 12 UIKitCore 0x7ff805bbffab UIApplicationMain + 123 13 SwiftUI 0x7ff84ab8aeda 0x7ff849b47000 + 17055450 14 SwiftUI 0x7ff84ab8ad93 0x7ff849b47000 + 17055123 15 SwiftUI 0x7ff84a82b0d7 0x7ff849b47000 + 13517015
0
0
478
Feb ’24
Unable to install swift-format in Xcode Cloud
here is my post clone scrip: #!/bin/zsh brew install swift-format And here is the errors im getting in the Xcode Cloud logs: Showing All Messages cd /Volumes/workspace/repository/ci_scripts && /bin/zsh /Volumes/workspace/repository/ci_scripts/ci_post_clone.sh ==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:02180ca8b8295422ae84921bcf034b7ee8ce5575488bd5e6a37a192e53cd5d34 #=#=# ##O#-# ### 5.5% ##################################################### 74.3% ######################################################################## 100.0% ==> Pouring portable-ruby-3.1.4.el_capitan.bottle.tar.gz Running `brew update --auto-update`... To restore the stashed changes to /Users/local/Homebrew, run: cd /Users/local/Homebrew && git stash pop ==> Homebrew collects anonymous analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics No analytics have been recorded yet (nor will be during this `brew` run). ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: https://github.com/Homebrew/brew#donations Error: swift-format: the bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with: xcode-select --install If you're feeling brave, you can try to install from source with: brew install --build-from-source swift-format It is expected behaviour that most formulae will fail to build from source. It is expected behaviour that Homebrew will be buggy and slow when building from source. Do not create any issues about failures building from source on Homebrew's GitHub repositories. Do not create any issues building from source even if you think this message is unrelated. Any opened issues will be immediately closed without response. Do not ask for help from Homebrew or its maintainers on social media. You may ask for help building from source in Homebrew's discussions but are unlikely to receive a response. If building from source fails, try to figure out the problem yourself and submit a fix as a pull request. We will review it but may or may not accept it. Run command: 'cd /Volumes/workspace/repository/ci_scripts && /bin/zsh /Volumes/workspace/repository/ci_scripts/ci_post_clone.sh' ==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:02180ca8b8295422ae84921bcf034b7ee8ce5575488bd5e6a37a192e53cd5d34 #=#=# ##O#-# ### 5.5% ##################################################### 74.3% ######################################################################## 100.0% ==> Pouring portable-ruby-3.1.4.el_capitan.bottle.tar.gz Running `brew update --auto-update`... To restore the stashed changes to /Users/local/Homebrew, run: cd /Users/local/Homebrew && git stash pop ==> Homebrew collects anonymous analytics. Read the analytics documentation (and how to opt-out) here: https://docs.brew.sh/Analytics No analytics have been recorded yet (nor will be during this `brew` run). ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: https://github.com/Homebrew/brew#donations Error: swift-format: the bottle needs the Apple Command Line Tools to be installed. You can install them, if desired, with: xcode-select --install If you're feeling brave, you can try to install from source with: brew install --build-from-source swift-format It is expected behaviour that most formulae will fail to build from source. It is expected behaviour that Homebrew will be buggy and slow when building from source. Do not create any issues about failures building from source on Homebrew's GitHub repositories. Do not create any issues building from source even if you think this message is unrelated. Any opened issues will be immediately closed without response. Do not ask for help from Homebrew or its maintainers on social media. You may ask for help building from source in Homebrew's discussions but are unlikely to receive a response. If building from source fails, try to figure out the problem yourself and submit a fix as a pull request. We will review it but may or may not accept it. Command exited with non-zero exit-code: 1 The ci_post_clone.sh is not executable and was run using zsh (default shell on macOS). To make sure your script runs correctly, make the file executable using `chmod +x` and add an appropriate shebang line. I feel like Xcode Cloud can't possibly be missing Xcode command line tools. I also can't imagine they forgot to run chmod +x on the default run script files Any Ideas here?
0
0
780
Feb ’24
Xcode Cloud - This operation could not be completed.
Yet another issue with Xcode Cloud which never happened before. I am losing my hope on Xcode Cloud and looking to change my CI options, since we are stumbling upon unexpected issues for the second time during last two weeks. This time, it is even worse. I can't start building from any workflow. Whenever I try to do so, just an alert pops up saying "This operation could not be completed". Build process doesn't even start, it doesn't even try to clone my repo, it just fails. Anyone faced such an issue before? How were you able to fix it?
1
0
566
Feb ’24
How to send build artefacts to gitlab
After following the guides, I have Xcode Cloud hooked up to my Gitlab and it's all working nicely. However I want to also have the build artefacts stored on Gitlab also. I know it will involve a ci_post_xcodebuild.sh script but I can't find any information on what I actually need to do. I don't want to be manually downloading them for every release!
0
0
358
Feb ’24
Xcode Cloud: Gem install failures
Getting these errors for most (but not all) builds: ERROR: Could not find a valid gem 'drb' (= 2.0.6), here is why: Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Failed to open TCP connection to rubygems.org:443 (Connection reset by peer - connect(2) for "rubygems.org" port 443) (https://rubygems.org/specs.4.8.gz) ERROR: Could not find a valid gem 'activesupport' (= 6.1.7.6), here is why: Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Failed to open TCP connection to rubygems.org:443 (Connection reset by peer - connect(2) for "rubygems.org" port 443) (https://rubygems.org/specs.4.8.gz) ERROR: Could not find a valid gem 'cocoapods' (= 1.14.3), here is why: Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Failed to open TCP connection to rubygems.org:443 (Connection reset by peer - connect(2) for "rubygems.org" port 443) (https://rubygems.org/specs.4.8.gz) from this code in ci_post_clone.sh: gem install drb -v2.0.6 gem install activesupport -v6.1.7.6 gem install cocoapods -v1.14.3 Xcode environment: XCODE VERSION: Xcode 15.2 (15C500b) MACOS VERSION: macOS Sonoma 14.3.1 (23D60) Any help would be greatly appreciated!
1
1
918
Feb ’24
How to use XCode Cloud with multiple app versions?
I'm investigating converting our pipeline that uses Gitlab runners and Fastlane to XCode Cloud. I think I got the basic workflow set up ok, but the problem comes in when trying to archive to a different version - we generally have the next release in our develop branch, the following release in a delta branch and/or feature branches, and sometimes switch to a far-future version to test things when we don't want a build on the current release to confuse our testing team. With our current setup, we have a Fastlane lane that checks the version in our project, checks the latest build number for that version, and increments it, like so: lane:checkAndIncrementBuildNumber do # Increment the build number localProjectVersion = get_version_number_from_plist( xcodeproj: PROJECT_NAME, target: TARGET_NAME, build_configuration_name: BUILD_CONFIGURATION, plist_build_setting_support: true) current_build_number = latest_testflight_build_number(api_key_path: API_KEY_PATH,version: localProjectVersion) increment_build_number( build_number: current_build_number + 1 ) incrementedBuildNumber = get_info_plist_value(path: INFO_PLIST_PATH, key: "CFBundleVersion") File.write(VERSION_NUMBER_FILE_NAME, localProjectVersion) File.write(BUILD_NUMBER_FILE_NAME, incrementedBuildNumber) File.write(VERSION_BUILD_FILE_NAME, localProjectVersion + " (#{incrementedBuildNumber})") File.write(IPA_FILE_NAME_FILE, IPA_FILE_NAME_START + localProjectVersion.tr(".","") + "b" + incrementedBuildNumber + ".ipa") end Can I just call this lane or something like it in the ci_pre_xcodebuild script? Or is there a way to replicate this functionality without having to set up new workflows every time we switch releases?
0
0
491
Feb ’24
Xcode Cloud - Adding TestFlight Post-Actions for n TestFlight Groups
We have multiple dev teams (let's say 10) and we would like to create a workflow for them to archive a build and push it out to their respective TestFlight team without letting them modify the workflow. Is this possible? Or would we have to create 10 nearly identical workflows, with the only difference being the Post-Action TestFlight group? In GitHub Actions, for example, some actions triggered manually allow you to pass in variables to your workflow when you kick them off.
0
0
408
Feb ’24