This repository has been archived by the owner on Jul 22, 2020. It is now read-only.
5.0.0
5.0.0
Added
- Added support for push action buttons
- Added a new SDK initialization method that takes
IterableConfig
object with configuration options - User ID/email is now decoupled from SDK initialization. It can be changed by calling
setEmail:
orsetUserId:
on theIterableAPI
instance. - Added automatic detection of APNS/APNS_SANDBOX, as long as both
pushIntegrationName
andsandboxPushIntegrationName
are set inIterableConfig
- The SDK now stores attribution data within 24 hours of opening the app from a push notififcation or from a Universal Link in an email
- Added two delegates:
IterableUrlDelegate
andIterableCustomActionDelegate
that can be used to customize URL and custom action handling for push notifications
Changed
- Old initialization methods (
sharedInstanceWithApiKey:
) are now deprecated - Old
registerToken
methods are now deprecated
Fixed
- Added safety checks for cases when email or userId is nil
Migration Notes
- Replace
[IterableAPI sharedInstanceWithApiKey:...]
with the following:
IterableConfig *config = [[IterableConfig alloc] init];
config.pushIntegrationName = "myPushIntegration_Prod";
config.sandboxPushIntegrationName = "myPushIntegration_Dev";
config.urlDelegate = self; // If you want to handle URLs coming from push notifications
[IterableAPI initializeWithApiKey:@"YOUR API KEY" launchOptions:launchOptions config:config];
- Since both pushIntegrationName and sandboxPushIntegrationName are now set in the configuration, call
[[IterableAPI sharedInstance] registerToken:token]
when registering the token, and it will choose the correct integration name automatically. [IterableAPI clearSharedInstance]
will do nothing if you initialize the SDK with the new initialization method. If you were previously calling[IterableAPI clearSharedInstance]
to reinitialize the API with a new user, just callsetEmail:
orsetUserId:
instead.- User email/userId is now persisted, so you'll only need to call
setEmail:
orsetUserId:
when the user logs in or logs out. - The SDK now tracks push opens automatically, as long as calls to
userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:
are passed to it. See README for instructions. Once it is set up, remove all direct calls totrackPushOpen:
.