@@ -48,6 +48,14 @@ + (BNCApplication*) createCurrentApplication {
4848 application->_firstInstallDate = [BNCApplication firstInstallDate ];
4949 application->_currentInstallDate = [BNCApplication currentInstallDate ];
5050
51+ NSString *group = [BNCKeyChain securityAccessGroup ];
52+ if (group) {
53+ NSRange range = [group rangeOfString: @" ." ];
54+ if (range.location != NSNotFound ) {
55+ application->_teamID = [[group substringToIndex: range.location] copy ];
56+ }
57+ }
58+
5159 return application;
5260}
5361
@@ -93,7 +101,7 @@ + (NSDate*) firstInstallBuildDate {
93101 forService: kBranchKeychainService
94102 key: kBranchKeychainFirstBuildKey
95103 cloudAccessGroup: nil ];
96-
104+ if (error) BNCLogError ( @" Keychain store: %@ . " , error);
97105 return firstBuildDate;
98106}
99107
@@ -128,7 +136,7 @@ + (NSDate*) firstInstallDate {
128136 forService: kBranchKeychainService
129137 key: kBranchKeychainFirstInstalldKey
130138 cloudAccessGroup: nil ];
131-
139+ if (error) BNCLogError ( @" Keychain store: %@ . " , error);
132140 return firstInstallDate;
133141}
134142
@@ -146,3 +154,16 @@ - (NSDictionary*) deviceKeyIdentityValueDictionary {
146154}
147155
148156@end
157+
158+ @implementation BNCApplication (BNCTest)
159+
160+ - (void ) setAppOriginalInstallDate : (NSDate *)originalInstallDate
161+ firstInstallDate : (NSDate *)firstInstallDate
162+ lastUpdateDate : (NSDate *)lastUpdateDate {
163+ self->_currentInstallDate = firstInstallDate; // latest_install_time
164+ self->_firstInstallDate = originalInstallDate; // first_install_time
165+ self->_currentBuildDate = lastUpdateDate; // lastest_update_time
166+ }
167+
168+ @end
169+
0 commit comments