Code Monkey home page Code Monkey logo

db-google-firebase-ios-location-example's Introduction

This is a legacy Firebase example (for SDK 2.x.x). You probably want to use one of the up-to-date examples at https://firebase.google.com/docs/samples


Firebase iOS Location Demo

This is an example iOS app that will show you how to integrate the Firebase iOS SDK, Google Maps iOS SDK, and the Facebook iOS SDK.

Example #Setup ##Installing Frameworks

  1. Firebase SDK (Latest)
  • Add the Firebase SDK to the project's Frameworks
  1. Facebook SDK
  • Add the Facebook SDK to the project's Frameworks
  1. GMS SDK
  • Add the GMS SDK to the project's Frameworks and select 'Copy into destination group's folder'
  1. GoogleMaps bundle (found in the copied GoogleMaps.Framework. see documentation)

##Installing Dependencies

  1. GMS SDK
  2. AVFoundation.framework
  3. CoreData.framework
  4. CoreLocation.framework
  5. CoreText.framework
  6. GLKit.framework
  7. ImageIO.framework
  8. libc++.dylib
  9. libicucore.dylib
  10. libz.dylib
  11. OpenGLES.framework
  12. QuartzCore.framework
  13. SystemConfiguration.framework
  14. Firebase SDK
  15. libicucore.framework
  16. CFNetwork.framework
  17. Security.framework
  18. Accounts.framework
  19. Social.framework

##Configuring the Build

  1. Build Settings > (All, Combined) > Other Linker Flags = -ObjC

##Setup a new Facebook App Follow Facebook's Getting Started Guide to setup a new facebook app and obtain a Facebook App Id and App Secret

  1. Configure location-demo-Info.plist in Support Files to include FacebookAppID, FacebookDisplayName, and URL types per the values specified in the guide above
  2. Add a valid contact email under Settings in the "Apps" tab
  3. Make the app live to the general public under Stats & Review in the "Apps" tab

##Setup a new Google Maps App Follow Google's Getting Started Guide to setup an app and obtain an API key

  1. Obtain an API Key
  2. Add an entry to location-demo-Info.plist with the key GMSAPIKey and your API key as the value
  • This is used to render the map in AppDelegate.m in
    [GMSServices provideAPIKey:[plist objectForKey:@"GMSAPIKey"]]

##Setup Firebase Login with Facebook

  1. Enable Facebook Login in the Login tab on your Firebase Dashboard
  2. Add your Facebook App ID and Facebook App Secret
  3. Add Firebase as a Valid OAuth Redirect URI by adding the URL: https://auth.firebase.com/auth/facebook/callback in the Facebook Advanced tab under Settings in Facebook

#Code ##Login using Facebook

  • Use FBLoginView
    • Add Facebook Login to the View Controller (see loadFacebookView in ViewController.m)
    • Override the application:openURL:sourceApplication:annotation: function in AppDelegate.m

##Authenticate to Firebase

  • Use the Facebook auth token
    • NSString *fbAccessToken = [[[FBSession activeSession] accessTokenData] accessToken];
  • Create a FirebaseLogin object
  • Call loginWithFacebookWithAccessToken:withCompletetionBlock: in AppDelegate.m

##Add Google Maps to the View Controller

  • See loadMapsView in ViewController.m

db-google-firebase-ios-location-example's People

Contributors

tonymeng avatar davideast avatar abeisgoat avatar firebase-ops avatar

Watchers

James Cloos avatar PKCodeBox avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.