RCNDevice.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright 2019 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. typedef NS_ENUM(NSInteger, RCNDeviceModel) {
  18. RCNDeviceModelOther,
  19. RCNDeviceModelPhone,
  20. RCNDeviceModelTablet,
  21. RCNDeviceModelTV,
  22. RCNDeviceModelGlass,
  23. RCNDeviceModelCar,
  24. RCNDeviceModelWearable,
  25. };
  26. /// CocoaPods SDK version
  27. NSString *FIRRemoteConfigPodVersion(void);
  28. /// App version.
  29. NSString *FIRRemoteConfigAppVersion(void);
  30. /// App build version
  31. NSString *FIRRemoteConfigAppBuildVersion(void);
  32. /// Device country, in lowercase.
  33. NSString *FIRRemoteConfigDeviceCountry(void);
  34. /// Device locale, in language_country format, e.g. en_US.
  35. NSString *FIRRemoteConfigDeviceLocale(void);
  36. /// Device subtype.
  37. RCNDeviceModel FIRRemoteConfigDeviceSubtype(void);
  38. /// Device timezone.
  39. NSString *FIRRemoteConfigTimezone(void);
  40. /// Update device context to the given dictionary.
  41. NSMutableDictionary *FIRRemoteConfigDeviceContextWithProjectIdentifier(
  42. NSString *GMPProjectIdentifier);
  43. /// Check whether client has changed device context, including app version,
  44. /// iOS version, device country etc. This is used to determine whether to throttle.
  45. BOOL FIRRemoteConfigHasDeviceContextChanged(NSDictionary *deviceContext,
  46. NSString *GMPProjectIdentifier);