Migration from 1.5.x to 1.6.x
PowerAuth Mobile SDK in version 1.6.0 is a maintenance release that brings multiple enhancements to both platforms:
- Android SDK now depends on Android Jetpack libraries instead of the deprecated support library. This is most important for biometric authentication.
- iOS SDK is no longer in conflict with 3rd party OpenSSL libraries. Our implementation still depends on OpenSSL, but the dependency is now hidden in precompiled
PowerAuthCoredynamic framework. - iOS SDK has now unified class naming. So, no longer
PA2vsPowerAuthclass prefixes.
Compatibility with PowerAuth Server
- This release is fully compatible with PowerAuth Server version
0.24.x,1.0.xand1.1.x.
Android
API changes
- PowerAuth mobile SDK now uses Jetpack libraries from
androidxnamespace as a replacement for old support library. If your application is still using the support library, then we highly recommend you to migrate your code to AndroidX. - PowerAuth mobile SDK now uses
androidx.biometryfor a biometric authentication, so you can upgrade this support library independently to PowerAuth mobile SDK. This is useful in case your users encounter a various device specific incompatibilities. - All biometry-related API calls no longer accept
FragmentManageras a parameter. You can now choose between variants withFragmentorFragmentActivityat input:PowerAuthSDK.commitActivation(Context, Fragment, String, String, String, ICommitActivationWithBiometryListener)PowerAuthSDK.commitActivation(Context, FragmentActivity, String, String, String, ICommitActivationWithBiometryListener)PowerAuthSDK.addBiometryFactor(Context, Fragment, String, String, String, IAddBiometryFactorListener)PowerAuthSDK.addBiometryFactor(Context, FragmentActivity, String, String, String, IAddBiometryFactorListener)PowerAuthSDK.authenticateUsingBiometry(Context, Fragment, String, String, IBiometricAuthenticationCallback)PowerAuthSDK.authenticateUsingBiometry(Context, FragmentActivity, String, String, IBiometricAuthenticationCallback)- All above methods must be called from UI thread, otherwise
IllegalStateExceptionis thrown.
- The
BiometricDialogResourcesclass containing resource IDs for the biometric authentication has been heavily reduced. Please review the actual usage of the resources carefuly.- The
BiometricDialogResources.Stringssection has been reduced. The old section constructor is now deprecated and you can review what strings are still in use. - The
BiometricDialogResources.Drawablessection has been reduced. The old section constructor is now deprecated and you can review what images are still in use. - There’s no longer
BiometricDialogResources.Colorssection. - There’s no longer
BiometricDialogResources.Layoutsection.
- The
- SDK no longer provide functions to detect root on device.
- All
PowerAuthErrorCodes.PA2ErrorCode*constants are now deprecated. You can use a new constants with a standard naming for a replacement. For examplePA2ErrorCodeNetworkErroris nowNETWORK_ERROR. - The following classes and interfaces are now deprecated:
PA2Systemclass is nowPowerAuthSystemPA2Logclass is nowPowerAuthLogPA2ClientValidationStrategyinterface is nowHttpClientValidationStrategyPA2ClientSslNoValidationStrategyclass is nowHttpClientSslNoValidationStrategyOtpclass is nowActivationCodeavailable in packageio.getlime.security.powerauth.coreOtpUtilclass is nowActivationCodeUtilavailable in packageio.getlime.security.powerauth.core
Other changes
- If your application is using an asymmetric cipher protecting the biometric key (e.g.
PowerAuthKeychainConfiguration.isAuthenticateOnBiometricKeySetupisfalse), then the methods configuring new biometric key may take a longer time calculating the key-pair on the background thread. The PowerAuth mobile SDK doesn’t display any biometric authentication dialog in this case, so your application’s UI should display some activity indicator. The following methods are affected by this change:PowerAuthSDK.commitActivation(Context, Fragment | FragmentActivity, String, String, String, ICommitActivationWithBiometryListener)PowerAuthSDK.addBiometryFactor(Context, Fragment | FragmentActivity, String, String, String, IAddBiometryFactorListener)
PowerAuthSDK.createActivation(...)methods now reprots a slightly different error codes when invalid activation or recovery code is provided. If your application properly validate input data with usingActivationCodeUtil, then this change should not affect your code.
iOS & tvOS
The main change in this SDK version is that SDK is now composed from two dynamic frameworks:
PowerAuthCore- module contains low level implementation and has embedded OpenSSL.PowerAuth2- module contains all high level SDK source codes and depends onPowerAuthCore
Version 1.6.6 increased minimum required iOS & tvOS deployment target to 11.0. See Xcode14 support.
API changes
- All public objects, protocols, enums, constants and functions now have
PowerAuthprefix. All previously declaredPA2*interfaces are now declared as deprecated.- For example,
PA2ActivationStatusis now deprecated and you should usePowerAuthActivationStatusinstead. The similar rename can be applied for all deprecated interfaces. - This change normally works well for swift enumerations, because enumeration values are mangled to a short names, like
.removed. For ObjC projects, it’s recommended to use project-wide find’n’replace. For example, forPA2ActivationState_you can replace all occurrences toPowerAuthActivationState_. - You may encounter a several compilation errors at the beginning. If so, then it’s recommended to fix the deprecation warnings first, because that may also solve that compilation errors.
- For example,
- ECIES routines are now provided by new
PowerAuthCoremodule, so in case your application depends on our E2E encryption scheme, then you have addimport PowerAuthCorefirst and then fix the deprecated warnings. - SDK no longer provide functions to detect jailbreak on device.
PowerAuthActivationobject constructor now throws an error in Swift. If you don’t care about the error, then usetry?statement to achieve previous constructor behavior.
List of renamed interfaces:
- Configuration
PA2ClientConfigurationis nowPowerAuthClientConfigurationPA2KeychainConfigurationis nowPowerAuthKeychainConfiguration
- Activation
PA2ActivationStateenum is nowPowerAuthActivationState.PA2ActivationStatusis nowPowerAuthActivationStatusPA2ActivationResultis nowPowerAuthActivationResultPA2ActivationRecoveryDatais nowPowerAuthActivationRecoveryDataPA2Otpis nowPowerAuthActivationCodePA2OtpUtilis nowPowerAuthActivationCodeUtil
- Signatures
PA2AuthorizationHttpHeaderis nowPowerAuthAuthorizationHttpHeader
- Error handling
PA2ErrorDomainconstant is nowPowerAuthErrorDomain(ourNSErrordomain)PA2ErrorCode*constants are now replaced byPowerAuthErrorCodeenum.- You can use
NSError.powerAuthErrorCodeto acquire a fully typed error code fromNSErrorobject.
- You can use
PA2ErrorInfoKey_AdditionalInfoconstant is nowPowerAuthErrorInfoKey_AdditionalInfo(key toNSError.userInfodictionary)PA2ErrorInfoKey_ResponseDataconstant is nowPowerAuthErrorInfoKey_ResponseData(key toNSError.userInfodictionary)PA2Erroris nowPowerAuthRestApiError(REST API object received in case of error)PA2ErrorResponseis nowPowerAuthRestApiErrorResponse(REST API response object, containing full information about failure)PA2RestResponseStatusenum is nowPowerAuthRestApiResponseStatus(enum containsOKorERRORconstants)
- Networking
PA2HttpRequestInterceptorprotocol is nowPowerAuthHttpRequestInterceptorPA2CustomHeaderRequestInterceptoris nowPowerAuthCustomHeaderRequestInterceptorPA2BasicHttpAuthenticationRequestInterceptoris nowPowerAuthBasicHttpAuthenticationRequestInterceptorPA2ClientSslValidationStrategyprotocol is nowPowerAuthClientSslValidationStrategyPA2ClientSslNoValidationStrategyis nowPowerAuthClientSslNoValidationStrategy
- Keychain
PA2Keychainis nowPowerAuthKeychainPA2KeychainItemAccessenum is nowPowerAuthKeychainItemAccessPA2BiometricAuthenticationInfostructure is nowPowerAuthBiometricAuthenticationInfoPA2BiometricAuthenticationStatusenum is nowPowerAuthBiometricAuthenticationStatusPA2BiometricAuthenticationTypeenum is nowPowerAuthBiometricAuthenticationTypePA2KeychainStoreItemResultenum is nowPowerAuthKeychainStoreItemResultPA2Keychain_Initializedconstant is nowPowerAuthKeychain_InitializedPA2Keychain_Statusconstant is nowPowerAuthKeychain_StatusPA2Keychain_Possessionconstant is nowPowerAuthKeychain_PossessionPA2Keychain_Biometryconstant is nowPowerAuthKeychain_BiometryPA2Keychain_TokenStoreconstant is nowPowerAuthKeychain_TokenStorePA2KeychainKey_Possessionconstant is nowPowerAuthKeychainKey_Possession
- Other interfaces
PA2WCSessionManageris nowPowerAuthWCSessionManagerPA2OperationTaskprotocol is nowPowerAuthOperationTaskPA2Systemis nowPowerAuthSystemPA2LogSetEnabled()function is nowPowerAuthLogSetEnabled()PA2LogIsEnabled()function is nowPowerAuthLogIsEnabled()PA2LogSetVerbose()function is nowPowerAuthLogSetVerbose()PA2LogIsVerbose()function is nowPowerAuthLogIsVerbose()
- Interfaces moved to
PowerAuthCoremodulePA2Passwordis nowPowerAuthCorePasswordPA2MutablePasswordis nowPowerAuthCoreMutablePasswordPA2ECIESEncryptoris nowPowerAuthCoreEciesEncryptorPA2ECIESCryptogramis nowPowerAuthCoreEciesCryptogramPA2ECIESMetaDatais nowPowerAuthCoreEciesMetaDataPA2ECIESEncryptorScopeenum is nowPowerAuthCoreEciesEncryptorScopePA2CryptoUtilsis nowPowerAuthCoreCryptoUtilsPA2ECPublicKeyis nowPowerAuthCoreECPublicKey
Other changes
PowerAuthErrorCodescontains new.invalidActivationCodeconstant, reported in case that invalid activation or recovery code is provided toPowerAuthSDK.createActivation(...)method. If your application properly validate input data with usingPowerAuthActivationCodeUtil, then this change should not affect your code.
iOS & tvOS App Extensions
The PowerAuth2ForExtensions is now distributed as a dynamic module, instead of static framework.
Version 1.6.6 increased minimum required iOS & tvOS deployment target to 11.0. See Xcode14 support.
API changes
- All public objects, protocols, enums, constants and functions now have
PowerAuthprefix. All previously declaredPA2*interfaces are now declared as deprecated.
List of renamed interfaces:
PA2ExtensionLibraryis nowPowerAuthSystemPA2ErrorDomainconstant is nowPowerAuthErrorDomain(ourNSErrordomain)PA2ErrorCode*constants are now replaced byPowerAuthErrorCodeenum.- You can use
NSError.powerAuthErrorCodeto acquire a fully typed error code fromNSErrorobject.
- You can use
PA2ErrorInfoKey_AdditionalInfoconstant is nowPowerAuthErrorInfoKey_AdditionalInfo(key toNSError.userInfodictionary)PA2ErrorInfoKey_ResponseDataconstant is nowPowerAuthErrorInfoKey_ResponseData(key toNSError.userInfodictionary)PA2KeychainConfigurationis nowPowerAuthKeychainConfigurationPA2Keychainis nowPowerAuthKeychain(see iOS migration note for the rest of changes in keychain-related interfaces)PA2LogSetEnabled()function is nowPowerAuthLogSetEnabled()PA2LogIsEnabled()function is nowPowerAuthLogIsEnabled()PA2LogSetVerbose()function is nowPowerAuthLogSetVerbose()PA2LogIsVerbose()function is nowPowerAuthLogIsVerbose()
watchOS
The PowerAuth2ForWatch is now distributed as a dynamic module, instead of static framework.
Version 1.6.6 increased minimum required watchOS deployment target to 4.0. See Xcode14 support.
API changes
- All public objects, protocols, enums, constants and functions now have
PowerAuthprefix. All previously declaredPA2*interfaces are now declared as deprecated.
List of renamed interfaces:
PA2ExtensionLibraryis nowPowerAuthSystemPA2WCSessionManageris nowPowerAuthWCSessionManagerPA2ErrorDomainconstant is nowPowerAuthErrorDomain(ourNSErrordomain)PA2ErrorCode*constants are now replaced byPowerAuthErrorCodeenum.- You can use
NSError.powerAuthErrorCodeto acquire a fully typed error code fromNSErrorobject.
- You can use
PA2ErrorInfoKey_AdditionalInfoconstant is nowPowerAuthErrorInfoKey_AdditionalInfo(key toNSError.userInfodictionary)PA2ErrorInfoKey_ResponseDataconstant is nowPowerAuthErrorInfoKey_ResponseData(key toNSError.userInfodictionary)PA2KeychainConfigurationis nowPowerAuthKeychainConfigurationPA2Keychainis nowPowerAuthKeychain(see iOS migration note for the rest of changes in keychain-related interfaces)PA2LogSetEnabled()function is nowPowerAuthLogSetEnabled()PA2LogIsEnabled()function is nowPowerAuthLogIsEnabled()PA2LogSetVerbose()function is nowPowerAuthLogSetVerbose()PA2LogIsVerbose()function is nowPowerAuthLogIsVerbose()
Changes in 1.6.6+
Xcode14 support
Due to changes in Xcode 14, bitcode is no longer supported and we had to increase minimum supported OS to the following versions:
- iOS 11.0
- tvOS 11.0
- watchOS 4.0
If you still have to compile our SDK for older operating systems, then you need to build the library manually with Xcode older than 14.0. For example:
- Clone repository
git clone --recursive https://github.com/wultra/powerauth-mobile-sdk.git cd powerauth-mobile-sdk git submodule update - Make sure that xcodebuild is older than 14.0:
% xcodebuild -version Xcode 13.2.1 Build version 13C100 - Build library with legacy architectures and bitcode:
./scripts/ios-build-sdk.sh buildCore buildSdk --legacy-archs --use-bitcode --out-dir ./BuildSimilar command is available for app extensions and watchos:
./scripts/ios-build-extensions.sh extensions watchos --legacy-archs --use-bitcode --out-dir ./Build
If you use cocoapds for PowerAuth mobile SDK integration, then please let us know and we’ll prepare a special release branch for you.