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.
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 exec fastlane match appstore
This succeeds though with warning
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
***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
- ExportMethod: development
- UploadBitcode: true
- CompileBitcode: true
- UseDeprecatedExport: false
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(https://app.bitrise.io/build/f0dc7892bf4f2b6e#?tab=log) 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
iOS Codesign settings
Installed codesign identities:
-Apple Development: [our team info]
Stored Flutter codesign settings:
-No codesign identity set
$ 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 **
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’)
- 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:Pushsteps temporarily to not to use the cache, or you can delete all the caches on the
Settingstab of the app. : /NO
- Does the issue happen sporadically, or every time? :
Debug workflow log:
Release workflow log: