diff --git a/proj-xcode/Classes/sdk/PowerAuthSDK.m b/proj-xcode/Classes/sdk/PowerAuthSDK.m index db6b3f90..6f12695d 100644 --- a/proj-xcode/Classes/sdk/PowerAuthSDK.m +++ b/proj-xcode/Classes/sdk/PowerAuthSDK.m @@ -65,18 +65,18 @@ - (void) initializeWithConfiguration:(PowerAuthConfiguration*)configuration // Make copy of configuration objects _configuration = [configuration copy]; - _keychainConfiguration = [(_keychainConfiguration ? _keychainConfiguration : [PA2KeychainConfiguration sharedInstance]) copy]; - _clientConfiguration = [(_clientConfiguration ? _clientConfiguration : [PA2ClientConfiguration sharedInstance]) copy]; + _keychainConfiguration = [(keychainConfiguration ? keychainConfiguration : [PA2KeychainConfiguration sharedInstance]) copy]; + _clientConfiguration = [(clientConfiguration ? clientConfiguration : [PA2ClientConfiguration sharedInstance]) copy]; // Prepare identifier for biometry related keys - use instanceId by default, or a custom value if set _biometryKeyIdentifier = _configuration.keychainKey_Biometry ? _configuration.keychainKey_Biometry : _configuration.instanceId; // Create session setup parameters PA2SessionSetup *setup = [[PA2SessionSetup alloc] init]; - setup.applicationKey = configuration.appKey; - setup.applicationSecret = configuration.appSecret; - setup.masterServerPublicKey = configuration.masterServerPublicKey; - setup.externalEncryptionKey = configuration.externalEncryptionKey; + setup.applicationKey = _configuration.appKey; + setup.applicationSecret = _configuration.appSecret; + setup.masterServerPublicKey = _configuration.masterServerPublicKey; + setup.externalEncryptionKey = _configuration.externalEncryptionKey; // Create a new session _session = [[PA2Session alloc] initWithSessionSetup:setup]; @@ -86,7 +86,7 @@ - (void) initializeWithConfiguration:(PowerAuthConfiguration*)configuration // Create and setup a new client _client = [[PA2Client alloc] init]; - _client.baseEndpointUrl = configuration.baseEndpointUrl; + _client.baseEndpointUrl = _configuration.baseEndpointUrl; _client.defaultRequestTimeout = _clientConfiguration.defaultRequestTimeout; _client.sslValidationStrategy = _clientConfiguration.sslValidationStrategy; @@ -109,8 +109,8 @@ - (void) initializeWithConfiguration:(PowerAuthConfiguration*)configuration // Important: This deletes all Keychain data in all PowerAuthSDK instances! // By default, the code uses standard user defaults, use `PA2KeychainConfiguration.keychainAttribute_UserDefaultsSuiteName` to use `NSUserDefaults` with a custom suite name. NSUserDefaults *userDefaults = nil; - if (keychainConfiguration.keychainAttribute_UserDefaultsSuiteName != nil) { - userDefaults = [[NSUserDefaults alloc] initWithSuiteName:keychainConfiguration.keychainAttribute_UserDefaultsSuiteName]; + if (_keychainConfiguration.keychainAttribute_UserDefaultsSuiteName != nil) { + userDefaults = [[NSUserDefaults alloc] initWithSuiteName:_keychainConfiguration.keychainAttribute_UserDefaultsSuiteName]; } else { userDefaults = [NSUserDefaults standardUserDefaults]; }