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

Secret Environment Variables with Xcode Cloud
I see from the WWDC video that it's possible to use secrets, like an API_KEY variable, when running Xcode Cloud builds. How are these variables accessed from code? Is it something like this? ProcessInfo.processInfo.environment["API_KEY"] If so, how are we supposed to run the tests locally? Is the idea that every developer creates their own non-shared schemes and adds all secret environment variables to that scheme?
1
0
1.8k
Mar ’22
Watch app version issue in Xcode Cloud
I've been building our app to make a release in App Store with Xcode Cloud Currently the builds are failing with the following error: The value of CFBundleShortVersionString in your WatchKit app's Info.plist (3.9.0) does not match the value in your companion app's Info.plist (4.7.0). These values are required to match. This is strange, as in our ci_pre_xcodebuild script we have an invocation of the code echo "Version: ${versionNumber}" echo "Setting version string in plists" echo "iOS Version:" /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $versionNumber" $CI_WORKSPACE/MainApp/Resources/Plists/Info.plist /usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString $versionNumber" $CI_WORKSPACE/MainApp/Resources/Plists/Info.plist echo "Watch Version:" /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $versionNumber" $CI_WORKSPACE/WatchApp/Info.plist /usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString $versionNumber" $CI_WORKSPACE/WatchApp/Info.plist echo "Watch Extension Version:" /usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $versionNumber" $CI_WORKSPACE/WatchAppExtension/Resources/Info.plist /usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString $versionNumber" $CI_WORKSPACE/WatchAppExtension/Resources/Info.plist On which the command executes correctly and shows the right output. Then I don't understand what's going on. This workflow was working a couple weeks ago and we haven't done a change to it since then. Any ideas of what could it be?
2
1
1.9k
Feb ’22
Xcode cloud and unlinking SCM
Today, playing with Xcode cloud I came across a really nasty, undesirable effect of executing steps in an undocumented order. I had a project with a brand new workflow, I had it linked to my SCM (gitlab self-hosted) and it worked. Today, it didn't work so I thought, OK, this thing is beta and something must not be working that well, let's reset everything and start over. I deleted the workflow, then cleared the Xcode cloud data (this removes everything from your Xcode cloud tabs on your product and, unfortunately, from your profile as well). Then proceed to navigate to your profile to unlink the SCM connection and it appears to be empty. Because of this, I removed my application in gitlab (which is the token provider for oath) to start again, thinking I did something wrong and I want to follow the steps brand new again. I went to Xcode, tried to create a new workflow and link my source control provider and... I get a "continue to authorise your repository" button, which is now broken because that application doesn't exist. The question is, does anybody know of a way to unlink my SCM from my account? The Xcode cloud tab under my profile tells me I need to create a workflow to access anything from there, but I am completely unable to complete that creation as the workflow requires it to be connected to a self hosted instance. This was extremely easy to get wrong.
5
0
1.9k
Nov ’21