Post

Replies

Boosts

Views

Activity

Reply to NSUserDefaults Save Data copied while App transfer in new Device
Thanks for quick reply. We are updating the exiting Keychain using below code. Please let us know is this approach is correct or any other way is there? Can you please give more lights on below points Can we stop coping the application from one phone to another phone. How can we test the same without uploading app on App Store `// code spinnets `  [[[KeychainItemWrapper_utils alloc] initWithIdentifier:@"AC_APP_UUID" accessGroup:nil] resetKeychainItem];    [[[KeychainItemWrapper_utils alloc] initWithIdentifier:@"KEY_APP_UUID" accessGroup:nil] resetKeychainItem];    NSString *uuid;    KeychainItemWrapper_utils *keychain = [[KeychainItemWrapper_utils alloc] initWithIdentifier:keyName accessGroup:nil]; //   [keychain setObject:(id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly forKey:(id)kSecAttrAccessible]; //        NSDictionary *updatedAttr = @{ (id)kSecAttrAccessible : (id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly };     NSDictionary *query = @{                 (id)kSecClass : (id)kSecClassIdentity,                 (id)kSecAttrAccessible : (id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly                 };     OSStatus ret = SecItemUpdate((__bridge CFDictionaryRef)query,                    (__bridge CFDictionaryRef)updatedAttr);    switch (ret)     {      case   errSecSuccess:       NSLog(@"success");       break;      case errSecItemNotFound:       NSLog(@"no items to update");       break;      default:      {       NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:ret userInfo:nil];       NSLog(@"couldn't update items, error=%@", error);      }       break;     }
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’22