I am working on an application in Flutter for which I use Android Studio to build/run my app. The past few days though, for some reason, I am unable to build and run my app through Android Studio. Each time I run it in Android Studio the Xcode build fails and I get a set of identical errors, where specific modules in libraries I am using are not signed into the correct development team.
Only when I go into Xcode, manually go to each module and set the development team, then run it from there does it work, which is pretty annoying. Even more strangely, anytime I delete the app from my connected device and then rebuild and rerun it, I have to sign into the development team for those libraries again. In Android Studio, the error looks like this:
Could not build the precompiled application for the device.
Error (Xcode): Signing for "MLKitTextRecognition-LatinOCRResources" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "MLKitObjectDetection-MLKitObjectDetectionResources" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "MLKitTextRecognitionChinese-ChineseOCRResources" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "MLKitTextRecognitionKorean-KoreanOCRResources" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "MLKitTextRecognitionDevanagari-DevanagariOCRResources" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "MLKitObjectDetectionCommon-MLKitObjectDetectionCommonResources" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "gRPC-C++-gRPCCertificates-Cpp" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "TOCropViewController-TOCropViewControllerBundle" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "MLKitTextRecognitionJapanese-JapaneseOCRResources" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
Error (Xcode): Signing for "MLKitImageLabeling-MLKitImageLabelingResources" requires a development team. Select a development team in the Signing & Capabilities editor.
/mobile/ios/Pods/Pods.xcodeproj
I have to basically open it in Xcode, go in the Pods tab, go to each of the modules and set the specific team. In my runner target, the team is set to the correct one and I have "automatically manage signing" checked. And, even when I go through each pod and set the team, it somehow doesn’t update and I still can’t run it in Android Studio.
Thank you for any help you can give on this, I’ve been trying to fix it for two days to no avail. Is there something I can add to my Podfile or change in my Xcode settings to make things work? Thank you.
4
Answers
Kind of a random solution, but after I installed in Xcode and ran it multiple times through Xcode, I then tried running in Android Studio and it worked (after a pretty long build time). Now the install is working in Android Studio as well and it seems to be back to normal.
So, if you encounter this issue, just try installing and running in Xcode a few times, then running it in Android Studio, then installing in Android Studio. Very haphazard fix, but hopefully you get lucky as well.
This could be a signing issue. Simpleton question here, but have you copied and pasted the code laid out in the readme file for xcode into your preferred terminal? It looks something like this:
Then…
Then…
Clone the repo into $GOPATH/src/github.com/go-delve/delve
I had this exact problem. I had entered the developer group information into my xcode after having to reinstall it (clean removal and complete reinstallation), and I wound up having forgotten to go back in and create my signed certificate. Doing so solved my problem. Sometimes it’s the small stuff that you’ve done so many times you forget that it isn’t automatic that gets ya.
I remember running into this issue after I updated to XCode 14, post which it seems like Apple made a conscious change to enable code signing for pods/bundles by default.
I included the following post-installer script as a part of my
Podfile
to fix it:PS: You’ll require a
pod install
for the changes to take place