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
PowerAuthCore
dynamic framework. - iOS SDK has now unified class naming. So, no longer
PA2
vsPowerAuth
class prefixes.
Compatibility with PowerAuth Server
- This release is fully compatible with PowerAuth Server version
0.24.x
,1.0.x
and1.1.x
.
Android
API changes
- PowerAuth mobile SDK now uses Jetpack libraries from
androidx
namespace 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.biometry
for 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
FragmentManager
as a parameter. You can now choose between variants withFragment
orFragmentActivity
at 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
IllegalStateException
is thrown.
- The
BiometricDialogResources
class containing resource IDs for the biometric authentication has been heavily reduced. Please review the actual usage of the resources carefuly.- The
BiometricDialogResources.Strings
section has been reduced. The old section constructor is now deprecated and you can review what strings are still in use. - The
BiometricDialogResources.Drawables
section 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.Colors
section. - There’s no longer
BiometricDialogResources.Layout
section.
- 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 examplePA2ErrorCodeNetworkError
is nowNETWORK_ERROR
. - The following classes and interfaces are now deprecated:
PA2System
class is nowPowerAuthSystem
PA2Log
class is nowPowerAuthLog
PA2ClientValidationStrategy
interface is nowHttpClientValidationStrategy
PA2ClientSslNoValidationStrategy
class is nowHttpClientSslNoValidationStrategy
Otp
class is nowActivationCode
available in packageio.getlime.security.powerauth.core
OtpUtil
class is nowActivationCodeUtil
available in packageio.getlime.security.powerauth.core
Other changes
- If your application is using an asymmetric cipher protecting the biometric key (e.g.
PowerAuthKeychainConfiguration.isAuthenticateOnBiometricKeySetup
isfalse
), 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
PowerAuth
prefix. All previously declaredPA2*
interfaces are now declared as deprecated.- For example,
PA2ActivationStatus
is now deprecated and you should usePowerAuthActivationStatus
instead. 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
PowerAuthCore
module, so in case your application depends on our E2E encryption scheme, then you have addimport PowerAuthCore
first and then fix the deprecated warnings. - SDK no longer provide functions to detect jailbreak on device.
PowerAuthActivation
object 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
PA2ClientConfiguration
is nowPowerAuthClientConfiguration
PA2KeychainConfiguration
is nowPowerAuthKeychainConfiguration
- Activation
PA2ActivationState
enum is nowPowerAuthActivationState
.PA2ActivationStatus
is nowPowerAuthActivationStatus
PA2ActivationResult
is nowPowerAuthActivationResult
PA2ActivationRecoveryData
is nowPowerAuthActivationRecoveryData
PA2Otp
is nowPowerAuthActivationCode
PA2OtpUtil
is nowPowerAuthActivationCodeUtil
- Signatures
PA2AuthorizationHttpHeader
is nowPowerAuthAuthorizationHttpHeader
- Error handling
PA2ErrorDomain
constant is nowPowerAuthErrorDomain
(ourNSError
domain)PA2ErrorCode*
constants are now replaced byPowerAuthErrorCode
enum.- You can use
NSError.powerAuthErrorCode
to acquire a fully typed error code fromNSError
object.
- You can use
PA2ErrorInfoKey_AdditionalInfo
constant is nowPowerAuthErrorInfoKey_AdditionalInfo
(key toNSError.userInfo
dictionary)PA2ErrorInfoKey_ResponseData
constant is nowPowerAuthErrorInfoKey_ResponseData
(key toNSError.userInfo
dictionary)PA2Error
is nowPowerAuthRestApiError
(REST API object received in case of error)PA2ErrorResponse
is nowPowerAuthRestApiErrorResponse
(REST API response object, containing full information about failure)PA2RestResponseStatus
enum is nowPowerAuthRestApiResponseStatus
(enum containsOK
orERROR
constants)
- Networking
PA2HttpRequestInterceptor
protocol is nowPowerAuthHttpRequestInterceptor
PA2CustomHeaderRequestInterceptor
is nowPowerAuthCustomHeaderRequestInterceptor
PA2BasicHttpAuthenticationRequestInterceptor
is nowPowerAuthBasicHttpAuthenticationRequestInterceptor
PA2ClientSslValidationStrategy
protocol is nowPowerAuthClientSslValidationStrategy
PA2ClientSslNoValidationStrategy
is nowPowerAuthClientSslNoValidationStrategy
- Keychain
PA2Keychain
is nowPowerAuthKeychain
PA2KeychainItemAccess
enum is nowPowerAuthKeychainItemAccess
PA2BiometricAuthenticationInfo
structure is nowPowerAuthBiometricAuthenticationInfo
PA2BiometricAuthenticationStatus
enum is nowPowerAuthBiometricAuthenticationStatus
PA2BiometricAuthenticationType
enum is nowPowerAuthBiometricAuthenticationType
PA2KeychainStoreItemResult
enum is nowPowerAuthKeychainStoreItemResult
PA2Keychain_Initialized
constant is nowPowerAuthKeychain_Initialized
PA2Keychain_Status
constant is nowPowerAuthKeychain_Status
PA2Keychain_Possession
constant is nowPowerAuthKeychain_Possession
PA2Keychain_Biometry
constant is nowPowerAuthKeychain_Biometry
PA2Keychain_TokenStore
constant is nowPowerAuthKeychain_TokenStore
PA2KeychainKey_Possession
constant is nowPowerAuthKeychainKey_Possession
- Other interfaces
PA2WCSessionManager
is nowPowerAuthWCSessionManager
PA2OperationTask
protocol is nowPowerAuthOperationTask
PA2System
is nowPowerAuthSystem
PA2LogSetEnabled()
function is nowPowerAuthLogSetEnabled()
PA2LogIsEnabled()
function is nowPowerAuthLogIsEnabled()
PA2LogSetVerbose()
function is nowPowerAuthLogSetVerbose()
PA2LogIsVerbose()
function is nowPowerAuthLogIsVerbose()
- Interfaces moved to
PowerAuthCore
modulePA2Password
is nowPowerAuthCorePassword
PA2MutablePassword
is nowPowerAuthCoreMutablePassword
PA2ECIESEncryptor
is nowPowerAuthCoreEciesEncryptor
PA2ECIESCryptogram
is nowPowerAuthCoreEciesCryptogram
PA2ECIESMetaData
is nowPowerAuthCoreEciesMetaData
PA2ECIESEncryptorScope
enum is nowPowerAuthCoreEciesEncryptorScope
PA2CryptoUtils
is nowPowerAuthCoreCryptoUtils
PA2ECPublicKey
is nowPowerAuthCoreECPublicKey
Other changes
PowerAuthErrorCodes
contains new.invalidActivationCode
constant, 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
PowerAuth
prefix. All previously declaredPA2*
interfaces are now declared as deprecated.
List of renamed interfaces:
PA2ExtensionLibrary
is nowPowerAuthSystem
PA2ErrorDomain
constant is nowPowerAuthErrorDomain
(ourNSError
domain)PA2ErrorCode*
constants are now replaced byPowerAuthErrorCode
enum.- You can use
NSError.powerAuthErrorCode
to acquire a fully typed error code fromNSError
object.
- You can use
PA2ErrorInfoKey_AdditionalInfo
constant is nowPowerAuthErrorInfoKey_AdditionalInfo
(key toNSError.userInfo
dictionary)PA2ErrorInfoKey_ResponseData
constant is nowPowerAuthErrorInfoKey_ResponseData
(key toNSError.userInfo
dictionary)PA2KeychainConfiguration
is nowPowerAuthKeychainConfiguration
PA2Keychain
is 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
PowerAuth
prefix. All previously declaredPA2*
interfaces are now declared as deprecated.
List of renamed interfaces:
PA2ExtensionLibrary
is nowPowerAuthSystem
PA2WCSessionManager
is nowPowerAuthWCSessionManager
PA2ErrorDomain
constant is nowPowerAuthErrorDomain
(ourNSError
domain)PA2ErrorCode*
constants are now replaced byPowerAuthErrorCode
enum.- You can use
NSError.powerAuthErrorCode
to acquire a fully typed error code fromNSError
object.
- You can use
PA2ErrorInfoKey_AdditionalInfo
constant is nowPowerAuthErrorInfoKey_AdditionalInfo
(key toNSError.userInfo
dictionary)PA2ErrorInfoKey_ResponseData
constant is nowPowerAuthErrorInfoKey_ResponseData
(key toNSError.userInfo
dictionary)PA2KeychainConfiguration
is nowPowerAuthKeychainConfiguration
PA2Keychain
is 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 ./Build
Similar 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.