Continuous Integration

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 results found
Post marked as unsolved
142 Views

iTMSTransporter upload with success but new screenshots never show up

I'm fighting with iTMSTransporter to upload all of our screenshots to AppStoreConnect. Here is the XML I provide: <?xml version="1.0" encoding="UTF-8"?> <package xmlns="http://apple.com/itunes/importer" version="software5.11"> &#9;<!-- This document was generated on Nov 3, 2020, 11:46:11 PM for ***. --> &#9;<!-- NOTE: metadata_token is generated on lookup.&#9;Modifying the value of this will result in an import error --> &#9;<metadata_token>***</metadata_token> &#9;<team_id>***</team_id> &#9;<software> &#9;&#9;<!--Apple ID: ***--> &#9;&#9;<vendor_id>***</vendor_id> &#9;&#9;<software_metadata app_platform="ios"> &#9;&#9;&#9;<versions> &#9;&#9;&#9;&#9;<version string="2.5"> &#9;&#9;&#9;&#9;&#9;<locales> &#9;&#9;&#9;&#9;&#9;&#9;<locale name="de-DE"> &#9;&#9;&#9;&#9;&#9;&#9;&#9;<title>***</title> &#9;&#9;&#9;&#9;&#9;&#9;&#9;<software_screenshots> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<software_screenshot display_target="iOS-5.5-in" position="1"> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<size>779842</size> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<file_name>10-Map_1_515B1FE6-FB23-4598-8AE2-0E646CCE60F3.png</file_name> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<checksum type="md5">0cbd5e2fe790d62efce29682783abc62</checksum> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;</software_screenshot> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;&#9;&#9;&#9;</software_screenshots> &#9;&#9;&#9;&#9;&#9;&#9;</locale> &#9;&#9;&#9;&#9;&#9;&#9;<locale name="es-ES"> &#9;&#9;&#9;&#9;&#9;&#9;&#9;<title>***</title> &#9;&#9;&#9;&#9;&#9;&#9;&#9;<software_screenshots> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<software_screenshot display_target="iOS-5.5-in" position="1"> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<size>643614</size> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<file_name>10-Map_1_6ED6F23E-53CE-4E4C-9C7E-AE7E4512746C.png</file_name> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<checksum type="md5">ea1c9408b5fa3c9379c5e11190f1ac2c</checksum> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;</software_screenshot> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;&#9;&#9;&#9;</software_screenshots> &#9;&#9;&#9;&#9;&#9;&#9;</locale> &#9;&#9;&#9;&#9;&#9;&#9;<locale name="fr-FR"> &#9;&#9;&#9;&#9;&#9;&#9;&#9;<title>***</title> &#9;&#9;&#9;&#9;&#9;&#9;&#9;<software_screenshots> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<software_screenshot display_target="iOS-5.5-in" position="1"> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<size>605170</size> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<file_name>10-Map_1_31239DCF-DCA4-4442-A7A8-6BEE3A33B5B4.png</file_name> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;<checksum type="md5">0631c09201a56516aaad23614c1fe256</checksum> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;</software_screenshot> &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;... &#9;&#9;&#9;&#9;&#9;&#9;&#9;</software_screenshots> &#9;&#9;&#9;&#9;&#9;&#9;</locale> &#9;&#9;&#9;&#9;&#9;</locales> &#9;&#9;&#9;&#9;</version> &#9;&#9;&#9;</versions> &#9;&#9;</software_metadata> &#9;</software> </package> Here's what I do: I download the metadata with xcrun iTMSTransporter -m lookupMetadata mode, I clean up all the useless fields, and I update all the screenshots information (size, md5, name) for the new files I provide. I check if everything is fine with the xcrun iTMSTransporter -m verify mode and it says: &#9;&#9;Package Summary: &#9;&#9;1 packages were verified successfully: &#9;&#9;/Users/.../***.itmsp Then I upload the lot with xcrun iTMSTransporter -m upload, and once again it's a success: &#9;&#9;Package Summary: &#9;&#9;1 packages were uloaded successfully: &#9;&#9;/Users/.../***.itmsp But in the end... None of my new screenshots show up in AppStoreConnect... Even after 24 hours... I have also tried to leave all the original xml fields intact, updating only the software_screenshots, but it leads to the same result... Nothing in the log seems to give a clue about something going wrong, the size uploaded is the size of the package, no warning whatsoever, I'm a bit confused... So if someone has a clue on what is going on here... Thanks in advance.
Asked
by lamoureux.
Last updated .
Post marked as unsolved
291 Views

