MBXUAComponents.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // This file is generated and will be overwritten automatically.
  2. #import <Foundation/Foundation.h>
  3. /**
  4. * UAComponents holds Application and SDK information for generating User-Agent string.
  5. *
  6. * The UA string itself is broken down into four components:
  7. * 1. Application Name and version - appName/appVersion.
  8. * 2. Application Identifier and OS Information - (appIdentifier; appBuildNumber; osName osVersion). This will be skipped from UA string, if any one of the field is empty or unknown.
  9. * 3. SDK Name and Version - sdkName/sdkVersion.
  10. * 4. SDK Identifier - (sdkIdentifier; sdkBuildNumber). This will be skipped from UA string, if any one of the field is empty or unknown.
  11. *
  12. * User Agent String Example: AppName/1.0 (app.bundle.identifier; v1; iOS 13.0.1) MapboxFramework/1.0 (framework.bundle.identifier; v1) Mapbox Common Library/v1.0.0
  13. *
  14. * Note that if the User-Agent is already part of the HTTP request headers, we skip the generation using the information provided through the UserAgentComponents.
  15. */
  16. NS_SWIFT_NAME(UAComponents)
  17. __attribute__((visibility ("default")))
  18. @interface MBXUAComponents : NSObject
  19. - (nonnull instancetype)init;
  20. - (nonnull instancetype)initWithAppNameComponent:(nonnull NSString *)appNameComponent
  21. appVersionComponent:(nonnull NSString *)appVersionComponent
  22. appIdentifierComponent:(nonnull NSString *)appIdentifierComponent
  23. appBuildNumberComponent:(nonnull NSString *)appBuildNumberComponent
  24. osNameComponent:(nonnull NSString *)osNameComponent
  25. osVersionComponent:(nonnull NSString *)osVersionComponent
  26. sdkNameComponent:(nonnull NSString *)sdkNameComponent
  27. sdkVersionComponent:(nonnull NSString *)sdkVersionComponent
  28. sdkIdentifierComponent:(nonnull NSString *)sdkIdentifierComponent
  29. sdkBuildNumberComponent:(nonnull NSString *)sdkBuildNumberComponent;
  30. /** Application Name (e.g. kCFBundleNameKey on Darwin) */
  31. @property (nonatomic, readonly, nonnull, copy) NSString *appNameComponent;
  32. /** Application Version (e.g. may be simple version 1.0) */
  33. @property (nonatomic, readonly, nonnull, copy) NSString *appVersionComponent;
  34. /** Application Identifier (e.g. bundle identifier on Darwin, package name of Android) */
  35. @property (nonatomic, readonly, nonnull, copy) NSString *appIdentifierComponent;
  36. /** Application Build Number (e.g. kCFBundleVersionKey on Darwin) */
  37. @property (nonatomic, readonly, nonnull, copy) NSString *appBuildNumberComponent;
  38. /** OS Name (e.g. iOS or Android) */
  39. @property (nonatomic, readonly, nonnull, copy) NSString *osNameComponent;
  40. /** OS Version (e.g 13.1.0) */
  41. @property (nonatomic, readonly, nonnull, copy) NSString *osVersionComponent;
  42. /** SDK/Framework Name (e.g. Maps) */
  43. @property (nonatomic, readonly, nonnull, copy) NSString *sdkNameComponent;
  44. /** SDK/Framework Version (e.g v1.0.0) */
  45. @property (nonatomic, readonly, nonnull, copy) NSString *sdkVersionComponent;
  46. /** SDK/Framework Identifier */
  47. @property (nonatomic, readonly, nonnull, copy) NSString *sdkIdentifierComponent;
  48. /** SDK/Framework Build Number */
  49. @property (nonatomic, readonly, nonnull, copy) NSString *sdkBuildNumberComponent;
  50. @end