FIROptions.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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 Project ID from the Firebase console, for example @"abc-xyz-123". Currently only populated
  31. * when using [FIROptions defaultOptions].
  32. */
  33. @property(nonatomic, readonly, copy) NSString *projectID;
  34. /**
  35. * The Android client ID used in Google AppInvite when an iOS app has its Android version, for
  36. * example @"12345.apps.googleusercontent.com".
  37. */
  38. @property(nonatomic, readonly, copy) NSString *androidClientID;
  39. /**
  40. * The Google App ID that is used to uniquely identify an instance of an app.
  41. */
  42. @property(nonatomic, readonly, copy) NSString *googleAppID;
  43. /**
  44. * The database root URL, e.g. @"http://abc-xyz-123.firebaseio.com".
  45. */
  46. @property(nonatomic, readonly, copy) NSString *databaseURL;
  47. /**
  48. * The URL scheme used to set up Durable Deep Link service.
  49. */
  50. @property(nonatomic, readwrite, copy) NSString *deepLinkURLScheme;
  51. /**
  52. * The Google Cloud Storage bucket name, e.g. @"abc-xyz-123.storage.firebase.com".
  53. */
  54. @property(nonatomic, readonly, copy) NSString *storageBucket;
  55. /**
  56. * Initializes a customized instance of FIROptions with keys. googleAppID, bundleID and GCMSenderID
  57. * are required. Other keys may required for configuring specific services.
  58. */
  59. - (instancetype)initWithGoogleAppID:(NSString *)googleAppID
  60. bundleID:(NSString *)bundleID
  61. GCMSenderID:(NSString *)GCMSenderID
  62. APIKey:(NSString *)APIKey
  63. clientID:(NSString *)clientID
  64. trackingID:(NSString *)trackingID
  65. androidClientID:(NSString *)androidClientID
  66. databaseURL:(NSString *)databaseURL
  67. storageBucket:(NSString *)storageBucket
  68. deepLinkURLScheme:(NSString *)deepLinkURLScheme;
  69. /**
  70. * Initializes a customized instance of FIROptions from the file at the given plist file path.
  71. * For example,
  72. * NSString *filePath =
  73. * [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
  74. * FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
  75. * Returns nil if the plist file does not exist or is invalid.
  76. */
  77. - (instancetype)initWithContentsOfFile:(NSString *)plistPath;
  78. @end