"Invalid device state" when running xctest on Bamboo agent

I have a workspace includes an app and a framework, and both projects have xctest cases. The test target of the framework project fails on bamboo agent with the following error: "xctest encountered an error (Failed to install or launch the test runner. (Underlying Error: Invalid device state))". The same script runs without issue from the terminal. The workaround is to add the xctest to a host app, however, it seems not possible to add host app to frameworks managed using swift package manager. Does anyone experience the same issue? BTW, the issue is on xcode 12+ only.
Asked
Last updated .
Post marked as solved
436 Views

Xcode 11.x Build Service Error: Integration results could not be uploaded.

Hello folks,since we've upgraded our Catalina build server to Xcode 11.x, one of our projects seems to build without any specific error, but then the bot bails out with this error message:Build Service Error: Integration results could not be uploaded. Test attachments and integration logs may be unavailable.As the message says, there are no other logs available which could give any more hints. Also no other build results are available (like IPA or Xcarchive). There also seems to be zero information available anywhere about what exactly causes this error or how it could be remedied, so we are stuck right now. Does anybody of you maybe have an idea about how to solve this error?Cheers!
Asked
by Cyborg.
Last updated .
Post marked as unsolved
86 Views

bot trigger not sending email

Hi, I have an Xcode bot trigger set to run after every integration. The bot runs fine except it does not send email. I don't think this is a post fix issue because there is nothing that comes through in the logs. I run this command in terminal log stream --predicate  '(process == "smtpd") || (process == "smtp")' --info Then run the bot and nothing ever pops up terminal when executing the integration. This is making thing something is wrong from the Xcode side. Is there some sort of log from the bot that would say "couldn't send email because ..." ?
Asked
by someone.
Last updated .
Post marked as unsolved
302 Views

'failed to open liblaunch_sim.dylib' but only when run by CI

I'm attempting to upgrade to Xcode 12.0 on our CI machines which are managed by Buildkite. We use fastlane scan to run our unit tests. If I run our fastlane script manually on the CI machine, it works fine. However, when buildkite-agent runs the same script it fails with the error "No simulators found on local machine". Turns out when buildkite-agent is running the script, xcrun simctl list reports 'unavailable, failed to open liblaunch_sim.dylib'. But not if I run the script manually on the same machine! == Devices ==- iOS 14.0 -- &#9;&#9;iPhone 8 (4D50331C-EA89-4338-B723-4C97D49B743E) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPhone 8 Plus (19297DDA-2932-4E19-B1AF-932A3E908E7D) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPhone 11 (737394AD-611B-46E0-9821-D8F474CB8CF6) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPhone 11 Pro (CF74C14E-FF16-42B8-BD13-1EF9BCC67454) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPhone 11 Pro Max (6B406CEE-89E8-49AA-AB7F-89E10BE6E47F) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPhone SE (2nd generation) (D50EB1B2-EFD7-475A-B325-98290ECC9A6E) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPad Pro (9.7-inch) (A2973191-E1FB-4B72-85A0-817EB240C671) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPad (7th generation) (5245FAE6-0AF9-4486-9472-468F569F684C) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPad Pro (11-inch) (2nd generation) (6A94E8D1-FFE8-41AB-8BF6-2C583E5C61C9) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPad Pro (12.9-inch) (4th generation) (7E419C55-846E-4AE7-9806-ACDEE5D346F2) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib) &#9;&#9;iPad Air (3rd generation) (5BDC647C-CCAB-434F-BFBD-4FD0015C0779) (Shutdown) (unavailable, failed to open liblaunch_sim.dylib)- tvOS 14.0 -- - watchOS 7.0 -- == Runtimes == iOS 14.0 (14.0 - 18A372) - com.apple.CoreSimulator.SimRuntime.iOS-14-0 (unavailable, failed to open liblaunch_sim.dylib) tvOS 14.0 (14.0 - 18J383) - com.apple.CoreSimulator.SimRuntime.tvOS-14-0 (unavailable, failed to open liblaunch_sim.dylib) watchOS 7.0 (7.0 - 18R382) - com.apple.CoreSimulator.SimRuntime.watchOS-7-0 (unavailable, failed to open liblaunch_sim.dylib) And if I run xcrun simctl list manually on the machine, the unavailable message isn't there. What could be the difference between the script being run manually and run by buildkite? AFAICT the buildkite process isn't run under a different user account. Unsure what else to check for. Thanks!
Asked
Last updated .
Post marked as unsolved
1.2k Views

