Sample Tasks for Migration
Below are two sample tasks to enter in your issue tracker for migrating the Alchemer Mobile iOS SDK.
Update the Alchemer Mobile Dependency to Version 6
Acceptance Criteria:
- Remove dependency for previous version(s) of the Alchemer Mobile iOS SDK
- Add dependency for the ApptentiveKit iOS SDK
- Update import statements from
import Apptentivetoimport ApptentiveKit
Update from Deprecated Methods in the ApptentiveKit iOS SDK
For most customers, very few of these will need to be removed/updated. The simplest approach is likely to build your project and fix any deprecation warnings that result.
Acceptance Criteria:
Change references to newly-updated methods/properties
- Update from the
register(with:)static method (that takes anApptentiveConfigurationargument) to theregister(with:competion:)instance method (that takes anApptentive.AppCredentialsargument) - Update from
engage(_:fromViewController:)toengage(event:from:) - Update from
engage(_:fromViewController:completion:)toengage(event:from:completion:)(note that the completion handler’s argument’s type is nowResult<Bool, Error>) - Update the completion handler in calls to
presentMessageCenter(from:completion:)to acccept a parameter of typeResult<Bool, Error> - (For Swift files) Update from
addCustomPersonData(_:withKey:)andremoveCustomPersonData(withKey:) to subscriptingpersonCustomData` - Update code that accesses the
logLevelproperty to set thelogLevelon theApptentiveLoggerobject or one of it’s static properties
Change references to newly-updated methods/properties
- Update from the
register(with:)static method (that takes anApptentiveConfigurationargument) to theregister(with:competion:)instance method (that takes anApptentive.AppCredentialsargument) - Update from
engage(_:fromViewController:)toengage(event:from:) - Update from
engage(_:fromViewController:completion:)toengage(event:from:completion:)(note that the completion handler’s argument’s type is nowResult<Bool, Error>) - Update the completion handler in calls to
presentMessageCenter(from:completion:)to acccept a parameter of typeResult<Bool, Error> - (For Swift files) Update from
addCustomPersonData(_:withKey:)andremoveCustomPersonData(withKey:) to subscriptingpersonCustomData` - Update code that accesses the
logLevelproperty to set thelogLevelon theApptentiveLoggerobject or one of it’s static properties
Change any remaining references to previously-updated properties
- Update references to the
mParticleIdproperty tomParticleID - Update references to the
Apptentive.sharedConnectionstatic property toApptentive.shared
Remove references to currently unavailable methods/properties
- Remove or comment out calls to `queryCanShowInteraction(forEvent:completion:) (this feature is currently not supported)
- Remove or comment out calls to `queryCanShowMessageCenter(completion:) (this feature is currently not supported)
- Remove or comment out calls to
dismissMessageCenter(animated:completion:)(this feature is currently not supported) - Remove or comment out calls to
openAppStore()(this feature is currently not supported) - Remove or comment out code that calls
logIn(withToken:completion:),logOut(), orupdateToken(_:completion:)or accesses theauthenticationFailureCallbackproperty (customer authentication is currently not supported) - Remove or comment out calls to
setPushProvider(_:),didReceiveRemoteNotification(_:fetchCompletionHandler:),didReceiveLocalNotification(_:from:),didReceiveUserNotificationResponse(_:from:withCompletionHandler:), andwillPresent(_:withCompletionHandler:)(Push notification support will be restored in an upcoming release) - Remove or comment out calls to
dismissAllInteractions(animated:)(This feature will be restored in an upcoming release)
Remove references to removed methods/properties
- Remove the custom data argument from calls to
engage(_:withCustomData:fromViewController:)(custom event data is currently not supported) - Remove the extended and custom data arguments from calls to
engage(_:withCustomData:withExendedData:fromViewController:), along with calls to methods that construct extended event data - Remove code that accesses the
advertisingIdentifierproperty (specific support for the advertising ID has been removed, but you can use custom person data instead) - Remove code that accesses the
appIDproperty (App Store ratings now exclusively use theSKStoreReviewControllerclass, which doesn’t require the app ID) - Remove code that accesses the
showInfoButtonproperty (the info button is no longer present) - Remove code that accesses the
surveyTermsAndConditionsproperty (Survey terms and conditions are now configured in the dashboard) - Remove code that reads the
apptentiveKeyorapptentiveSignatureproperties - Remove code that accesses the
styleSheetproperty - Remove code that calls the
checkSDKConfiguration()method
Update code that set properties on ApptentiveConfiguration
apptentiveKeyandapptentiveSignatureare now passed when constructing theApptentive.AppCredentialsobject passed to theregister(with:completion:)instance method- The
logLevelproperty has moved to theApptentiveLoggerobject - Log messages are automatically sanitized when a debugger is not attached to the app
- The
baseURLcan be set using the designated initializer for theApptentiveobject (note that this prohibits using thesharedinstance ofApptentive) - The
distributionNameanddistributionVersionare now set on theenvironmentproperty of theApptentiveobject - The
appIDproperty is no longer supported (see above) - The
showInfoButtonproperty is no longer supported (see above) - The
surveyTermsAndConditionsproperty is no longer supported (see above)