File tree Expand file tree Collapse file tree 7 files changed +16
-0
lines changed
Expand file tree Collapse file tree 7 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1919@property (nonatomic , strong ) NSString *hardwareId;
2020@property (nonatomic , strong ) NSString *hardwareIdType;
2121@property (nonatomic ) BOOL isRealHardwareId;
22+ @property (nonatomic , strong ) NSString *vendorId;
2223@property (nonatomic , strong ) NSString *brandName;
2324@property (nonatomic , strong ) NSString *modelName;
2425@property (nonatomic , strong ) NSString *osName;
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ - (id)init {
3838 self.hardwareIdType = hardwareIdType;
3939 }
4040
41+ self.vendorId = [BNCSystemObserver getVendorId: preferenceHelper.isDebug];
4142 self.brandName = [BNCSystemObserver getBrand ];
4243 self.modelName = [BNCSystemObserver getModel ];
4344 self.osName = [BNCSystemObserver getOS ];
Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ - (void)updateDeviceInfoToMutableDictionary:(NSMutableDictionary *)dict {
260260 dict[BRANCH_REQUEST_KEY_IS_HARDWARE_ID_REAL] = @(deviceInfo.isRealHardwareId );
261261 }
262262
263+ [self safeSetValue: deviceInfo.vendorId forKey: BRANCH_REQUEST_KEY_IOS_VENDOR_ID onDict: dict];
263264 [self safeSetValue: deviceInfo.brandName forKey: BRANCH_REQUEST_KEY_BRAND onDict: dict];
264265 [self safeSetValue: deviceInfo.modelName forKey: BRANCH_REQUEST_KEY_MODEL onDict: dict];
265266 [self safeSetValue: deviceInfo.osName forKey: BRANCH_REQUEST_KEY_OS onDict: dict];
Original file line number Diff line number Diff line change 1111@interface BNCSystemObserver : NSObject
1212
1313+ (NSString *)getUniqueHardwareId : (BOOL *)isReal isDebug : (BOOL )debug andType : (NSString **)type ;
14+ + (NSString *)getVendorId : (BOOL )debug ;
1415+ (NSString *)getDefaultUriScheme ;
1516+ (NSString *)getAppVersion ;
1617+ (NSString *)getBundleID ;
Original file line number Diff line number Diff line change @@ -44,6 +44,16 @@ + (NSString *)getUniqueHardwareId:(BOOL *)isReal isDebug:(BOOL)debug andType:(NS
4444 return uid;
4545}
4646
47+ + (NSString *)getVendorId : (BOOL )debug {
48+ NSString *vendorId = nil ;
49+
50+ if (!debug && NSClassFromString (@" UIDevice" )) {
51+ vendorId = [[UIDevice currentDevice ].identifierForVendor UUIDString ];
52+ }
53+
54+ return vendorId;
55+ }
56+
4757+ (BOOL )adTrackingSafe {
4858 Class ASIdentifierManagerClass = NSClassFromString (@" ASIdentifierManager" );
4959 if (ASIdentifierManagerClass) {
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ extern NSString * const BRANCH_REQUEST_KEY_APP_LIST;
4040extern NSString * const BRANCH_REQUEST_KEY_HARDWARE_ID;
4141extern NSString * const BRANCH_REQUEST_KEY_HARDWARE_ID_TYPE;
4242extern NSString * const BRANCH_REQUEST_KEY_IS_HARDWARE_ID_REAL;
43+ extern NSString * const BRANCH_REQUEST_KEY_IOS_VENDOR_ID;
4344extern NSString * const BRANCH_REQUEST_KEY_AD_TRACKING_ENABLED;
4445extern NSString * const BRANCH_REQUEST_KEY_IS_REFERRABLE;
4546extern NSString * const BRANCH_REQUEST_KEY_DEBUG;
Original file line number Diff line number Diff line change 4040NSString * const BRANCH_REQUEST_KEY_HARDWARE_ID = @" hardware_id" ;
4141NSString * const BRANCH_REQUEST_KEY_HARDWARE_ID_TYPE = @" hardware_id_type" ;
4242NSString * const BRANCH_REQUEST_KEY_IS_HARDWARE_ID_REAL = @" is_hardware_id_real" ;
43+ NSString * const BRANCH_REQUEST_KEY_IOS_VENDOR_ID = @" ios_vendor_id" ;
4344NSString * const BRANCH_REQUEST_KEY_AD_TRACKING_ENABLED = @" ad_tracking_enabled" ;
4445NSString * const BRANCH_REQUEST_KEY_IS_REFERRABLE = @" is_referrable" ;
4546NSString * const BRANCH_REQUEST_KEY_DEBUG = @" debug" ;
You can’t perform that action at this time.
0 commit comments