CodeSign The specified item could not be found in the keychain

I am trying to translate a working codesigning mechanism into our CI process. I add the cert using the following. sudo security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain-db developerID_application.cer But, when I check it, it is not recognized for codesigning. $ security find-identity -p codesigning Policy: Code Signing &#9;Matching identities &#9;&#9; 0 identities found &#9;Valid identities only &#9;&#9; 0 valid identities found And subsequent codesign fails with error: The specified item could not be found in the keychain. Compared to what I am doing in the working mechanism on my desktop, only missing step seems to be signing to my developer account on xcode. But, not sure if that is the issue, or if so, not sure how you can do that from command line.
Asked
Last updated .
Post marked as unsolved
65 Views

Continuous Integration code signing

Is there a set of commands that I could use to code sign an macOS application deployed in a zip file? Not having any luck following the documentation since they all refer to some steps being performed through UI. I have an environment in Circleci where I am doing the build. Trying to now codesign the built image, I am unable to find any documentation that I can codesign completely from the command line. I have tried codesign to codesign my application, but, I am unable to get them to recognize my cert that I added using security add-trusted-cert -d -r trustRoot -k ~/Library/Keychains/login.keychain developerID_application.cer Any pointers would be much appreciated.
Asked
Last updated .
Post marked as unsolved
85 Views

Automated Visual Testing

Has anybody cracked the problem of being able to fail Tests if the screen layout has changed from baselined values? The scenario is that when a fairly large app is in active development or continuous uplift, squads may regularly change common UI components that are used all over the app. We need a way to baseline what is an acceptable app UI experience (eg screenshots in UITests) and then compare them with those from later runs of the same UITest after making UI changes to see if that has potentially affected areas of app that we did not expect to change , by failing that UITest
Asked
by swiftBank.
Last updated .
Post marked as unsolved
160 Views

Xcode Bot how to run "simctl" for devices that run tests?

I want to automatically grant the privacy for reminders for all devices that run tests with Xcode bot. However, I have not found another way then doing it via grep in a pre-trigger action: xcrun simctl list | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }' | grep '^[-A-Z0-9]*$' | xargs -I uuid xcrun simctl privacy uuid grant reminders com.app Since no devices are booted in the pre-trigger-action, I receive this error: An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=165): Unable to lookup in current state: Shutdown Is there any way to find out the UUID of the devices that are selected for the bot (that the bot should run) and only boot those devices?
Asked
by Rumio.
Last updated .
Post marked as unsolved
111 Views

Downsides of using VMWare ESXi instances as Jenkins/Fastlane/Xcode build nodes?

