Could not find a valid GoogleService-Info.plist in your project

后端 未结 21 894
面向向阳花
面向向阳花 2020-12-08 05:44

When I run my swift 3.2 code with Xcode 9 beta 4 this is the error I get:

*** Terminating app due to uncaught exception \'com.firebase.core\', reason: \'[FIRAp

相关标签:
21条回答
  • 2020-12-08 06:23

    We must make sure that full path is correct in Xcode. It would be better to add it from the start. If you already did, jump to step 5.

    1. Quit Xcode.
    2. Make sure that file name is correct, "GoogleService-Info.plist".
    3. Add .plist file to project folder. Same level with Podfile, .xcworkspace, etc.
    4. Open Xcode, identify .plist file on Project Navigator. If it's not there, right-click and click Add new file to "[Project Name]". Make sure to click project name below Add to targets option.
    5. On Project Navigator, click on GoogleService-Info.plist. Select File Inspector from right navigator. Ensure that Full Path is correct. If not, click on folder icon and select the .plist file inside the project file.
    6. Build. If still doesn't work, Quit Xcode and Build again.
    0 讨论(0)
  • 2020-12-08 06:23

    Add the GoogleService-Info.plist in Build Phases as screenshot above:

    0 讨论(0)
  • 2020-12-08 06:26

    Doing a clean then build a couple times worked for me.

    0 讨论(0)
  • 2020-12-08 06:28

    Remove the Google-Info.plist file from your project and try to add it from your project folder's option menu.

    EDIT: this is how you remove a plist file Xcode 10 Error: Multiple commands produce

    0 讨论(0)
  • 2020-12-08 06:29

    I had the same issue.

    Click on the Googleservice-info.plist in your project and check Target Membership for app in the inspector. That fixed it for me.

    That is the reason for this crash and removing the file and adding again is another way of doing as suggested by answers above. But the actual cause is this and this is the right way to solve it.

    Please refer to the image below for further clarification:

    0 讨论(0)
  • 2020-12-08 06:32

    These steps solved my problem. FOllow these. 1.You must drag and drop the GoogleService-Info.plist file into your project in a location such as Shared Resources. When you have successfully added the file, you should also make sure to include it in the project build:

    2.Double-check that in the "Build Phases" section of your project that your project is including GoogleService-Info.plist.

    3.Double check the file name. The file name must be exactly GoogleService-Info.plist common misspellings include GoogleServices-Info.plist and GoogleService-info.plist - case sensitive and exactly named only will work.

    0 讨论(0)
提交回复
热议问题