RCNDevice.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. /// SDK version. This is different than CocoaPods SDK version.
  41. /// It is used for config server to keep track iOS client version.
  42. /// major * 10000 + minor + 100 + patch.
  43. int FIRRemoteConfigSDKVersion(void);
  44. /// Update device context to the given dictionary.
  45. NSMutableDictionary *FIRRemoteConfigDeviceContextWithProjectIdentifier(
  46. NSString *GMPProjectIdentifier);
  47. /// Check whether client has changed device context, including app version,
  48. /// iOS version, device country etc. This is used to determine whether to throttle.
  49. BOOL FIRRemoteConfigHasDeviceContextChanged(NSDictionary *deviceContext,
  50. NSString *GMPProjectIdentifier);