FIROptions.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #import <Foundation/Foundation.h>
  2. /**
  3. * This class provides constant fields of Google APIs.
  4. */
  5. @interface FIROptions : NSObject<NSCopying>
  6. /**
  7. * Returns the default options.
  8. */
  9. + (FIROptions *)defaultOptions;
  10. /**
  11. * An iOS API key used for authenticating requests from your app, e.g.
  12. * @"AIzaSyDdVgKwhZl0sTTTLZ7iTmt1r3N2cJLnaDk", used to identify your app to Google servers.
  13. */
  14. @property(nonatomic, readonly, copy) NSString *APIKey;
  15. /**
  16. * The OAuth2 client ID for iOS application used to authenticate Google users, for example
  17. * @"12345.apps.googleusercontent.com", used for signing in with Google.
  18. */
  19. @property(nonatomic, readonly, copy) NSString *clientID;
  20. /**
  21. * The tracking ID for Google Analytics, e.g. @"UA-12345678-1", used to configure Google Analytics.
  22. */
  23. @property(nonatomic, readonly, copy) NSString *trackingID;
  24. /**
  25. * The Project Number from the Google Developer's console, for example @"012345678901", used to
  26. * configure Google Cloud Messaging.
  27. */
  28. @property(nonatomic, readonly, copy) NSString *GCMSenderID;
  29. /**
  30. * The Android client ID used in Google AppInvite when an iOS app has its Android version, for
  31. * example @"12345.apps.googleusercontent.com".
  32. */
  33. @property(nonatomic, readonly, copy) NSString *androidClientID;
  34. /**
  35. * The Google App ID that is used to uniquely identify an instance of an app.
  36. */
  37. @property(nonatomic, readonly, copy) NSString *googleAppID;
  38. /**
  39. * The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com".
  40. */
  41. @property(nonatomic, readonly, copy) NSString *databaseURL;
  42. /**
  43. * The URL scheme used to set up Durable Deep Link service.
  44. */
  45. @property(nonatomic, readwrite, copy) NSString *deepLinkURLScheme;
  46. /**
  47. * The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com".
  48. */
  49. @property(nonatomic, readonly, copy) NSString *storageBucket;
  50. /**
  51. * Initializes a customized instance of FIROptions with keys. googleAppID, bundleID and GCMSenderID
  52. * are required. Other keys may required for configuring specific services.
  53. */
  54. - (instancetype)initWithGoogleAppID:(NSString *)googleAppID
  55. bundleID:(NSString *)bundleID
  56. GCMSenderID:(NSString *)GCMSenderID
  57. APIKey:(NSString *)APIKey
  58. clientID:(NSString *)clientID
  59. trackingID:(NSString *)trackingID
  60. androidClientID:(NSString *)androidClientID
  61. databaseURL:(NSString *)databaseURL
  62. storageBucket:(NSString *)storageBucket
  63. deepLinkURLScheme:(NSString *)deepLinkURLScheme;
  64. /**
  65. * Initializes a customized instance of FIROptions from the file at the given plist file path.
  66. * For example,
  67. * NSString *filePath =
  68. * [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
  69. * FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
  70. * Returns nil if the plist file does not exist or is invalid.
  71. */
  72. - (instancetype)initWithContentsOfFile:(NSString *)plistPath;
  73. @end