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

132 Posts

Post

Replies

Boosts

Views

Activity

iOS 15 - UI Test keeps asking pin code for "Enable UI Automation" in CI
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?
1
1
1.5k
Nov ’22
Xcode stop UI testing on any single test failure
Is there a way to stop the whole UI tests execution on a single test failure? I'm already using continueAfterFailure flag which stops further test execution for that particular test suite. But this does not suit our requirement since it will jump to next test suite and execute tests further. Any help would be appreciated, thanks.
1
0
1.8k
Nov ’22
Xcode Cloud - build release notes
Hello, I'm fairly new to the Xcode Cloud workflow and I would like to know, is there a way to automatically include release notes to a build after it's been uploaded? I can for example set up a Fastlane script that will gather changes since the last build (from git history) and put them in a file on the repository. But is there a way to upload the notes after the build is uploaded to TestFlight?
1
8
2.1k
Oct ’22
Xcodebuild Archive fails to errSecInternalComponent in GitHub Action
Hi! I have an issue to build Archive when using xcodebuild in GitHub Action workflow. The project s quite basic iOS project. Archiving works fine locally using command xcodebuild -quiet -workspace MyProject.xcworkspace -scheme "MyProject Release" clean archive -configuration release -destination=generic/platform=iOS -archivePath MyProject.xcarchive Same command via SSH gives an error errSecInternalComponent. Command CodeSign failed with a nonzero exit code IF I run a command security unlock-keychain beforehand, then creating .xcarchive passes. In Keychain Access, I have necessary certificates. Those are located in login.keychain and every certificate seems to be valid. Also, based on this answer, I have tried to put 6 different Apple Worldwide Developer Relations Certification Authority -certs in System.keychain and removed same stuff from login.keychain. This didn't bring solution either. Our GitHub (Enterprise) Action workflow is quite simple (here is an extract): name: Build_Tests on: push: branches: - 'GHA_tests' workflow_dispatch: jobs: build: runs-on: [ self-hosted, macos-1 ] ..... - name: Archive shell: bash run: | xcodebuild -quiet -workspace MyProject.xcworkspace -scheme "MyProject Release" clean archive -configuration release -destination=generic/platform=iOS -archivePath MyProject.xcarchive In our CI/CD environment is a stack of Macs with latest macOS, and every those has a unique password, so embedding "security unlock-keychain" with password is not a (good) solution. If it is only one to get our build and test environment to work, then we have to start to live with it, but I would love to get some other solution to work. Easiest for us would be that old workflows, with example above, continues to work. I mean that just using commands like "xcodebuild" would work like a charm. I have also run through this excellent post by eskimo and seems like that certificates are fine. No issues found. Locally run security find-identity -p codesigning gives  in "Matching identities" "4 identities found" and in "Valid identities only" "4 valid identities found". Also, I can run codesign -s "Apple Development" -f "MyTrue" for my certificates four time in a row with success. (We have four certificates, yes. There is one dev for in-house, one for public, one Distribution and an old iPhone Distribution from...past.) Also, each 4 certs in login.keychain has in Access Control "Confirm before allowing access" selected and in the list "Always allow access..." there is at least a tools codesign and Keychain Access. Apple Distribution cert's Key has four "Always allow..." apps: Keychain Access, Xcode, codesign and productbuild. These certificates are imported to Keychain Access using commands security unlock-keychain -p <keychain password> login.keychain security import <certificate file>.p12 -k login.keychain -P <cert password> -T /usr/bin/codesign security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k <keychain password> Via SSH I have run command codesign -s and it gave similar issues than in eskimo's example: "MyTrue: errSecInternalComponent". A command security unlock-keychain naturally fixed this. The problem here is that I can't include passwords in CI after unlock-keychain command. Any ideas what I am doing wrong? My guess is that I am not a far of working solution, but just can make in my mind what I am doing wrong atm. I think that I have tried about everything during these two weeks when wondering this issue. I appreciate everyone who reads this posts and specially you who posts a working solution :) -Harri
4
0
3.4k
Oct ’22
Swipe issue UITesting + fastlane
We have a suite of UI tests managed by QA. They are developed on his machine (M1 MacBook Pro) and when they all pass he checks in We use fastlane and an M1 Mac-mini as our build machine/pipeline. When the tests are running in the pipeline we always get swipe failures such as XCTAssertTrue failed - Failed to swipe so not on the correct page XCTAssertTrue failed - Swipe not worked, delete not showing And so on. What I find really strange is I can login to the build machine itself, open the project from the source directory and manually run all the UI Tests - they all pass. I also ran the fastlane lane directly (ui_tests) from terminal to exactly mimic what the pipeline does and they all pass As soon as I re-enable them in the full pipeline (fast file) we get the swipe failures on the same machine and emulator! The only difference I can see is I ran them directly / standalone versus part of the pipeline. Also, they run immediately after our unit tests unit_tests ui_tests Could this potentially affect things? From reading around I wondered about the M1 architecture potentially being the cause but they are written on an M1 and the build machine is the same architecture (and as above, in isolation they work) Any ideas appreciated!
0
0
1.3k
Oct ’22
failed to archive with xcodebuild script due to error framework not found Pods_NotificationServiceExtension on Jenkins
Hi there, I'm trying to make a CI/CD system for iOS project using Jenkins, my project have a Notification Services Extension target. But when running xcodebuild script it's show this error: framework not found Pods_NotificationServiceExtension Ld /Users/administrator/Library/Developer/Xcode/DerivedData/BitcastleApp-diipivlljnhqkjhlbsmgsjjgynbn/Build/Intermediates.noindex/ArchiveIntermediates/BitcastleApp-Dev/IntermediateBuildFilesPath/BitcastleApp.build/Debug-iphoneos/NotificationServiceExtension.build/Objects-normal/arm64/Binary/NotificationServiceExtension normal arm64 (in target 'NotificationServiceExtension' from project 'BitcastleApp') When using xcode it's still success. Below is my build script for archiving: xcodebuild build -workspace BitcastleApp.xcworkspace -scheme BitcastleApp-Dev -sdk iphoneos15.5 -configuration Debug archive -archivePath /Users/administrator/.jenkins/workspace/Dev -destination generic/platform=iOS Did anyone know how to fix this error? I have to spend 2 days to tried to search around the internet but still can't found any solution. Please help!
0
0
1.2k
Aug ’22
Xcode Server bot internal-processing-error
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 ?
0
1
1.2k
Aug ’22
Xcode Server no longer supported?
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?
4
5
2.2k
Jul ’22
Parallel testing fails - failed to prepare simulator
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.
0
1
1.5k
Jul ’22
Remote access to test system dying every few days
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?
1
0
1.5k
Jul ’22
Github CI UITest gives flaky tests 'Unable to monitor event loop'
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?
1
1
1.1k
Jun ’22
How to beta test a non-production environment in TestFlight?
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.
1
0
1.1k
Jun ’22
SPM in a continuous integration platform like CircleCI
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.
0
2
1.5k
Jun ’22
Codesign fails when started from SSH, succeed in Mac Desktop
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     | +------+-------------------------------+-------------+
4
0
5.4k
Jun ’22
iOS 15 - UI Test keeps asking pin code for "Enable UI Automation" in CI
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?
Replies
1
Boosts
1
Views
1.5k
Activity
Nov ’22
Xcode stop UI testing on any single test failure
Is there a way to stop the whole UI tests execution on a single test failure? I'm already using continueAfterFailure flag which stops further test execution for that particular test suite. But this does not suit our requirement since it will jump to next test suite and execute tests further. Any help would be appreciated, thanks.
Replies
1
Boosts
0
Views
1.8k
Activity
Nov ’22
Xcode Cloud - build release notes
Hello, I'm fairly new to the Xcode Cloud workflow and I would like to know, is there a way to automatically include release notes to a build after it's been uploaded? I can for example set up a Fastlane script that will gather changes since the last build (from git history) and put them in a file on the repository. But is there a way to upload the notes after the build is uploaded to TestFlight?
Replies
1
Boosts
8
Views
2.1k
Activity
Oct ’22
Xcodebuild Archive fails to errSecInternalComponent in GitHub Action
Hi! I have an issue to build Archive when using xcodebuild in GitHub Action workflow. The project s quite basic iOS project. Archiving works fine locally using command xcodebuild -quiet -workspace MyProject.xcworkspace -scheme "MyProject Release" clean archive -configuration release -destination=generic/platform=iOS -archivePath MyProject.xcarchive Same command via SSH gives an error errSecInternalComponent. Command CodeSign failed with a nonzero exit code IF I run a command security unlock-keychain beforehand, then creating .xcarchive passes. In Keychain Access, I have necessary certificates. Those are located in login.keychain and every certificate seems to be valid. Also, based on this answer, I have tried to put 6 different Apple Worldwide Developer Relations Certification Authority -certs in System.keychain and removed same stuff from login.keychain. This didn't bring solution either. Our GitHub (Enterprise) Action workflow is quite simple (here is an extract): name: Build_Tests on: push: branches: - 'GHA_tests' workflow_dispatch: jobs: build: runs-on: [ self-hosted, macos-1 ] ..... - name: Archive shell: bash run: | xcodebuild -quiet -workspace MyProject.xcworkspace -scheme "MyProject Release" clean archive -configuration release -destination=generic/platform=iOS -archivePath MyProject.xcarchive In our CI/CD environment is a stack of Macs with latest macOS, and every those has a unique password, so embedding "security unlock-keychain" with password is not a (good) solution. If it is only one to get our build and test environment to work, then we have to start to live with it, but I would love to get some other solution to work. Easiest for us would be that old workflows, with example above, continues to work. I mean that just using commands like "xcodebuild" would work like a charm. I have also run through this excellent post by eskimo and seems like that certificates are fine. No issues found. Locally run security find-identity -p codesigning gives  in "Matching identities" "4 identities found" and in "Valid identities only" "4 valid identities found". Also, I can run codesign -s "Apple Development" -f "MyTrue" for my certificates four time in a row with success. (We have four certificates, yes. There is one dev for in-house, one for public, one Distribution and an old iPhone Distribution from...past.) Also, each 4 certs in login.keychain has in Access Control "Confirm before allowing access" selected and in the list "Always allow access..." there is at least a tools codesign and Keychain Access. Apple Distribution cert's Key has four "Always allow..." apps: Keychain Access, Xcode, codesign and productbuild. These certificates are imported to Keychain Access using commands security unlock-keychain -p <keychain password> login.keychain security import <certificate file>.p12 -k login.keychain -P <cert password> -T /usr/bin/codesign security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k <keychain password> Via SSH I have run command codesign -s and it gave similar issues than in eskimo's example: "MyTrue: errSecInternalComponent". A command security unlock-keychain naturally fixed this. The problem here is that I can't include passwords in CI after unlock-keychain command. Any ideas what I am doing wrong? My guess is that I am not a far of working solution, but just can make in my mind what I am doing wrong atm. I think that I have tried about everything during these two weeks when wondering this issue. I appreciate everyone who reads this posts and specially you who posts a working solution :) -Harri
Replies
4
Boosts
0
Views
3.4k
Activity
Oct ’22
Cannot create post action in Xcode Cloud
Hi, I want to submit a build directly to TestFlight review from Xcode Cloud after a successful build. But the post actions are disabled. I'm on Xcode 14. I followed the steps from the documentation but no luck. My workflow is as below.
Replies
0
Boosts
1
Views
1k
Activity
Oct ’22
Swipe issue UITesting + fastlane
We have a suite of UI tests managed by QA. They are developed on his machine (M1 MacBook Pro) and when they all pass he checks in We use fastlane and an M1 Mac-mini as our build machine/pipeline. When the tests are running in the pipeline we always get swipe failures such as XCTAssertTrue failed - Failed to swipe so not on the correct page XCTAssertTrue failed - Swipe not worked, delete not showing And so on. What I find really strange is I can login to the build machine itself, open the project from the source directory and manually run all the UI Tests - they all pass. I also ran the fastlane lane directly (ui_tests) from terminal to exactly mimic what the pipeline does and they all pass As soon as I re-enable them in the full pipeline (fast file) we get the swipe failures on the same machine and emulator! The only difference I can see is I ran them directly / standalone versus part of the pipeline. Also, they run immediately after our unit tests unit_tests ui_tests Could this potentially affect things? From reading around I wondered about the M1 architecture potentially being the cause but they are written on an M1 and the build machine is the same architecture (and as above, in isolation they work) Any ideas appreciated!
Replies
0
Boosts
0
Views
1.3k
Activity
Oct ’22
failed to archive with xcodebuild script due to error framework not found Pods_NotificationServiceExtension on Jenkins
Hi there, I'm trying to make a CI/CD system for iOS project using Jenkins, my project have a Notification Services Extension target. But when running xcodebuild script it's show this error: framework not found Pods_NotificationServiceExtension Ld /Users/administrator/Library/Developer/Xcode/DerivedData/BitcastleApp-diipivlljnhqkjhlbsmgsjjgynbn/Build/Intermediates.noindex/ArchiveIntermediates/BitcastleApp-Dev/IntermediateBuildFilesPath/BitcastleApp.build/Debug-iphoneos/NotificationServiceExtension.build/Objects-normal/arm64/Binary/NotificationServiceExtension normal arm64 (in target 'NotificationServiceExtension' from project 'BitcastleApp') When using xcode it's still success. Below is my build script for archiving: xcodebuild build -workspace BitcastleApp.xcworkspace -scheme BitcastleApp-Dev -sdk iphoneos15.5 -configuration Debug archive -archivePath /Users/administrator/.jenkins/workspace/Dev -destination generic/platform=iOS Did anyone know how to fix this error? I have to spend 2 days to tried to search around the internet but still can't found any solution. Please help!
Replies
0
Boosts
0
Views
1.2k
Activity
Aug ’22
Xcode Server bot internal-processing-error
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 ?
Replies
0
Boosts
1
Views
1.2k
Activity
Aug ’22
Xcode Server no longer supported?
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?
Replies
4
Boosts
5
Views
2.2k
Activity
Jul ’22
Xcode cloud enterprise version
Will Xcode cloud release an enterprise version? As a developer in a bank, our source are hosted in internal GitHub, and those dependencies are stored in internal nexus. So we could only access source and dependencies internally.
Replies
2
Boosts
0
Views
2.3k
Activity
Jul ’22
Parallel testing fails - failed to prepare simulator
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.
Replies
0
Boosts
1
Views
1.5k
Activity
Jul ’22
Remote access to test system dying every few days
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?
Replies
1
Boosts
0
Views
1.5k
Activity
Jul ’22
Github CI UITest gives flaky tests 'Unable to monitor event loop'
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?
Replies
1
Boosts
1
Views
1.1k
Activity
Jun ’22
How to beta test a non-production environment in TestFlight?
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.
Replies
1
Boosts
0
Views
1.1k
Activity
Jun ’22
SPM in a continuous integration platform like CircleCI
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.
Replies
0
Boosts
2
Views
1.5k
Activity
Jun ’22
Xcode Cloud MacBook Question
Hi all, If I understand right Xcode Cloud run on real devices but does run on real macOS devices?For Xcode Cloud I need to have a github project done before I can use it?
Replies
1
Boosts
0
Views
1.3k
Activity
Jun ’22
Sample code with tests
Does Apple have Xcode Cloud sample code, or any sample code that contains tests?
Replies
0
Boosts
0
Views
1.1k
Activity
Jun ’22
Codesign fails when started from SSH, succeed in Mac Desktop
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     | +------+-------------------------------+-------------+
Replies
4
Boosts
0
Views
5.4k
Activity
Jun ’22
XCUITest fails when element is offscreen?
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!
Replies
7
Boosts
0
Views
5.6k
Activity
May ’22
Integration Refence Required
Hello Team I want to use Refund Payment Method Api any refence document or Curl method ? Thanks and Regards Zain Ul Hasan
Replies
1
Boosts
0
Views
877
Activity
May ’22