iamvucms / react-native-instagram-clone

A React Native app - Clone Instagram mobile app
954 stars 315 forks source link

GoogleService-Info.plist fails #6

Closed johuder33 closed 4 years ago

johuder33 commented 4 years ago

By running the RN app it throws an error related to GoogleService-Info.plist, it seems it's missing the instructions related to this in the README, i just want you to know about it 👍

** BUILD FAILED **

The following build commands failed:
    CopyPlistFile /Users/___/Library/Developer/Xcode/DerivedData/Instagram-afliumfqepwmqiaspiuvagdyjufe/Build/Products/Debug-iphonesimulator/Instagram.app/GoogleService-Info.plist /Users/Downloads/GoogleService-Info.plist
(1 failure)
iamvucms commented 4 years ago

try

yarn remove @react-native-firebase
yarn remove @react-native-firebase/app
yarn remove @react-native-firebase/firestore
npx pod-update

Then remove 2 lines in src/ios/{projectName}/AppDelegate.m

#import <Firebase.h><----remove
[FIRApp configure];<---remove
huytrinh68 commented 4 years ago

try

yarn remove @react-native-firebase
yarn remove @react-native-firebase/app
yarn remove @react-native-firebase/firestore
npx pod-update

Then remove 2 lines in src/ios/{projectName}/AppDelegate.m

#import <Firebase.h><----remove
[FIRApp configure];<---remove

I tried but it not work

iamvucms commented 4 years ago

Hi, Did you close all metro console and re-run react-native run-ios Try delete GoogleService-Info.plist from xcode project

Dr1992 commented 4 years ago

@iamvucms It's because your GoogleService-Info.plist was in your downloads folder so you need to put GoogleService-Info.plist in the ios folder and import from there into xcode

jb29611 commented 4 years ago

Hello,

I'm getting the same error as huytrin68. :( Can you link your GoogleService-Info.plist to your ios folder and update? Thanks again.

iamvucms commented 4 years ago

Hello all, GoogleService-Info.plist is just a mistake, I used firebase npm package on my project, It's not react-native-firebase First close all metro console window\ Try remove GoogleService-Info.plist

yarn remove @react-native-firebase
yarn remove @react-native-firebase/app
yarn remove @react-native-firebase/firestore
npx pod-update

Then remove 2 lines in src/ios/{projectName}/AppDelegate.m

#import <Firebase.h><----remove
[FIRApp configure];<---remove

And restart project:

react-native run-ios

Good luck!

jb29611 commented 4 years ago

Hello everyone,

Thanks iamvucms.

I got it working by removing - react-native-firebase, @react-native-firebase/app, yarn remove @react-native-firebase/firestore. and then removed the following from src/ios/{projectName}/AppDelegate.m

import <Firebase.h>
`[FireApp configure'] `

and also (line22) B8B92A27244457A800255790 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = B8B92A26244457A800255790 /* GoogleService-Info.plist */; };

I hope it helps.

Thanks again.

iamvucms commented 4 years ago

Hello all, I updated at the newest commit. Try it again Good luck.