0

I am using Ionic2 and Xcode to build an app for iOS.

Question

Do I need to install Cocoa Pods?

I would like to keep my app as small and simple as possible, so don't want to install anything unnecessary. However, I am trying to get Firebase Authentication up and running, and the following instructions are using Cocoa Pods.

I have tried to get iOS Firebase Authentication working without Cocoa Pods, but it only partially works, i.e. it logs in and returns a user with a uid and emailAddress, but no displayName and photoUrl.

Google/Firebase Authentication no displayName or photoURL for iOS

Community
  • 1
  • 1
Richard
  • 8,193
  • 28
  • 107
  • 228
  • CocoaPods is not CocoaControls. – Tatsuyuki Ishi Mar 13 '17 at 05:49
  • Please can you elaborate on your comment? I don't understand what you are implying. The Firebase documentation has an example of iOS Authentication using Cocoa Pods, so my question is related to that. https://firebase.google.com/docs/ios/setup – Richard Mar 13 '17 at 05:52
  • Apologies, I copied a link from someones youtube channel. I will correct it. – Richard Mar 13 '17 at 05:55
  • If you want update plugin like Firebase easier , you should use CocoaPod. If you think you can do manually, it doesn't matter! – Ronald Vo Mar 13 '17 at 05:56
  • Do you know why when I do it manually, Firebase returns a user but with a null displayName and photoUrl? http://stackoverflow.com/questions/42736623/google-firebase-authentication-no-displayname-or-photourl-for-ios – Richard Mar 13 '17 at 05:57
  • I think your main confusion is about CocoaPods. CocoaPods doesn't add anything to your app itself, it's a dependency manager which fetches, updates, etc. specific versions of dependencies (such as firebase) for you (Firebase in turn *is* added to your app and enlarged the binary size of your app, etc.) – HAS Mar 13 '17 at 06:02
  • If you're worried about keeping your app small you should use Objective-C instead of Ionic2. – EmilioPelaez Mar 13 '17 at 06:03
  • CocoaPod just help you update the Firebase SDK, it doesn't do anything in your code or the way you connect with server. Because when Firebase SDK update, you have to update manually and sometimes it will conflict. – Ronald Vo Mar 13 '17 at 06:08

1 Answers1

2

Do not follow the Firebase guide if you're using a JS-based framework such as Ionic. Instead, just use AngularFire2. If CocoaPods is required, Ionic will handle automatically for you.

Your authentication problem is probably caused by OAuth scopes. Will provide the answer on your original one.

Tatsuyuki Ishi
  • 3,883
  • 3
  • 29
  • 41
  • thanks for the advise. I have been using AngularFire2, but it doesn't seem to work for Devices (iOS and Android), but only on Web Browsers. I would appreciate it if you could look at my original question. http://stackoverflow.com/questions/42736623/google-firebase-authentication-no-displayname-or-photourl-for-ios – Richard Mar 13 '17 at 06:05