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

Sharing variables between ci scripts in Xcode Cloud.
Hello! I am new to creating workflows in Xcode cloud. I have a problem I'm trying to solve. In my ci_post_clone script I trigger a job in github. I need to keep track of the generated id in order to shut down the job in my ci_post_xcodebuild script. What is the best way to do that? I tried assigning to a env variable and outputting the value to a file but it seems like ci_post_xcodebuild runs in a fresh env and can't find my variable. Any help would be really appreciated.
0
0
216
Jul ’24
Xcode cloud queue taking long
Hi, When a workflow is started, its taking more than an hour to start the actual archive and in all this time its stuck in the queue. When it starts after more than an hour, the archive is also taking more than 30 minutes and once this whole process reaches 2 hours, it just fails with this error, Build has exceeded the maximum allotted time. Each build can run for up to 120 minutes. If a build has not yet finished at this time, all incomplete actions will be cancelled. I have been using Xcode cloud for long time now but never experienced such behavior before. What is the issue?
2
1
354
Jul ’24
How can I specify which git branch for Xcode Cloud to run a workflow on with a manual start condition?
We have all of our CD except for deploys in another provider for the moment. From that provider (Github Actions), we want to use the API to kick off a deploy/archive workflow. We're using the new manual start condition that gets called if everything else in our pipeline passes. However, it's not clear how to specify which branch to run the workflow on. I know you can get the ScmGitReference when the workflow is already running on a branch based off of other start conditions, but I want to allow the deploy to run on any branch, theoretically, and control whether the deploy workflow gets kicked off or not from my third-party location. How do I do this?
1
0
302
Jul ’24
Xcode Cloud: No signing certificate Mac Development
Hello, I am getting the following error in Xcode Cloud: /Volumes/workspace/repository/macos/Runner.xcodeproj: error: No signing certificate "Mac Development" found: No "Mac Development" signing certificate matching team ID "22649D52Q5" with a private key was found. (in target 'Runner' from project 'Runner') I have automatic signing turned on in Xcode and the program compiles/runs fine in Xcode. Below is my ci_post_clone.sh script #!/bin/sh # Fail this script if any subcommand fails. set -e # The default execution directory of this script is the ci_scripts directory. cd $CI_PRIMARY_REPOSITORY_PATH # change working directory to the root of your cloned (cloud) repo. # Install Flutter using git. git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter export PATH="$PATH:$HOME/flutter/bin" # Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms. flutter precache --macos # Install Flutter dependencies. flutter pub get # Install CocoaPods using Homebrew. HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates. brew install cocoapods # Install CocoaPods dependencies. cd macos pod deintegrate pod update cd .. # Install Flutter dependencies. flutter pub get dart run build_runner build -d # flutter build macos flutter build macos --release
1
0
390
Jul ’24
Unable to Setup XCode Cloud
Hi, I am trying to setup a workflow for my project and I am not able to get to the "Grant Access" step. After I click "Next" on the workflow, I see a "Grant Access to Your Source Code" window with "Loading source code repositories" message and a loading spinner. I see an error "This operation could not be completed". Clicking OK will just show me the previous Loading message. My XCode is configured with our GitHub account. The lack of any error or steps for resolution is not helping. How do I proceed?
3
0
424
Jul ’24
NodeJS available in Xcode Cloud CI?
My app requires NodeJS to build (a Cordova app). Can I even use XCode Cloud to build it? Can I run Docker containers, or can I install NodeJS via a prebuild script? (BTW I'm only looking into this service as alternative to my existing Gitlab-CI + fastlane because I have been unable to automate my iOS app build due to all the signing/provisioning BS that apple requires! )
1
0
300
Aug ’24
XCode Cloud Aborting after 2 hours
Hi all, I have a UI Automation Test suite with a large number of test cases, that typically takes me 7 hours to run. When I setup the workflow on XCode cloud, I received the following error - "Build has exceeded the maximum allotted time. Each build can run for up to 120 minutes. If a build has not yet finished at this time, all incomplete actions will be cancelled." Is there any way to extend the build time? What is a build? I have two actions in my workflow. Build Action (that took 3 minutes) and the test step that took 2 hour 4 minutes. Am not clear how the 120 minute window is calculated.
1
0
302
Aug ’24
Xcode Cloud Webhooks - Unexpected response code for CONNECT: 403
I have registered a webhook URL but for every event triggered, my webhook URL does not receive any POST request. In my App Store Connect Xcode Cloud > Webhook Setting, I can see all the webhook failed to send, they all returned `Unexpected response code for CONNECT: 403 ` I tried testing my webhook URL from Postman, it works fine, but not from Xcode Cloud Webhook.
1
0
274
Aug ’24
XCode Cloud Developer ID Can't Codesign DMG File
I am using Xcode Cloud to build my Mac Catalyst app for Developer ID Distribution as a DMG package that must be codesigned and notarized. I have a ci_post_xcodebuild.sh script that runs after the Archive action. This needs to perform the following tasks: Produce a DMG from the provided exported archive located at CI_DEVELOPER_ID_SIGNED_APP_PATH Codesign that DMG using the same certificate identity that Xcode Cloud used when automatic code signing the exported archive using cloud signing. Notarize that code signed dmg with the notary service Generate a Sparkle appcast.xml file Upload the DMG and appcast.xml file to s3 The issue I am having is that I do not have access to the cloud signing keychain identity that Xcode Cloud uses to automatically codesign the exported archive. I check for identities and none are found. Running: security find-identity -v -p codesigning There are no code signing identities available. Make sure you have a "Developer ID (Application)" certificate (with the private key) installed on your Mac with Keychain Access. How can I access the cloud signing identity in this script so I can sign my DMG file before notarizing it? I am currently experimenting with installing my own certificate in the build server keychain and run my own archive + export commands after the Build action completes. This is not ideal. Thanks, Andrew
0
3
314
Aug ’24
Xcode Cloud build failing with 502 HTTP error at code-signing step
Having an issue today where archives on Xcode Cloud are failing at the Code Signing step. The error reported by Xcode Cloud has been one of the 2 following: 502 error from developerservices2.apple.com Unexpected character 'u' (I assume this is in some way related to the HTTP failure above, but please correct me if I'm wrong) Sometimes they even appear together, with the HTTP error as a warning and the unexpected character as the error I assume this is some kind of Xcode Cloud / developer tools outage. I saw another post on the forum from 3 weeks ago that reported the same errors coming from Xcode Cloud. I also saw that there is a "Resolved Outage" with Xcode Cloud from 8/19 (maybe that is related)? Has anyone found a way around this? Any updates on when this will be resolved? It has been happening for us consistently since the first Xcode Cloud archive that we ran today (around 10AM EDT).
5
3
372
Aug ’24
Xcode Cloud builds failing with random 502 errors when resolving pods
Since we integrated xcode cloud into our project, workflows fail randomly when resolving dependencies from cocoapods (specifically when fetching the repo from github). The error is a 502 so seems like server side, and if we rebuild is usually goes away but we have to be constantly rebuilding failing workflows, loosing minutes and dev time instead of having it automated as we wanted. Any ideas?
2
0
261
Aug ’24
Xcode Cloud TestFlight step hanging?
For the last hour or so, builds to TestFlight from our Xcode Cloud workflow are sitting in the "TestFlight Internal Testing - iOS" step with no log messages... Normally this step is pretty quick, but it's as if something is hanging there. This seems to affect multiple branches (we use GitHub). Is something hosed on the TestFlight side/anyone else experiencing this? Edit ah shortly after I posted this it finished :face-palm:. Perhaps this was related to the Xcode Cloud outage earlier
1
0
272
Aug ’24
Symbol missing when building in Xcode cloud with Xcode 16 beta and running on macOS 14.6
We have a cross platform app that we build with Xcode Cloud and distribute via TestFlight. We want to test builds with the Xcode Beta. So we have the following build environment: Xcode version: Xcode 16 beta 6 (16A5230g) macOS Version: macOS Sonoma 14.5 (23F79) Everything builds and submits to TestFlight fine. The App runs fine on iOS 18 beta and macOS 15 beta. But when attempting to install via TestFlight and launch the App on macOS 14..6.1 it crashes immediately with what appears to be a missing Foundation symbol. Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Termination Reason: Namespace DYLD, Code 4 Symbol missing Symbol not found: _$s10Foundation14NSDecimalRoundyySpySo0B0aG_SPyADGSiSo14NSRoundingModeVtF Referenced from: <CBEBC813-C7B6-3D8E-BE62-16F2EFFEB1FE> /Applications/MyApp.app/Contents/MacOS/MyApp Expected in: <2F87A303-430F-3EA5-9492-3033F4FEE64B> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (terminated at launch; ignore backtrace) Thread 0 Crashed: 0 dyld 0x7ff8139f687a __abort_with_payload + 10 1 dyld 0x7ff813a0f7f7 abort_with_payload_wrapper_internal + 82 2 dyld 0x7ff813a0f829 abort_with_payload + 9 3 dyld 0x7ff81399c2b5 dyld4::halt(char const*, dyld4::StructuredError const*) + 335 4 dyld 0x7ff8139994bd dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 4099 5 dyld 0x7ff8139982e4 start + 1812 Is it expected that this should work? Is this a known issue? Is there any workaround for it? Should I file feedback or a DTS?
11
4
1.2k
Aug ’24
Could not resolve host: repository.map.naver.com
Hi, I am using Xcode Cloud to build our app, and our app has the cocoapods dependency NMapsMap(Korean map library from Naver inc.). https://navermaps.github.io/ios-map-sdk/guide-en/ The library uses git-lfs to download its data for the map, however it keeps failing and retrying 3 times to download with this error(and finally fails) Showing All Messages [!] Error installing NMapsGeometry [!] /usr/bin/curl -f -L -o /Volumes/workspace/tmp/d20240826-7482-5cn94o/file.zip https://repository.map.naver.com/archive/pod/NMapsGeometry/1.0.2/NMapsGeometry.zip --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.15.2 cocoapods-downloader/2.1' % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: repository.map.naver.com Warning: Problem : timeout. Will retry in 1 seconds. 2 retries left. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: repository.map.naver.com Warning: Problem : timeout. Will retry in 2 seconds. 1 retries left. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: repository.map.naver.com My ci_post_clone.sh file is here, and doesn't seem to have something to be wrong. export HOMEBREW_NO_INSTALL_CLEANUP=1 brew install cocoapods pod install The issue could be DNS server issue between Apple Xcode Cloud servers and Naver repositories server, so I also posted to the Naver cloud forum. Please help for this issue, and hope the build can resolve the host soon. Nowadays I manually build and distribute the codes in manual...
2
0
261
Aug ’24
What causes 502s when Xcode Cloud clones from GitHub?
I have an inconsistent Xcode Cloud failure that I'm hoping to learn more about? Additional context is available in Apple Support case 102378073626 and Feedback Assistant FB13769150. Every 3 months, ~half of my project's Xcode Cloud builds will fail for a few days in a row. I usually file a support request with Apple, they fix something on their end, builds succeed, and then exhibit the same failures again in 3 months. I'm hoping to learn anything that y'all can share about: Why does this happen? Does it coincide with new macOS versions being deployed onto Xcode Cloud? What did Apple do to fix it each time? Is there anything I can change about my project to make the failure less likely? (Such as putting a delay between the clone, brew install, and pod install steps that all hammer GitHub?) Specific symptoms: Xcode Cloud builds will fail after receiving an HTTP 502 from GitHub. This usually happens when it attempts to clone a repo, brew install, or pod install. One example: [!] Error installing FirebaseSessions [!] /usr/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /Volumes/workspace/tmp/d20240809-12044-znknw7 --template= --single-branch --depth 1 --branch CocoaPods-10.28.0 Cloning into '/Volumes/workspace/tmp/d20240809-12044-znknw7'... error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 fatal: expected flush after ref listing Error Command exited with non-zero exit-code: 1
0
0
219
Aug ’24