I am quite new on deploying CICD. Currently this is my .yml file:
name: Release IOS
on:
push:
branches:
- github-action
jobs:
build:
name: Build IPA and upload to TestFlight
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout#v2
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode#v1
with:
xcode-version: latest-stable
- name: Setup SSH
uses: webfactory/ssh-agent#v0.5.4
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Setup ruby
uses: ruby/setup-ruby#v1
with:
ruby-version: 2.7.2
bundler-cache: true
- name: Setup Node.js
uses: actions/setup-node#v1
with:
node-version: 14.17.0
- name: Install Cordova, Ionic, and cordova-res
run: npm install -g cordova#10.0.0 #ionic/cli cordova-res
- name: Install app dependencies
run: npm install
- name: npx gulp
run: npx gulp
- name: cordova resources
run: ionic cordova resources
- name: Remove Ios platform
run: ionic cordova platform remove ios
- name: Add Ios platform
run: ionic cordova platform add ios
- name: Fix translations problems in IOS
run: ionic cordova plugin add cordova-plugin-ionic-webview
- name: Install #ionic-native/ionic-webview
run: npm install #ionic-native/ionic-webview
- name: Prebuild iOS production
run: npm run prod:ios
- name: Uninstall outdated gems
run: gem cleanup
- name: Publish as internal testing
uses: yukiarrr/ios-build-action#v1.5.0
with:
project-path: ./platforms/ios/MyProject.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
certificate-password: ${{ secrets.IOS_P12_PASSWORD }}
mobileprovision-base64: ${{ secrets.IOS_PROVISION_FILE }}
code-signing-identity: iOS Distribution
team-id: ${{ secrets.TEAM_ID }}
workspace-path: ./platforms/ios/MyProject.xcworkspace # optional
And this is what I end up with:
[17:53:21]: $ set -o pipefail && xcodebuild -workspace ./platforms/ios/MyProject.xcworkspace -scheme MyProject -configuration Release -destination 'generic/platform=iOS' -archivePath /Users/runner/Library/Developer/Xcode/Archives/2022-05-16/output\ 2022-05-16\ 17.53.21.xcarchive clean archive | tee /Users/runner/Library/Logs/gym/MyProject-MyProject.log | xcpretty
[17:53:29]: ▸ Clean Succeeded
[17:53:39]: ▸ ❌ error: No certificate for team '***' matching 'iOS Distribution' found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target 'MyProject' from project 'MyProject')
[17:53:39]: ▸ ** ARCHIVE FAILED **
▸ Clean Succeeded
❌ error: No certificate for team '***' matching 'iOS Distribution' found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target 'MyProject' from project 'MyProject')
** ARCHIVE FAILED **
[17:53:39]: Exit status: 65
[17:53:39]:
[17:53:39]: Maybe the error shown is caused by using the wrong version of Xcode
[17:53:39]: Found multiple versions of Xcode in '/Applications/'
[17:53:39]: Make sure you selected the right version for your project
[17:53:39]: This build process was executed using '/Applications/Xcode_13.2.1.app'
[17:53:39]: If you want to update your Xcode path, either
[17:53:39]:
[17:53:39]: - Specify the Xcode version in your Fastfile
[17:53:39]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[17:53:39]:
[17:53:39]: - Specify an absolute path to your Xcode installation in your Fastfile
[17:53:39]: ▸ xcode_select "/Applications/Xcode8.app"
[17:53:39]:
[17:53:39]: - Manually update the path using
[17:53:39]: ▸ sudo xcode-select -s /Applications/Xcode.app
[17:53:39]:
+---------------+--------------------------------+
| Build environment |
+---------------+--------------------------------+
| xcode_path | /Applications/Xcode_13.2.1.app |
| gym_version | 2.205.2 |
| export_method | app-store |
| sdk | iPhoneOS15.2.sdk |
+---------------+--------------------------------+
I am pretty sure that my certificate, code sign identity and provisioning profile are all correct, but this error still shows when Publish as internal testing fails. What's the correct way to debug it?
(I add fastlane tag because this plugin is built based on it)
iOS has 2 types of certificates, you must use distribution to deploy.
I have followed this article and done it successfully,
https://www.cobeisfresh.com/blog/how-to-implement-a-ci-cd-workflow-for-ios-using-github-actions
You can read more about article
Related
I'm trying to integrate the Azure CI CD pipeline for Fluter application. I'm getting below mentioned errors in my Azure CI iOS integration and unable to generate signed builds.
Azure Pipeline YML code sign
- task: Xcode#5
displayName: "Code sign ipa for Distribution"
inputs:
actions: "build"
xcWorkspacePath: "**/Runner.xcworkspace"
scheme: "Runner"
sdk: "iphoneos"
configuration: "release"
packageApp: true
signingOption: "manual"
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
Error :
2022-04-13T08:36:40.5885050Z ##[section]Starting: Code sign ipa for Distribution
2022-04-13T08:36:40.5898160Z ==============================================================================
2022-04-13T08:36:40.5898480Z Task : Xcode
2022-04-13T08:36:40.5898860Z Description : Build, test, or archive an Xcode workspace on macOS. Optionally package an app.
2022-04-13T08:36:40.5899750Z Version : 5.200.0
2022-04-13T08:36:40.5899960Z Author : Microsoft Corporation
2022-04-13T08:36:40.5900350Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/build/xcode
2022-04-13T08:36:40.5900750Z ==============================================================================
2022-04-13T08:36:40.9267540Z ##[warning]Multiple Xcode workspace matches were found. The first match will be used: /Users/runner/work/1/s/makeawish_mobile/ios/Runner.xcworkspace
2022-04-13T08:36:40.9291950Z [command]/usr/bin/xcodebuild -version
2022-04-13T08:36:42.7698550Z Xcode 13.2.1
2022-04-13T08:36:42.7901000Z Build version 13C100
2022-04-13T08:36:43.0275140Z [command]/usr/bin/xcodebuild -sdk iphoneos -configuration release -workspace /Users/runner/work/1/s/makeawish_mobile/ios/Runner.xcworkspace -scheme Runner build CODE_SIGN_STYLE=Manual CODE_SIGN_IDENTITY=iPhone Distribution: XXXXXXXXX Ltd PROVISIONING_PROFILE=1319a551-3a8d-XXXXXXXXX PROVISIONING_PROFILE_SPECIFIER= | /usr/local/lib/ruby/gems/2.7.0/bin/xcpretty -r junit --no-color
2022-04-13T08:36:49.1496410Z --- xcodebuild: WARNING: Using the first of multiple matching destinations:
2022-04-13T08:36:49.1601060Z { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
2022-04-13T08:36:49.1704150Z { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
2022-04-13T08:36:54.2881640Z ** BUILD FAILED **
2022-04-13T08:36:54.2884770Z
2022-04-13T08:36:54.3515950Z ##[error]Error: /usr/bin/xcodebuild failed with return code: 65
2022-04-13T08:36:54.4265010Z ##[section]Finishing: Code sign ipa for Distribution
I have a requirement to use exactly iOS 14.5 on our pipeline.
I tried the following:
variables:
sdk: 'iphoneos14.5' // I also tried to iphoneos
- task: Xcode#5
inputs:
actions: 'test'
configuration: '$(configuration)'
sdk: '$(sdk)'
xcWorkspacePath: 'MyProject.xcworkspace'
scheme: '$(secondaryScheme)'
xcodeVersion: 'specifyPath'
xcodeDeveloperDir: '/Applications/Xcode_13.2.1.app'
packageApp: false
destinationPlatformOption: 'iOS'
destinationSimulators: 'iPhone 11,OS=14.5'
args: '-derivedDataPath $(agent.buildDirectory)/DerivedData'
But both runs failed with
xcodebuild: error: SDK "iphoneos14.5" cannot be located.
##[error]Error: /usr/bin/xcodebuild failed with return code: 64
And
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, OS:14.5, name:iPhone 11 }
That's what I understood from reading the preinstalled software documentation. https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md
Grateful if you could tell me what I am doing wrong
By using your pipeline definition, I am able to reproduce your issue.
I think below YAML file will help you understand why the official document said 'iOS 14.5' is supported but you can't use it.
pool:
name: Azure Pipelines
#Your build pipeline references an undefined variable named ‘secondaryScheme’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
steps:
- script: |
xcodebuild -showsdks
echo "========================================================="
sudo xcode-select -switch /Applications/Xcode_12.5.1.app/Contents/Developer
xcodebuild -showsdks
displayName: 'Command Line Script'
When you see the result of the pipeline run, I believe you will understand everything:
After switching the version, you should be able to use the specific IOS version you want.
Reference: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow
You upload your app for notarization using notarytool command line
tool. Xcode 13 or later supports this tool, so if you have more than
one version of Xcode installed on your Mac, be sure to use the
xcode-select utility to choose an appropriate version:
% sudo xcode-select -s /path/to/Xcode13.app
Added this step
gem install xcode-install
xcversion simulators --install='iOS 13.5'
If someone finds a way to use the installed sdk for other Xcode, please comment here
Getting this error while using Fastlane to deploy firebase distribution of react native app.
It builds fine locally, only getting this error on CI.
[33m▸[0m [39;1mRunning script[0m 'Bundle React Native code and images'
2021-09-14T23:45:37.0115340Z [33mthe transform cache was reset.[0m
2021-09-14T23:45:37.0116230Z ** ARCHIVE FAILED **
2021-09-14T23:45:37.0116680Z
2021-09-14T23:45:37.0117040Z
2021-09-14T23:45:37.0117840Z The following build commands failed:
2021-09-14T23:45:37.0121970Z PhaseScriptExecution Bundle\ React\ Native\ code\ and\ images /Users/runner/Library/Developer/Xcode/DerivedData/proj_name-ghtelxhdqifreogqusciceodxxjy/Build/Intermediates.noindex/ArchiveIntermediates/proj_name.firebasedistribution/IntermediateBuildFilesPath/proj_name.build/FirebaseDistribution-iphoneos/mobile.build/Script-00DD1BFF1BD5951E006B06BC.sh
2021-09-14T23:45:37.0125070Z (1 failure)
2021-09-14T23:45:37.0126250Z [23:45:24]: [31mExit status: 65[0m
2021-09-14T23:45:37.0126990Z [23:45:24]:
2021-09-14T23:45:37.0128480Z [23:45:24]: [33mMaybe the error shown is caused by using the wrong version of Xcode[0m
2021-09-14T23:45:37.0130200Z [23:45:24]: [33mFound multiple versions of Xcode in '/Applications/'[0m
2021-09-14T23:45:37.0131900Z [23:45:24]: [33mMake sure you selected the right version for your project[0m
2021-09-14T23:45:37.0134030Z [23:45:24]: [33mThis build process was executed using '/Applications/Xcode_12.4.app'[0m
2021-09-14T23:45:37.0135690Z [23:45:24]: [33mIf you want to update your Xcode path, either[0m
2021-09-14T23:45:37.0136580Z [23:45:24]:
2021-09-14T23:45:37.0137960Z [23:45:24]: - Specify the Xcode version in your Fastfile
2021-09-14T23:45:37.0139560Z [23:45:24]: ▸ [35mxcversion(version: "8.1") # Selects Xcode 8.1.0[0m
2021-09-14T23:45:37.0140440Z [23:45:24]:
2021-09-14T23:45:37.0141920Z [23:45:24]: - Specify an absolute path to your Xcode installation in your Fastfile
2021-09-14T23:45:37.0143580Z [23:45:24]: ▸ [35mxcode_select "/Applications/Xcode8.app"[0m
2021-09-14T23:45:37.0144470Z [23:45:24]:
2021-09-14T23:45:37.0145670Z [23:45:24]: - Manually update the path using
2021-09-14T23:45:37.0147210Z [23:45:24]: ▸ [35msudo xcode-select -s /Applications/Xcode.app[0m
2021-09-14T23:45:37.0148140Z [23:45:24]:
2021-09-14T23:45:37.0148540Z
2021-09-14T23:45:37.0149750Z +---------------+------------------------------+
2021-09-14T23:45:37.0151420Z | [32m[33mBuild environment[0m |
2021-09-14T23:45:37.0152920Z +---------------+------------------------------+
2021-09-14T23:45:37.0153960Z | xcode_path | /Applications/Xcode_12.4.app |
2021-09-14T23:45:37.0154900Z | gym_version | 2.192.0 |
2021-09-14T23:45:37.0156180Z | export_method | ad-hoc |
2021-09-14T23:45:37.0157130Z | sdk | iPhoneOS14.4.sdk |
2021-09-14T23:45:37.0158480Z +---------------+------------------------------+
2021-09-14T23:45:37.0159020Z
2021-09-14T23:45:37.0160290Z [23:45:25]: ▸ [35m at Generator.next (<anonymous>)[0m
2021-09-14T23:45:37.0162550Z [23:45:25]: ▸ [35m at asyncGeneratorStep (/Users/runner/work/proj_name/proj_name/node_modules/metro/src/DeltaBundler/traverseDependencies.js:137:24)[0m
2021-09-14T23:45:37.0165140Z [23:45:25]: ▸ [35m at _next (/Users/runner/work/proj_name/proj_name/node_modules/metro/src/DeltaBundler/traverseDependencies.js:159:9)[0m
2021-09-14T23:45:37.0167140Z [23:45:25]: ▸ [35minfo Run CLI with --verbose flag for more details.[0m
2021-09-14T23:45:37.0168770Z [23:45:25]: ▸ [35mCommand /bin/sh failed with exit code 1[0m
node-version: "14.17.3"
xcode-version: 12.4
The Bundle react Native code and images,is already set to: ../node_modules/react-native/scripts/react-native-xcode.sh but nothing changed.
Running this on Github Actions CI
Approches tried
Tried this where it adds node in front node_modules/..
export NODE_BINARY=node
../node_modules/react-native/packager/react-native-xcode.sh"
Changing this line inside Build React native code and Images
export NODE_BINARY=node to export NODE_BINARY=$(which node)
Tried adding cd $PROJECT_DIR/.. to the top of Build React native code and images
cd $PROJECT_DIR/..
export DEVELOPMENT_BUILD_CONFIGURATIONS="+(LocalDevelopment|FirebaseDistribution|Debug)"
export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh
I am new on Azure Devops pipelines and working on pipelines for the ionic project to build the android and iOS builds.
For android, I have been succeeded and apk I also working fine as per expectations. But for iOS I am stuck from past 4 days and unable to proceed. Below is the my yaml file for pipeline.
Although, I have installed provision profile certificate, still facing error like below :
error: "APP" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'APP' from project 'APP')
Please suggest how to resolve this issue to generate the iOS build/ipa.
Note : Right now I am using same yaml file for both android and iOS, kindly suggest if the same is standard approach or not.
YAML File for pipeline:
trigger:
- main
pool:
vmImage: 'macos-latest'
variables:
projectName: 'APP'
#ios variables
certSecureFileName: 'Certificates.p12'
P12Password: 'PQRXYZ'
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
## provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
provisioningProfile: 'APP_Distribution.mobileprovision'
sdkOption: 'iphoneos'
configurationOption: 'Debug'
workspaceName: '$(Build.SourcesDirectory)/platforms/ios/APP.xcworkspace'
schemeName: 'APP'
ArchivePath: ~/output/APP.xcarchive
ExportIpaPath: ~/output/APP.ipa
steps:
- script: sudo npm install -g #ionic/cli
displayName: 'Install Ionic CLI'
- task: Npm#1
inputs:
workingDir: '$(Build.SourcesDirectory)'
command: install
displayName: 'NPM Install'
- task: InstallAppleCertificate#2
displayName: 'Install P12 Certificates'
inputs:
certSecureFile: '$(certSecureFileName)'
certPwd: '$(P12Password)'
signingIdentity: '$(signingIdentity)'
deleteCert: true
- task: InstallAppleProvisioningProfile#1
displayName: 'Install App provisioning profile'
inputs:
provisioningProfileLocation: 'secureFiles'
provProfileSecureFile: '$(provisioningProfile)'
removeProfile: true
- task: PowerShell#2
inputs:
targetType: 'inline'
script: |
sudo npm i -g cordova
ionic build
cd $(Build.SourcesDirectory)
ionic cordova build ios --prod --release --buildConfig=build.json
cd platforms/ios/
xcodebuild clean archive -workspace APP.xcworkspace -scheme APP -archivePath build/APP.xcarchive
xcodebuild -exportArchive -archivePath build/APP.xcarchive -exportPath build/export -exportOptionsPlist $(Build.SourcesDirectory)/exportOptions.plist
displayName: "starting iOS build"
- task: CopyFiles#2
inputs:
## SourceFolder: '$(Build.SourcesDirectory)'
contents: '**/*.ipa'
TargetFolder: '$(build.artifactStagingDirectory)'
overWrite: true
- task: PublishBuildArtifacts#1
inputs:
pathtoPublish: '$(build.artifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
Error Log 22 Feb 2021:
export PRODUCT_TYPE=com.apple.product-type.application
2021-02-22T07:00:45.1045780Z builtin-validationUtility /Users/runner/work/1/s/platforms/ios/build/emulator/APP.app
2021-02-22T07:00:45.1046100Z
2021-02-22T07:00:45.1192290Z ** BUILD SUCCEEDED **
2021-02-22T07:00:45.1193110Z
2021-02-22T07:00:46.0475340Z Command line invocation:
2021-02-22T07:00:46.0480470Z /Applications/Xcode_12.3.app/Contents/Developer/usr/bin/xcodebuild clean archive -workspace APP.xcworkspace -scheme APP -archivePath build/APP.xcarchive
2021-02-22T07:00:46.0481320Z
2021-02-22T07:00:46.0482090Z User defaults from command line:
2021-02-22T07:00:46.0482950Z IDEArchivePathOverride = /Users/runner/work/1/s/platforms/ios/build/APP.xcarchive
2021-02-22T07:00:46.0483570Z
2021-02-22T07:00:46.9814740Z note: Using new build system
2021-02-22T07:00:46.9815300Z note: Building targets in parallel
2021-02-22T07:00:47.0653590Z
2021-02-22T07:00:47.0656080Z ** CLEAN SUCCEEDED **
2021-02-22T07:00:47.0656650Z
2021-02-22T07:00:47.0780320Z note: Using new build system
2021-02-22T07:00:47.0781010Z note: Building targets in parallel
2021-02-22T07:00:47.0794200Z note: Planning build
2021-02-22T07:00:48.9307720Z note: Constructing build description
2021-02-22T07:00:49.1276620Z error: "APP" requires a provisioning profile. Select a provisioning profile in the Signing & Capabilities editor. (in target 'APP' from project 'APP')
2021-02-22T07:00:49.1290480Z
2021-02-22T07:00:49.1293730Z ** ARCHIVE FAILED **
2021-02-22T07:00:49.1316830Z
2021-02-22T07:00:49.9439170Z error: archive not found at path '/Users/runner/work/1/s/platforms/ios/build/APP.xcarchive'
2021-02-22T07:00:49.9439810Z ** EXPORT FAILED **
2021-02-22T07:00:49.9439970Z
2021-02-22T07:00:50.0313310Z ##[debug]$LASTEXITCODE: 65
2021-02-22T07:00:50.0521660Z ##[debug]Exit code 1 received from tool '/usr/local/bin/pwsh'
2021-02-22T07:00:50.0528430Z ##[debug]STDIO streams have closed for tool '/usr/local/bin/pwsh'
2021-02-22T07:00:50.0543440Z ##[debug]task result: Failed
2021-02-22T07:00:50.0576690Z ##[error]PowerShell exited with code '1'.
2021-02-22T07:00:50.0589460Z ##[debug]Processed: ##vso[task.issue type=error;]PowerShell exited with code '1'.
2021-02-22T07:00:50.0591720Z ##[debug]Processed: ##vso[task.complete result=Failed;]PowerShell exited with code '1'.
2021-02-22T07:00:50.0594820Z ##[section]Finishing: starting iOS build
Xcode task 23 Feb 2021
- task: Xcode#5
displayName: 'Xcode archive'
inputs:
actions: archive
xcWorkspacePath: '$(Build.SourcesDirectory)/platforms/ios/APP.xcworkspace'
archivePath: 'APP.xcarchive'
scheme: APP
packageApp: true
destinationTypeOption: devices
exportOptions: plist
exportOptionsPlist: '$(Build.SourcesDirectory)/exportOptions.plist'
exportPath: '$(agent.buildDirectory)/platforms/ios/output/iphoneos/Release'
signingOption: manual
signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'
Error Received is :
2021-02-23T05:26:30.8370720Z ##[error]Error: The Xcode workspace was specified, but it does not exist or is not a directory: /Users/runner/work/1/s/platforms/ios/APP.xcworkspace
When building with Ionic, use the --buildConfig flag to use a build configuration.
You can configure each platform, for each build type (debug or release).
You can specify a provisioning profile to use for ios, or a keystore for android.
As your issue concerns ios, I will not show the android config.
Create a build.json file at the root of your project with the following content :
{
"ios": {
"release": {
"provisioningProfile": "Your provisioning profile filename without .mobileprovision",
"codeSignIdentity": "Your code sign identity name",
"developmentTeam": "Your development team ID",
"packageType": "app-store",
"buildFlag": [
"-UseModernBuildSystem=0",
"-destination generic/platform=iOS",
"-sdk iphoneos"
]
},
"debug": {
...
}
}
}
The provisioning profile should be at the root of your project, next to the build.json.
The buildFlags are optionnals.
I have not tried using a path for provisioningProfile, nor including the .mobileprovision extension, but it might work as well.
Then build with the following command :
ionic cordova build ios --prod --release --buildConfig=build.json
If the --release flag is not used, it will default to --debug.
I am currently trying to set up iOS deployment for a React-Native app, using Fastlane through CircleCI, and I am having an issue where I get to pilot in my fastlane script, I upload the build to iTunes Connect, but the build disappears from being used for TestFlight Internal Testers. If I archive locally and upload the build to iTunes Connect, it will be available for testing.
My Fastfile, using version 2.51.0
platform :ios do
lane :deploy_staging do
match(
type: "adhoc",
force: true
)
increment_build_number(
xcodeproj: './ios/MyApp.xcodeproj'
)
gym(
export_method: "ad-hoc",
scheme: "MyApp Staging",
project: "./ios/MyApp.xcodeproj"
)
pilot(
skip_submission: false,
distribute_external: false,
)
clean_build_artifacts
git_add(
path: '.'
)
git_commit(
path: '.',
message: "Deployed new staging version #{lane_context[SharedValues::BUILD_NUMBER]} [skip ci]",
)
push_to_git_remote(
local_branch: ENV["CIRCLE_BRANCH"],
remote_branch: ENV["CIRCLE_BRANCH"]
)
end
end
My circle.yml
machine:
environment:
PATH: '$PATH:$HOME/node/node-v8.1.3-darwin-x64/bin'
xcode:
version: 8.3.3
dependencies:
cache_directories:
- $HOME/node
pre:
- "ls \"$HOME/node/node-v8.1.3-darwin-x64\" || mkdir \"$HOME/node\""
- "ls \"$HOME/node/node-v8.1.3-darwin-x64\" || curl -L \"https://nodejs.org/dist/v8.1.3/node-v8.1.3-darwin-x64.tar.gz\" -o \"$HOME/node/node-v8.1.3-darwin-x64.tar.gz\""
- "ls \"$HOME/node/node-v8.1.3-darwin-x64\" || tar -xzf \"$HOME/node/node-v8.1.3-darwin-x64.tar.gz\" -C \"$HOME/node/\""
- "rm -f \"$HOME/node/node-v8.1.3-darwin-x64.tar.gz\""
override:
- npm install -g react-native-cli
- npm install
test:
override:
- npm test
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/test_out/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
deployment:
pre:
- gem install fastlane
staging:
branch: staging
commands:
- npm run build:ios
- fastlane deploy_staging
Output from the CircleCI test
Build completed processing on iTunes Connect
Build not available (invisible) on TestFlight tab
I tried debugging this by archiving locally with the same certificates and profiles, but it uploads successfully and I am able to distribute to internal testers on TestFlight.
Thanks very much for the help.
Found the solution that helped resolve this issue.
Two parts seem to help fix it
Changing profile used from adhoc to appstore
a. I had to generate the appstore provisioning profile through match:
fastlane match appstore -a com.myapp.app.staging
Adding include_symbols and include_bitcode to my gym build parameters.
Processing took longer than normal, but after processing, it returns to the build list where pilot recognizes it and it posts to TestFlight.
My new Fastfile:
lane :deploy_staging do
match(
type: "appstore"
)
increment_build_number(
xcodeproj: './ios/MyApp.xcodeproj'
)
gym(
include_symbols: true,
include_bitcode: true,
export_method: "app-store",
scheme: "MyApp Staging",
project: "./ios/MyApp.xcodeproj"
) # Build your app - more options available
pilot
clean_build_artifacts
git_add(
path: '.'
)
git_commit(
path: '.',
message: "Deployed new staging version #{lane_context[SharedValues::BUILD_NUMBER]} [skip ci]",
)
push_to_git_remote(
local_branch: ENV["CIRCLE_BRANCH"],
remote_branch: ENV["CIRCLE_BRANCH"]
)
end