Continuous Integration

RSS for tag

Continuous integration is the process of automating and streamlining the building, analyzing, testing, and archiving of your apps, in order to ensure that they are always in a releasable state.

Posts under Continuous Integration tag

46 Posts
Sort by:
Post not yet marked as solved
0 Replies
57 Views
I've been using Xcode Server for a few days for the continuous integration of our projects. Most of the time, it works as expected : the projects compiles, the unit tests are executed with success, then I have a post-integration script that compiles an archive and upload it to TestFlight (using Fastlane). It works. Most of the time... Once in a while, I get a "internal-processing-error" value (instead of "success" or "warnings") in XCS_INTEGRATION_RESULT variable, after the unit tests have passed. I've been trying to look into the bot logs to find any useful information, but no luck 'til now. Does anyone have an idea about what I could do to move forward on this issue ?
Posted
by neywen.
Last updated
.
Post not yet marked as solved
4 Replies
399 Views
From the release notes of Xcode 14: "Xcode Server is no longer supported. (73888675)" I haven't read or heard that being mentioned somewhere else. Does anybody knows, what that means for Xcode Server users? What is the plan to support corporations, which can not share the code to other companies and thus can not use Xcode Cloud for testing. ...or the ones, that just can't (or do not want to) afford Xcode Cloud? Are we off to other CI/CD solutions?
Posted
by AlexMCC.
Last updated
.
Post not yet marked as solved
0 Replies
147 Views
Recently we get more and more problems due to non bootstraping or starting simulator clones on parallel testing. Unit & UI-Tests were all successful but the status is failed, because of this errors 'The test runner encountered an error (Failed to prepare device 'Clone 1 of iPhone 12' for impending launch.' The test runner encountered an error (Failed to prepare device 'Clone 4 of iPhone 12' for impending launch. CI environments are MacMinis based on intel and apple silicons, with Xcode 13.3.1.
Posted Last updated
.
Post marked as solved
1 Replies
352 Views
I'm using a Mac Mini as a Jenkins agent, which we use to run our Xcode tests on physical iOS devices. It's configured for remote access with SSH & screen sharing with VNC. Every few days they start failing completely. Sometimes one of them is up a bit longer, but more usually they're both down. If I look in the GUI it says it's running. The correct ports are listening. In Console I can see that the sshd process exits with 255 the instant it's started, but I haven't been able to get anything more specific. I've found that I can get SSH & VNC access back with launchctl bootout system/<svc name> launchctl disable system/<svc name> launchctl enable system/<svc name> launchctl bootstrap system <plist file name> The problem is that I can't tell from the remote device that it's not accessible by SSH/VNC. The different interfaces say that sure, everything's fine. When I do a launchctl print there are some differences between the non-working and working versions. I don't know if these are actual indicators that it's down, or artifacts of the way I restarted them. The differences are consistent for both VNC & SSH: Not working but apparently running: path = (submitted by smd.215) submitted job. ignore execute allowed. system service = 0 Working after launchctl stop/restart: path = /System/Library/LaunchDaemons/<plist file> system service = 1 So, a few questions: Has anyone else seen this? Is there some way to get more error information about why sshd is exiting in the logs/console? Is there a way to detect that sshd is failing, even though there's no system log entry for the failure, and the various interfaces show that everything's fine? What's the cleanest way to tell the system to restart remote access every day just in case it can't be identified any other way?
Posted
by kbrock.
Last updated
.
Post not yet marked as solved
3 Replies
604 Views
We have a bit of a complicated build process and need to build the Widget outside of our main app and repackage since we are using a cross platform framework. I tried scripting out updating my Widget's Marketing Version but agvtool won't update the MARKETING_VERSION in the project.pbxproj file. Therefore, we end up getting these emails from Apple: ITMS-90473: CFBundleShortVersionString Mismatch - The CFBundleShortVersionString value ‘1.2.2’ of extension ‘MyiOSApp.app/PlugIns/widgetExtension.appex' does not match the CFBundleShortVersionString value ‘1.2.3' of its containing iOS application ‘MyiOSApp.app'. I run this and it says it's updating in the Widget plist (but not the project.pbxproj) so when I build with xcode via command line it doesn't update and when we submit to the App Store we get the above message from Apple: /usr/bin/agvtool new-marketing-version $(/usr/libexec/PlistBuddy -c "Print :CFBundleShortVersionString" ../My.Crossplatform.App/My.Crossplatform.App.iOS/Info.plist) Setting CFBundleShortVersionString of project ios to:    1.2.3. Updating CFBundleShortVersionString in Info.plist(s)... Cannot find "ios.xcodeproj/../YES" Updated CFBundleShortVersionString in "ios.xcodeproj/../widget/Info.plist" to 1.2.3 I've had to resort to manually updating then submitting every time. What is the correct way to update the MARKETING_VERSION in the project.pbxproj file in a CI environment using bash?
Posted Last updated
.
Post not yet marked as solved
0 Replies
174 Views
Hello, We have multiple iOS real devices attached to a Mac mini which serve as a server in a CI pipeline. From iOS 15 after a few hours, the phone requires the pin code, even if the UI automation is enabled and the pin was set at the first run. A few mentions: We need to have a pin set because the app under test needs a pin for security reasons We set the display to never sleep because we cannot unlock the phone through the automation script For automation, we're using Appium (https://github.com/appium/appium) My question is, how can we handle the case without unlocking manual the phone considering that we're using the devices in a CI pipeline?
Posted
by alexki07.
Last updated
.
Post not yet marked as solved
0 Replies
172 Views
I am running my UI Tests on Github CI and the tests are flaky. I don't understand how I can fix it. The animations are disabled and I am running the tests on a iPhone 13 plus. A lot of tests are running green, but some are not working. Locally, I got everything working. These are some logs: 2022-06-21T13:42:23.2627250Z t = 63.34s Tap Cell 2022-06-21T13:42:23.2707530Z t = 63.34s Wait for com.project.project to idle 2022-06-21T13:42:23.2733620Z t = 63.41s Unable to monitor event loop 2022-06-21T13:42:23.2734250Z t = 63.41s Unable to monitor animations 2022-06-21T13:42:23.2734800Z t = 63.42s Find the Cell 2022-06-21T13:42:24.1158670Z t = 64.45s Find the Cell (retry 1) 2022-06-21T13:42:24.1287900Z t = 64.45s Collecting extra data to assist test failure triage 2022-06-21T13:42:24.2022460Z /Users/runner/work/project/UITestCase.swift:665: error: -[project.UserTagTest testTapInTextView] : Failed to get matching snapshot: Lost connection to the application (pid 12676). (Underlying Error: Couldn’t communicate with a helper application. Try your operation again. If that fails, quit and relaunch the application and try again. The connection to service created from an endpoint was invalidated: failed to check-in, peer may have been unloaded: mach_error=10000003.) It can not find the cell because of these logs: Unable to monitor event loop Unable to monitor animations I know this because I sometimes get different errors than the error above, which says that the connection to the application is lost, right below the Unable to monitor... error logging. Is there anything I can try? I don't have a reproduction project. This is the command that is executed: xcodebuild test -project project.xcodeproj -scheme project-iosUITests -destination 'platform=iOS Simulator,name=iPhone 13 Pro,OS=15.5' The CI runs 35 tests and 5 fails randomly with the Unable to errors. Is there any suggestion to fix this problem?
Posted
by Jasperav.
Last updated
.
Post not yet marked as solved
0 Replies
173 Views
I want to use TestFlight to distribute a beta version of my app but I don't want it to point to my production environment. After testing, I would like to submit a build to the app store that point to my production environment. However, I do not want to include a setting in my app that allows for changing environments because I don't want production users doing that. What is the best practice in this case? For now, I am not using TestFlight to distribute my beta version and then I separately make a build pointing to production that gets sent to Apple.
Posted Last updated
.
Post not yet marked as solved
0 Replies
228 Views
Hi, We are currently using xcframework dependencies in our large project and we've got a compile time of ~15min on CircleCI. We are trying to move a few dependencies from xcframework to Swift Package Manager but I'm seeing that there is a lot of time being added to our compile time as xcodebuild will always compile spm also. I've tried caching SourcePackage to limit the download steps but I wasn't able to find a way to cache the spm dependency builds also. Is this possible ? What is the strategy of compiling large projects with multiple SPM dependencies on a CI system.
Posted
by mmdumiwip.
Last updated
.
Post not yet marked as solved
4 Replies
5.7k Views
Hi,I'm attempting to use xcodebuild to automate our release process. Because our build has an associated provisioning profile, I have added the `-allowProvisioningUpdates` flag to the xcodebuild command.If I run my xcodebuild command while logged in locally to the build machine, Xcode's automatic process of downloading the correct prov profile appears to work - the archive completes succesfully.However. If I ssh into the build machine and run the exact same xcodebuild command, I get the following error.2019-10-08 00:04:50.828 xcodebuild[53165:1665565] DVTPortal: Service '' encountered an unexpected result code from the portal ('1100') 2019-10-08 00:04:50.828 xcodebuild[53165:1665565] DVTPortal: Error: Error Domain=DVTPortalServiceErrorDomain Code=1100 "Your session has expired. Please log in." UserInfo={payload={type = mutable dict, count = 9, entries =&gt; 0 : responseId = {contents = "78442697-9dda-449d-90b7-cfc0d646fde4"} 2 : {contents = "protocolVersion"} = QH65B2 3 : {contents = "requestUrl"} = {contents = "https://developerservices2.apple.com/services/QH65B2/viewDeveloper.action"} 6 : {contents = "userLocale"} = en_US 8 : resultCode = {value = +1100, type = kCFNumberSInt64Type} 9 : userString = {contents = "Your session has expired. Please log in."} 10 : {contents = "resultString"} = {contents = "Your session has expired. Please log in."} 11 : httpCode = {value = +200, type = kCFNumberSInt64Type} 12 : {contents = "creationTimestamp"} = {contents = "2019-10-07T22:04:50Z"} } , NSLocalizedDescription=Your session has expired. Please log in.}In my attempts to fix this issue I made sure the login keychain was unlocked using the `security` command, but it made no difference.Is there any way of fixing this? Is it possible to log into the service via the command line?The user I ssh in as is present in the Accounts pane of Xcode, but I guess this login is somehow "lost" over ssh.Thanks in advance!Heather.
Posted
by Hexcode.
Last updated
.
Post not yet marked as solved
4 Replies
688 Views
Hi, I'm using fastlane to build/sign my project and it works perfectly when I ran it in my Mac. I'm trying to setup some Jenkins CI/CD server in AWS EC2, and I started to have a problem with code sign. I realized that it's not something related to AWS, because if I ssh to my own Mac using "ssh localhost" it's possible to simulate the problem. To isolate the problem, I'm using this very simple project with fastlane: https://github.com/rlechetaudemy/helloios This issue is also not related with match, because if you setup fastlane with manual signing, it returns the same error. I also tried to use the 'setup_ci' action before build/sign but without success. setup_ci( force: true ) These are the logs: [13:11:36]: ▸ Copying GoogleService-Info.plist [13:11:37]: ▸ Processing Info.plist [13:11:38]: ▸ ** ARCHIVE FAILED ** [13:11:38]: ▸ The following build commands failed: [13:11:38]: ▸ CodeSign /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS\ (iOS)/InstallationBuildProductsLocation/Applications/HelloIOS.app (in target 'HelloIOS (iOS)' from project 'HelloIOS') [13:11:38]: ▸ (1 failure) ▸ Processing Pods-HelloIOS (iOS)-Info.plist ▸ Processing Info.plist ** ARCHIVE FAILED ** The following build commands failed: CodeSign /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS\ (iOS)/InstallationBuildProductsLocation/Applications/HelloIOS.app (in target 'HelloIOS (iOS)' from project 'HelloIOS') (1 failure) [13:11:38]: Exit status: 65 +---------------+-------------------------+ |      Build environment      | +---------------+-------------------------+ | xcode_path  | /Applications/Xcode.app | | gym_version  | 2.205.2         | | export_method | ad-hoc         | | sdk      | iPhoneOS15.2.sdk    | +---------------+-------------------------+ [13:11:38]: ▸              (ef0fada7-88c4-413f-a9e5-7d875f07e324) [13:11:38]: ▸     [13:11:38]: ▸   /usr/bin/codesign --force --sign CB4DB01189506EF6F172982414A36378AE18F48F --entitlements /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS\ (iOS)/IntermediateBuildFilesPath/HelloIOS.build/AdHoc-iphoneos/HelloIOS\ (iOS).build/HelloIOS.app.xcent --generate-entitlement-der /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS\ (iOS)/InstallationBuildProductsLocation/Applications/HelloIOS.app [13:11:38]: ▸ /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS (iOS)/InstallationBuildProductsLocation/Applications/HelloIOS.app: errSecInternalComponent [13:11:38]: ▸ Command CodeSign failed with a nonzero exit code [13:11:38]:  [13:11:38]: ⬆️ Check out the few lines of raw xcodebuild output above for potential hints on how to solve this error [13:11:38]: 📋 For the complete and more detailed error log, check the full log at: [13:11:38]: 📋 /Users/user/Library/Logs/gym/HelloIOS-HelloIOS (iOS).log [13:11:38]:  [13:11:38]: Looks like fastlane ran into a build/archive error with your project [13:11:38]: It's hard to tell what's causing the error, so we wrote some guides on how [13:11:38]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/ [13:11:38]: Before submitting an issue on GitHub, please follow the guide above and make [13:11:38]: sure your project is set up correctly. [13:11:38]: fastlane uses xcodebuild commands to generate your binary, you can see the [13:11:38]: the full commands printed out in yellow in the above log. [13:11:38]: Make sure to inspect the output above, as usually you'll find more error information there [13:11:38]:  +---------------------------+----------------------------------------------------------+ |                   Lane Context                   | +---------------------------+----------------------------------------------------------+ | DEFAULT_PLATFORM     | ios                           | | PLATFORM_NAME       | ios                           | | LANE_NAME         | ios firebase                       | | KEYCHAIN_PATH       | ~/Library/Keychains/fastlane_tmp_keychain        | | ORIGINAL_DEFAULT_KEYCHAIN | "/Users/user/Library/Keychains/fastlane_tmp_keychain-db" | +---------------------------+----------------------------------------------------------+ [13:11:38]: Error building the application - see the log above +------+-------------------------------+-------------+ |         fastlane summary         | +------+-------------------------------+-------------+ | Step | Action            | Time (in s) | +------+-------------------------------+-------------+ | 1  | Verifying fastlane version  | 0      | | 2  | default_platform       | 0      | | 3  | Switch to ios buildAdHoc lane | 0      | | 4  | setup_ci           | 0      | | 5  | cocoapods           | 4      | | 💥  | build_app           | 36     | +------+-------------------------------+-------------+
Posted
by rlecheta.
Last updated
.
Post marked as solved
7 Replies
3.9k Views
Is anyone else seeing XCUITest fail for tap()ing elements that happen to be offscreen?The code is finding the element exists, but when calling tap(), nothing at all happens if the element is scrolled off-screen.Thanks!
Posted
by Monicker.
Last updated
.
Post not yet marked as solved
0 Replies
344 Views
Hi, I'm using fastlane to build/sign my project and it works perfectly when I ran it in my Mac. I'm trying to setup some Jenkins CI/CD server in AWS EC2, and I started to have a problem with code sign. I realized that it's not something related to AWS, because if I ssh to my own Mac using "ssh localhost" it's possible to simulate the problem. To isolate the problem, I'm using this very simple project with fastlane:  https://github.com/rlechetaudemy/helloios This issue is also not related with match, because if you setup fastlane with manual signing, it returns the same error. I also tried to use the 'setup_ci' action before build/sign but without success. setup_ci( force: true ) These are the logs: [13:11:36]: ▸ Copying GoogleService-Info.plist [13:11:37]: ▸ Processing Info.plist [13:11:38]: ▸ ** ARCHIVE FAILED ** [13:11:38]: ▸ The following build commands failed: [13:11:38]: ▸ CodeSign /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS\ (iOS)/InstallationBuildProductsLocation/Applications/HelloIOS.app (in target 'HelloIOS (iOS)' from project 'HelloIOS') [13:11:38]: ▸ (1 failure) ▸ Processing Pods-HelloIOS (iOS)-Info.plist ▸ Processing Info.plist ** ARCHIVE FAILED ** The following build commands failed: CodeSign /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS\ (iOS)/InstallationBuildProductsLocation/Applications/HelloIOS.app (in target 'HelloIOS (iOS)' from project 'HelloIOS') (1 failure) [13:11:38]: Exit status: 65 +---------------+-------------------------+ |      Build environment      | +---------------+-------------------------+ | xcode_path  | /Applications/Xcode.app | | gym_version | 2.205.2        | | export_method | ad-hoc         | | sdk     | iPhoneOS15.2.sdk    | +---------------+-------------------------+ [13:11:38]: ▸             (ef0fada7-88c4-413f-a9e5-7d875f07e324) [13:11:38]: ▸   [13:11:38]: ▸  /usr/bin/codesign --force --sign CB4DB01189506EF6F172982414A36378AE18F48F --entitlements /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS\ (iOS)/IntermediateBuildFilesPath/HelloIOS.build/AdHoc-iphoneos/HelloIOS\ (iOS).build/HelloIOS.app.xcent --generate-entitlement-der /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS\ (iOS)/InstallationBuildProductsLocation/Applications/HelloIOS.app [13:11:38]: ▸ /Users/user/Library/Developer/Xcode/DerivedData/HelloIOS-eibmqfokwytdeddxnnluvsuzbtlp/Build/Intermediates.noindex/ArchiveIntermediates/HelloIOS (iOS)/InstallationBuildProductsLocation/Applications/HelloIOS.app: errSecInternalComponent [13:11:38]: ▸ Command CodeSign failed with a nonzero exit code [13:11:38]: [13:11:38]: ⬆️ Check out the few lines of raw xcodebuild output above for potential hints on how to solve this error [13:11:38]: 📋 For the complete and more detailed error log, check the full log at: [13:11:38]: 📋 /Users/user/Library/Logs/gym/HelloIOS-HelloIOS (iOS).log [13:11:38]: [13:11:38]: Looks like fastlane ran into a build/archive error with your project [13:11:38]: It's hard to tell what's causing the error, so we wrote some guides on how [13:11:38]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/ [13:11:38]: Before submitting an issue on GitHub, please follow the guide above and make [13:11:38]: sure your project is set up correctly. [13:11:38]: fastlane uses xcodebuild commands to generate your binary, you can see the [13:11:38]: the full commands printed out in yellow in the above log. [13:11:38]: Make sure to inspect the output above, as usually you'll find more error information there [13:11:38]: +---------------------------+----------------------------------------------------------+ |                  Lane Context                  | +---------------------------+----------------------------------------------------------+ | DEFAULT_PLATFORM     | ios                           | | PLATFORM_NAME      | ios                           | | LANE_NAME        | ios firebase                      | | KEYCHAIN_PATH      | ~/Library/Keychains/fastlane_tmp_keychain        | | ORIGINAL_DEFAULT_KEYCHAIN | "/Users/user/Library/Keychains/fastlane_tmp_keychain-db" | +---------------------------+----------------------------------------------------------+ [13:11:38]: Error building the application - see the log above +------+-------------------------------+-------------+ |         fastlane summary         | +------+-------------------------------+-------------+ | Step | Action            | Time (in s) | +------+-------------------------------+-------------+ | 1  | Verifying fastlane version  | 0     | | 2  | default_platform       | 0     | | 3  | Switch to ios buildAdHoc lane | 0     | | 4  | setup_ci           | 0     | | 5  | cocoapods          | 4     | | 💥 | build_app          | 36     | +------+-------------------------------+-------------+ code-block Is anything related with this issue?  https://developer.apple.com/forums/thread/69464 We need a better solution or recomendation from Apple, since it looks this problem happens with more people also.
Posted
by rlecheta.
Last updated
.
Post not yet marked as solved
2 Replies
6.5k Views
There is a question on stackoverflow for that too: https://stackoverflow.com/questions/66143815/xcode-12-5-spm-dependency-cache-location Xcode 12.5 release notes mention the "per-user-basis" cache for SPM dependencies: https://developer.apple.com/documentation/xcode-release-notes/xcode-12_5-beta-release-notes Is the location outside of DerivedData folder so cache still persists somewhere in ~/Library/Caches and can be reused even for clean build? It's very important to know for CI performance! Any guidance/help is appreciated.
Posted Last updated
.
Post marked as Apple Recommended
1.9k Views
When i start my workflows, after few minutes i can see some messages like them: The Archive - iOS action could not complete due to an error. Something went wrong and the Xcode Cloud team has been notified to investigate. The error may not occur on rebuild. or The Test - iOS action could not complete due to an error. Something went wrong and the Xcode Cloud team has been notified to investigate. The error may not occur on rebuild. or The Analyze - iOS action could not complete due to an error. Something went wrong and the Xcode Cloud team has been notified to investigate. The error may not occur on rebuild. Any idea? Thanks!
Posted Last updated
.
Post not yet marked as solved
2 Replies
571 Views
Hi Update complete today and Magic Mouse is no longer scrolling Accessibility, Sound, Keyboard in Preferences can't be accessed iPods Pro can't be connected as well as any other device for audio Photos not synching Keyboard audio regulation switched off, unless on a wire Really? Yes, nothing changed with 12.1
Posted Last updated
.