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

37 Posts
Sort by:
Post not yet marked as solved
0 Replies
171 Views
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.
Posted
by rohan13.
Last updated
.
Post not yet marked as solved
1 Replies
204 Views
hello developers, First priority I couldn't find a proper title for the question :( The reason why I open a topic here is not to find the answer by direct point shooting; My goal is what do Apple, Developer, Companies and Devops teams think and comments about the subject I'm going to ask here? We use Jenkins as the Devops CI/CD tool at our company, and in Macos/Apple/iOS development, we use a lot of Mac Mini devices. Since we build/compilers on a project-based, version-based basis, we cannot get 100% efficiency from our devices. (For example, because the dependencies of a project are different from other projects; we dedicate only 1 Mac Mini to that project. (As the dependecys of the projects are too many and large, the migration process is very difficult for us, the cost of moving to a lower-level Mac Mini device is high / but this is just an example)) While researching, I saw that there is no docker container image for MacOs X (enterprise or legal) and I know about the Apple EULA. (For virtualization, Apple hardware must be used as a basis. Because the MacOs system is paid for on a device-based basis.) What I want to ask here is can I find or create a MacOs docker container image legally? How is the structure of other companies in their CI processes? If I install MacOs with more than one VMware/VirtualBox on Mac Mini, What harm could it do me in Jenkins? (I'm curious about people's comments on this.)
Posted Last updated
.
Post not yet marked as solved
1 Replies
431 Views
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?
Posted Last updated
.
Post not yet marked as solved
3 Replies
358 Views
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
Posted
by Harri.
Last updated
.
Post not yet marked as solved
3 Replies
1.5k Views
We got the newly issue that our Test devices keeps us asking for the pin code to "Enable UI Automation". Then it works for some hours or days, but after some time it starts again. "Enable UI Automation" is already enabled in "Settings" - "Developer" menu. The devices are located remotely and we can't access them directly, so this is a big issue for us right now. Is there any way to avoid this?
Posted Last updated
.
Post not yet marked as solved
5 Replies
8.0k 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
0 Replies
246 Views
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!
Posted
by mjharper.
Last updated
.
Post not yet marked as solved
0 Replies
379 Views
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!
Posted
by Son Hoang.
Last updated
.
Post not yet marked as solved
0 Replies
413 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
779 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
433 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
642 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
1.1k 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
378 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
413 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
376 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
578 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
.