Hi, Our CI pipeline has 2013 Mac Pros running two Catalina VMs each using VMWare ESXi. Each VM is currently configured with macOS Catalina 10.15.5, Xcode 11.5, Jenkins, and Fastlane. Each VM is allotted exactly half the CPU cores and RAM of the host machine. We've been experiencing intermittent build failures where some tests take too long to run and timeout, and sometimes network requests to fetch provisioning profiles also fail. I'm wondering if perhaps we should reduce the CPU &amp; RAM allotment to each VM in order to increase the resources available to the underlying host? Or does anyone know of any fundamental flaws with this kind of setup that might contribute to instability? If so is there any other supported way to handle multiple simultaneous builds per machine? We're just trying to take maximal advantage of the hardware available on our pipeline. Thanks in advance for any tips/advice! (Please see this post - https://developer.apple.com/forums/thread/657532 for details on the kinds of build issues we've been seeing.)
Asked
by O_G.
Last updated .
Post marked as unsolved
6.5k Views

Execution policy exception registration failed with Jenkins on Catalina

Hello!I'm trying to get our CI servers migrated over to Catalina, but I'm having quite the struggle. During the build phase, Xcode 11 is attempting to give the xctest bundles an execution policy exception in order to run, but it always fails with:note: Execution policy exception registration failed and was skipped: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"This note is shown after the builtin-RegisterExecutionPolicyException build step is performed on the test bundle.After everything is built, the run just hangs until it gets aborted by timeout, likely because it can't execute the test bundle.This problem was occurring when running the CI script directly from terminal, but adding Terminal to the list of applications under Developer tools in the `Settings -&gt; Security &amp; Privacy -&gt; Privacy` screen resolved the issue with terminal; I no longer get the error and the tests run successfully. Unfortunately, this did not fix the CI system. I've added a number of other applications to this list, including fastlane (which is the tool used to run the code), ruby, java (for jenkins), sh, bash, zsh, xcodebuild (along with every other tool in the directory that xcodebuild is in), etc. I've also attempted to disable gatekeeper with `sudo spctl --master-disable`, but I continue to see this error from Jenkins.Has anyone else ran into this or know the proper way to get Jenkins to work on Catalina?Thanks!~James
Asked
Last updated .
Post marked as unsolved
186 Views

Xcode 11.4 and late + xcodeserver cannot select Git branch

As stated,After updating to version 11.5, I couldn’t select the correct git branch for continuous integration. I tried many ways, and I couldn’t always modify the branch I needed, which made the Xcode server useless because it is always updated by default. A long branch, does anyone know how to solve this problem?Thank you
Asked
by arvinTang.
Last updated .
Post marked as unsolved
142 Views

Max Number of Cores for Simulator in Xcode Bot Run

Is there any limit on the number of cores a Simulator (iPad Pro 9.7" 13.6) will use when running unit tests as part of an Xcode Bot Integration run? I'm on a 2018 Mac mini w/6 physical cores and Activity Monitor shows all the physical cores in use (interesting to note all the hyper threaded cores remain all but idle). If we wanted to get faster integration times, would moving up to Mac Pro with more cores do the trick? Or has a cruel fate come upon us and 6 cores is the max this Simulator can use? I also have an ancillary question; is the maximum-parallel-testing-workers argument even honored in the Xcodebuild command used in the Bot?
Asked
Last updated .
Post marked as solved
144 Views

Xcode 12 Beta 2 causes Xcode Server to be unmanageable

FB7864358 Upon replacing Xcode 12.0 Beta 1 with 12.0 Beta 2, the Xcode Server settings configuration is no longer accessible. One the 'Server &amp; Bots' preference pane the message presented is: Xcode Server Is Already Running Your computer is already configured to run Xcode Server and this version of Xcode is not compatible. If you manually switch the service off and back on, an alert is presented with the following: This version of Xcode is not supported (version is too old) I have managed to revert back to Xcode 12.0 Beta one, and continue managing my server. Has anyone had the same experience or any suggestions on getting Xcode 12.0 Beta 2 to work with Xcode Server?
Asked
Last updated .
Post marked as unsolved
351 Views

Xcode bot does not see repository branches

After updating the XCode to version 11.4 (11E146), I stopped seeing repository branches in the bot settings. But I see these repository branches in Source Controll Navigator. Does anyone know how I can fix it?
Asked
by bora14.
Last updated .