Hi I'm using flutter and integrated the repository to xcode cloud to compile the app and in my machine compiles and uploads fine to testflight but using xcode cloud it throws an error
could not find included file 'Generated.xcconfig' in search paths
it does not make sense to me if I'm honest, but I'm running out of options
The other thing I like to confirm is if xcode cloud works at all with flutter, I'm getting the feeling that is the case
Xcode Cloud
RSS for tagAutomate workflows to test, analyze, build, and distribute your app, and integrate them with other developer tools, such as TestFlight and App Store Connect.
Posts under Xcode Cloud tag
197 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
The documentation states that Xcode Cloud comes with support for git lfs (https://developer.apple.com/documentation/xcode/source-code-management-setup) but when I run my unit tests in Xcode Cloud, which have many images which are stored in git lfs, the tests all fail because they don't have the images.
How do I get Xcode Cloud to fetch git lfs images?
Thanks
I encountered this error
2023-01-24T22:14:41.500565325Z Installing ri documentation for cocoapods-catalyst-support-0.2.1
2023-01-24T22:14:41.500827390Z Done installing documentation for colored2, concurrent-ruby, i18n, tzinfo, zeitwerk, activesupport, nap, fuzzy_match, httpclient, algoliasearch, ffi, ethon, typhoeus, netrc, public_suffix, addressable, cocoapods-core, claide, cocoapods-deintegrate, cocoapods-downloader, cocoapods-plugins, cocoapods-search, cocoapods-trunk, cocoapods-try, molinillo, atomos, nanaimo, rexml, xcodeproj, escape, fourflusher, gh_inspector, ruby-macho, cocoapods, cocoapods-catalyst-support after 50 seconds
2023-01-24T22:14:41.500997230Z 35 gems installed
2023-01-24T22:14:42.023353910Z [in /Volumes/workspace/repository]
2023-01-24T22:14:42.023798292Z
2023-01-24T22:14:42.024448317Z [!] Invalid `Podfile` file: cannot load such file -- cocoapods-catalyst-support.
2023-01-24T22:14:42.024714192Z
2023-01-24T22:14:42.024976712Z # from /Volumes/workspace/repository/Podfile:1
2023-01-24T22:14:42.025200239Z # -------------------------------------------
2023-01-24T22:14:42.025463448Z > require 'cocoapods-catalyst-support'
2023-01-24T22:14:42.025663811Z #
2023-01-24T22:14:42.025900158Z # -------------------------------------------
from my post-clone script, which is
#!/bin/sh
# ci_post_clone.sh
export GEM_HOME="$HOME/.gem"
gem install bundler
brew install cocoapods
gem install cocoapods-catalyst-support
# Install dependencies managed with CocoaPods.
pod install
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'.
Hello,
I'm trying to upload my code coverage to an external service.
I've created a workflow on Xcode Cloud that build and run my test + a ci_post_xcodebuild script that uploads my Project.xcresult to an external service
My problem here is that I need the repository source code the moment I upload my coverage file.
I have two steps in my workflow:
Build tests (Which contain the sources but not the coverage results)
Run tests (Which contain the coverage result but not the sources)
I found this in the Apple documentation:
Lastly, it should be noted that in a test action, multiple environments are used to build and run your tests. Only the environment that is used for building your tests will have your source code cloned into it by default. The environments that run your tests won't have source code cloned into them. They'll only have the ci_scripts folder made available on them. As a result, the post-clone script won't run in these environments and your custom scripts and any of their dependencies, such as other shell scripts and small tools, must be entirely contained within the ci_scripts folder.
Source: https://developer.apple.com/videos/play/wwdc2021/10269/
I feel a bit stuck here maybe Xcode cloud is not the way to go for this but I was wondering if by any way I could still check out my project sources after the test execution.
Hi, In our current CI/CD environment, I can easily upload an IPA to Firebase so that we can distribute test versions of the app.
Now we are trying to move the CI/CD to Apple Xcode Cloud and I am trying to figure out how to upload my app to the Firebase Distribution system.
Please advise ;-)
Kind regards,
Wouter
Every time I the Xcode Cloud want to archive the project, after 30 minutes it says "The step invocation hit a user timeout. The xcodebuild archive invocation timed out. No activity has been detected on stdout, stderr or the result bundle in 30 minutes."
I added a step before archiving to build the project and it was ok.
Do you have any suggestions on why this keeps happening? It happens constantly to me.
I'm new to Xcode cloud - working with a Mac OS app, build is working great. Now I am trying to add a Test action; the testing target builds but won't run, and the error indicates it can't find the testing bundle in the expected build output. There's also mention of a code signing error, but I have automatic code signing enabled with the same settings on test target as the app.
I am only running the unit test (XCTest) scheme, not the UI tests. When I run it locally from the IDE it works fine, either selecting the test scheme explicitly or as the test step of the app scheme.
I notice the XCTest target's scheme setup uses Debug builds and expects the test output to be in the Debug .app bundle, I thought perhaps that was the problem (in case only the release app bundle actually gets built in the Xcode Cloud environment). So I created a duplicate scheme and set the build targets to Release - again I can run this fine locally (after creating a release build), but it fails with the same error in Xcode cloud.
I also tried changing the code signing certificate from "Development" to "Sign to run locally" to see if that made a difference, but I get the same error. (It's using my developer account Team, and "Automatically manage signing".)
Can anyone relate the proper way to set up an XCTest scheme so that the tests will actually run in a Mac OS Xcode Cloud workflow? I'm using Xcode 14.0.1.
Here's the full error output, with [AppName] and [TestTargetName] substituted for the actual:
[AppName] (....) encountered an error (Failed to load the test bundle. If you believe this error represents a bug, please attach the result bundle at /Volumes/workspace/resultbundle.xcresult. (Underlying Error: The bundle “[TestTargetName]” couldn’t be loaded. The bundle couldn’t be loaded. Try reinstalling the bundle. dlopen(/Volumes/workspace/TestProducts/Debug/[AppName].app/Contents/PlugIns/[TestTargetName].xctest/Contents/MacOS/[TestTargetName], 0x0109): tried: '/Volumes/workspace/TestProducts/Debug/[TestTargetName]' (no such file), '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/[TestTargetName]' (no such file), '/Volumes/workspace/TestProducts/Debug/[AppName].app/Contents/PlugIns/[TestTargetName].xctest/Contents/MacOS/[TestTargetName]' (code signature in <....> '/Volumes/workspace/TestProducts/Debug/[AppName].app/Contents/PlugIns/[TestTargetName].xctest/Contents/MacOS/[TestTargetName]' not valid for use in process: mapped file has no Team ID and is not a platform binary (signed with custom identity or adhoc?))))
Thanks!
Hi
I'm piloting using Xcode Cloud for my builds. Recently, I inadvertently burned up all my compute hours for the month.
I know I could move to a higher-level plan, but I really want to understand how I can avoid doing this in the future.
I know I can view my usage in App Store Connect but I'm looking for ways to be alerted if my remaining compute hours go below a threshold that gives me time to react.
Questions:
I don't think I got any emails from Apple warning me that my compute hours were near to being used up - should I have received something? I don't see an options for this in the Settings or Usage pages.
I have been using the App Store Connect API and have been going through the API docs trying to find an endpoint that returns the compute hours balance for my account but haven't found one - does one exist?
Thanks,
Dave
When Building with XCode Cloud I receive errors reading Cocoapods xcfilelist files.
The errors are as follows:
Unable to load contents of file list: '/Target Support Files/Pods-<Project Name>/Pods-Anytune-frameworks-Release-output-files.xcfilelist'
Unable to load contents of file list: '/Target Support Files/Pods-Anytune/Pods-<Project Name>-resources-Release-output-files.xcfilelist'
When building through Xcode (Product > Build) everything works, however this is not the case with Xcode Cloud.
I have verified that the xcfilelist paths exist on my machine, however with Xcode Cloud they are unable to load.
I have also tried cleaning, updating and rebuilding my Cocoapods to no avail.
This issue exists on stackoverflow. Link is found here. The solutions here did not work for me.
Any help would be appreciated.
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.
On our projects we have separate targets for staging and production (and also separate accounts). I was able to connect xcode cloud to staging account and builds were working ok, but when I made workflow for production (with same app on gitlab) I could not get access. I never got an option to make new app in gitlab so I went and delete all xcode cloud data and gitlab app. Now when It wants to connect to gitlab I get no option to authorize app or create a new one. I also cannot delete SCM
Setup
I've been experimenting with migrating to Xcode Cloud for our CI but I'm struggling with getting Snapshot Testing to work.
I've been involved in some discussions here... https://github.com/pointfreeco/swift-snapshot-testing/discussions/553
And I saw this site also which explains a little... https://wojciechkulik.pl/xcode/xcode-cloud-overview-and-setup
But so far I've been unsuccessful in getting it to work at all.
I'm using the swift-snapshot-testing library from PointFree https://github.com/pointfreeco/swift-snapshot-testing and I have overridden the assertSnapshot function to change the snapshot testing directory.
The function looks like this...
func snapshotDirectory(
for file: StaticString,
ciScriptsPathComponent: String = "ci_scripts",
relativePathComponent: String = "Tests"
) -> String {
var sourcePathComponents = URL(fileURLWithPath: "\(file)").pathComponents
if let indexFolder = sourcePathComponents.firstIndex(of: relativePathComponent) {
sourcePathComponents.insert("resources", at: indexFolder)
sourcePathComponents.insert(ciScriptsPathComponent, at: indexFolder)
}
var pathsComponents: [String] = sourcePathComponents.dropLast()
let fileUrl = URL(fileURLWithPath: "\(file)", isDirectory: false)
let folderName = fileUrl.deletingPathExtension().lastPathComponent
pathsComponents.append("__Snapshots__")
pathsComponents.append(folderName)
let directory = String(pathsComponents.joined(separator: "/").dropFirst())
return directory
}
public func assertSnapshot<Value, Format>(
matching value: @autoclosure () throws -> Value,
as snapshotting: Snapshotting<Value, Format>,
named name: String? = nil,
record recording: Bool = false,
timeout: TimeInterval = 5,
file: StaticString = #file,
testName: String = #function,
line: UInt = #line
) {
let failure = verifySnapshot(
matching: try value(),
as: snapshotting,
named: name,
record: recording,
snapshotDirectory: snapshotDirectory(for: file),
timeout: timeout,
file: file,
testName: testName
)
guard let message = failure else { return }
XCTFail("\(message) snap: \(snapshotDirectoryUrl) file: \(file) ", file: file, line: line)
}
Essentially this takes my test file path... repoRoot/Tests/FeatureTests/FeatureTestFile.swift.
And injects some path component into it so that you end up with a directory path... repoRoot/ci_scripts/resources/Tests/FeatureTests/__Snapshots__/FeatureTestFile/.
And then the snapshot file will be located in that directory using the name of the test function with a suffix of .1.txt or .2.txt (etc... for each subsequent snapshot in each function). i.e. testSnapshotStuff.1.txt, testSnapshotStuff.2.txt.
Problem
This all works locally. And all the files are checked into GitHub.
But, when I run this on Xcode Cloud it fails the tests and tells me the files are not there.
Having added some logging in it is writing new snapshot files to where I am expecting them to be so it just looks like those files are not available to the Test environment.
This is where I read about putting them into the ci_scripts file at the root of the repo. Which is what I've done. Files in this directory are supposed to be copied into the test environments so that they can be accessed... but it seems that they're not being.
I have tried using ci_scripts/resources and ci_scripts/Artifacts but it's always the same. The files aren't there and the Xcode Cloud tests write those files there over time.
I'm running out of options of what to do with this now. I just want a way that I can access these snapshot files in the test environment on Xcode Cloud.
Any help would be much appreciated.
Thanks
Hello. I'm using XCode Cloud to replace an existing fastlane workflow where the end result is to post an IPA to in internal Slack channel. I've written a ci_post_xcbuildscipt.sh and it runs:
xcodebuild -exportArchive -archivePath ${CI_ARCHIVE_PATH} -exportPath ${EXPORT_PATH} -exportOptionsPlist ${EXPORT_OPTIONS} -authenticationKeyIssuerID ${AUTH_KEY_ISSUER_ID} -authenticationKeyID ${AUTH_KEY_ID} -authenticationKeyPath ${AUTH_KEY_PATH} -allowProvisioningUpdates
My problem is resigning the IPA with the environment variables set as secrets. The autenticationKeyPath expects to be a file, but I'm only able to pass strings as environment variables.
I tried passing the key as a string and in my script writing it to a file, but the result is always an empty file. I've tested locally and this idea works, so I think it's a consequence of how the environment variables are protected when marked as a secret.
Any suggestions on how I could successfully export my archive but keep the key a secret?
In the "Resolve package dependencies" step I see this error occur:
Scheme <scheme-name> is not currently configured for the build action.
I cannot reproduce locally. When I run the command: xcodebuild -resolvePackageDependencies it finishes fine.
I'm on Xcode 13.4.1 and MacOS 12.4.1
Other things I've tried:
Verified scheme is in the workspace (not the project)
Deleted all schemes and auto created schemes again
Recreating the build action in the scheme
Enabled all actions in the scheme
Hello,
Has anyone used Sentry with Xcode Cloud? How are you uploading dSYM files? One way is fastlane but Xcode Cloud doesn't come with Fastlane preinstalled, the other is sentry-cli but the same issue, it's not preinstalled.
I'm installing texturepacker in ci_post_clone.sh script using below command in Xcode Cloud workflow.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
brew install --cask texturepacker
But I'm getting sudo warning in log.
==> Downloading https://www.codeandweb.com/download/texturepacker/6.0.2/TexturePacker-6.0.2.dmg
==> Installing Cask texturepacker
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
==> Purging files for version 6.0.2 of Cask texturepacker
Error: Permission denied @ dir_s_mkdir - /usr/local/Caskroom
How can i fix this issue? Any idea or suggestions would be appreciated.
Thank You
I'm having issue using Xcode Cloud with my developer account. I have active Apple Developer Program membership (Individual) associated with my Apple ID:
Same Apple ID is the only Apple ID added in Preferences > Accounts in Xcode 13.4.1 (13F100). But with that setup, for any project I can try, Report Navigator > Cloud tab shows this error:
Your developer account is not a member of a team that is eligible to use Xcode Cloud
And Product > Xcode Cloud > Create Workflow... shows error
This operation could not be completed.
If I switch to a different developer account that I have (associated with a team, not individual membership) – the issue is resolved and I can start creating first Xcode Cloud workflow in same projects.
Can Xcode Cloud be used with individual ADP memberships?
If so, why my account is not eligible?
How can I further diagnose the problem?
By default, Xcode Cloud workflow provides no test notes for TestFlight uploads. I'd like to have string with git commit message and git commit hash instead of "No test notes" message.
Is it possible?
Here is my ci_post_clone.sh
#!/bin/sh
# fail if any command fails
set -e
# debug log
set -x
# Install CocoaPods using Homebrew.
HOMEBREW_NO_AUTO_UPDATE=1 # disable homebrew's automatic updates.
brew install cocoapods
# Install Flutter using git.
git clone https://github.com/flutter/flutter.git -b stable $HOME/flutter
export PATH="$PATH:$HOME/flutter/bin"
# Install Flutter artifacts for iOS (--ios), or macOS (--macos) platforms.
flutter precache --ios
# Install Flutter dependencies.
flutter channel master
flutter doctor
flutter pub get
# Generate IOS file
flutter build ios --release --no-codesign
# Install CocoaPods dependencies.
#cd ios && pod install # run `pod install` in the `ios` directory.
exit 0