skip to Main Content

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


  1. Chosen as BEST ANSWER

    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.


    • AndroidStudio and VScode share the Flutter cache, so it is recommended that you only use one of them
    Login or Signup to reply.
  2. 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:

    $ git clone https://github.com/go-delve/delve
    $ cd delve
    $ go install github.com/go-delve/delve/cmd/dlv
    

    Then…

    xcode-select --install
    

    Then…

    If you didn’t enable Developer Mode using Xcode you will be asked to
    authorize the debugger every time you use it. To enable Developer Mode
    and only have to authorize once per session use:

    sudo /usr/sbin/DevToolsSecurity -enable

    You might also need to add your user to the developer group:

    sudo dscl . append /Groups/_developer GroupMembership $(whoami)

    Clone the repo into $GOPATH/src/github.com/go-delve/delve

    1. Run make install in that directory (on some versions of macOS this requires being root, the first time you run it, to install a new certificate)

    The makefile will take care of creating and installing a self-signed
    certificate automatically.

    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.

    Login or Signup to reply.
  3. 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:

    post_install do |installer|
        installer.generated_projects.each do |project|
          project.targets.each do |target|
              target.build_configurations.each do |config|
                  config.build_settings["CODE_SIGN_IDENTITY"] = ""
              end
          end
        end
     end
    

    PS: You’ll require a pod install for the changes to take place

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search