Description of the issue
I have a Flutter project which has iOS(apart from android) project files autogenerated and the project is commited in our repository.
I am able to build Android apk from bitrise using the modified deploy pipeline(I have replaced Certificate installer step with fastlane match script for iOS signing) after connecting the repo. For iOS I am facing the issue in Xcode archive and export step.
Environment:
Where did the issue happen?
I have started with Flutter bitrise stack and replaced Certificate and profile installer step with script which installs fastlane and then development certificates
bundle install
bundle exec fastlane match appstore
This succeeds though with warning
Installing certificateā¦
security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.
[12:29:29]: There are no local code signing identities found.
ā¦
All required keys, certificates and provisioning profiles are installed
Build step happens without any error
$ flutter ābuildā āiosā āādebugā āāno-codesignā
ā¦
Running Xcode buildā¦
Xcode build done. 37.6s
Built /Users/vagrant/git/build/ios/iphoneos/Runner.app.
***Step that causes the issue
But during xcode archive and export step I am getting this error
$ set -o pipefail && xcodebuild ā-workspaceā ā/Users/vagrant/git/ios/Runner.xcworkspaceā ā-schemeā āRunnerā ā-configurationā āDebugā āCOMPILER_INDEX_STORE_ENABLE=NOā āarchiveā ā-archivePathā ā/[redacted]/Runner.xcarchiveā | xcpretty
error: Signing for āRunnerā requires a development team. Select a development team in the Signing & Capabilities editor. (in target āRunnerā from project āRunnerā)
Also I can see that it is not detecting team ID in this same step
Configs:
- ExportMethod: development
- UploadBitcode: true
- CompileBitcode: true
- ICloudContainerEnvironment:
- TeamID:
- UseDeprecatedExport: false
- ForceTeamID:
I am not able to understand what is causing app signing error, even after having installed certificates using fastlane. This happens with both debug and release workflow(I am installing correct version of certificates in the fastlane for the respective workflow). I have attached build logs. Any help would be appreciated.
P.S: We have apple developer account connected to bitrise. Also all the iOS files are generated through Flutter Android studio on Windows and at no point did we use MacOS/Xcode.
Things that did not work
- I have tried removing build caches and got same error.
- In a separate workflow(Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation) I also tried signing in the flutter build step itself by removing āāno-codesignā option. Its detecting our dev team but resulting in this error
Config:
-IOSAdditionalParams: --debug
-AndroidAdditionalParams: --release
-Platform: ios
-IOSExportPattern: build/ios/iphoneos/.app
build/ios/iphoneos/.ipa
-AndroidOutputType: apk
-AndroidExportPattern: build/app/outputs/apk//.apk
build/app/outputs/bundle//.aab
-IOSCodesignIdentity:
-ProjectLocation: /Users/vagrant/git
-DebugMode: false
-AndroidBundleExportPattern: build/app/outputs/bundle//*.aab
iOS Codesign settings
Installed codesign identities:
-Apple Development: [our team info]
Stored Flutter codesign settings:
-No codesign identity set
Build iOS
$ flutter ābuildā āiosā āādebugā
Building [our appid] for device (ios)ā¦
Signing iOS app for device deployment using developer identity: āApple Development: [our team id]ā
Running Xcode buildā¦
Xcode build done. 2.9s
Failed to build iOS app
Error output from Xcode build:
ā³
** BUILD FAILED **
Xcodeās output:
ā³
note: Using new build systemnote: Planning buildnote: Constructing build descriptionerror: There are no accounts registered with Xcode. Add your developer account to Xcode (in target āRunnerā from project āRunnerā)error: No profiles for [our appid] were found: Xcode couldnāt find any iOS App Development provisioning profiles matching [our appid]. (in target āRunnerā from project āRunnerā)
Reproducibility
- Does a āRebuildā help? (You can trigger a rebuild from the Buildās page, by clicking the āRebuildā button in the top right corner of a finished build) : /NO
- Does a rebuild without caches help? (You can remove the
Cache:Pull
andCache:Push
steps temporarily to not to use the cache, or you can delete all the caches on theSettings
tab of the app. : /NO - Does the issue happen sporadically, or every time? :
Build log
Debug workflow log:
āBitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automationā
Release workflow log:
āBitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automationā