FPRConfiguration.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import <Foundation/Foundation.h>
  15. /**
  16. * @brief Configures the behavior of FPR.
  17. */
  18. @interface FPRConfiguration : NSObject <NSCopying>
  19. /**
  20. * Designated initializer.
  21. * @brief Creates a new configuration.
  22. *
  23. * @param appID Identifies app on Firebase
  24. * @param APIKey Authenticates app on Firebase
  25. * @param autoPush Google Data Transport destination - prod/autopush
  26. */
  27. - (instancetype)initWithAppID:(NSString *)appID
  28. APIKey:(NSString *)APIKey
  29. autoPush:(BOOL)autoPush NS_DESIGNATED_INITIALIZER;
  30. - (instancetype)init NS_UNAVAILABLE;
  31. /** This is a class method for initWithAppID:APIKey:autoPush:. */
  32. + (instancetype)configurationWithAppID:(NSString *)appID
  33. APIKey:(NSString *)APIKey
  34. autoPush:(BOOL)autoPush;
  35. /** @brief Identifies app on Firebase. */
  36. @property(readonly, nonatomic, copy) NSString *appID;
  37. /** @brief Authenticates app on Firebase. */
  38. @property(readonly, nonatomic, copy) NSString *APIKey;
  39. /** @brief Use autopush or prod logging. */
  40. @property(readonly, nonatomic, assign, getter=isAutoPush) BOOL autoPush;
  41. @end