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

后端 未结 21 896
面向向阳花
面向向阳花 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:33

    Restarting Xcode worked for me, none of the above option worked.

    0 讨论(0)
  • 2020-12-08 06:33
    1. Make sure the name of the file is correct, i.e: "GoogleService-info.plist"
    2. Add it to the project in mac finder under the project name and then drag it into the project to reference it.
    3. Finally, as Silvajee mentioned, go to the file inspector for the plist file and tick the box under target membership to include it as part of the project.
    0 讨论(0)
  • 2020-12-08 06:33
    1. Actually this error is occur when GoogleService-Info.plist file is not actually located in our project folder but it just have a reference to that file where it is downloaded. So solution is that remove reference to this file and again add it to your project folder by drag and drop or by using "Add Files ..." option by right click to your project folder. Also recheck whether file is locating your project folder destination otherwise error will be occur again.

    2. Don't forget to check your "GoogleService-Info.plist" file have same name as shown in error otherwise rename it.

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

    Once you add the file to the project, you may also need to add it to Build Phases in the Compile Sources section.

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

    If you have multiple environments (Production, Develop, Staging), you will need a different Google.plist for each.

    They all have to have the same name.

    To get around this, create folders for each of these files (one for each environment) and place them inside their corresponding folders.

    When you drag the files from the Finder to Xcode, make sure to select the proper environment for each under Target Membership

    That will do the trick and allow you to build environments separately. Especially if each environment has a different Bundle ID.

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

    Unfortunately or fortunately, the error specified is very accurate. There is only one option available right now. i.,e placing Google-Info.plist file in your project properly. Try to remove and add that again. Also, check if a target is selected or not.

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