This part is required only if you already have the Appsfire iOS SDK implemented in your app(s).

A lot of changes and optimizations occurred between 1.1.5 and 2.0.

Overall, you don't have to rethink the way you implemented our library, however please find below the major points you'll have to review for a smooth upgrade.

Class name changed

The main class name was changed from "AFAppBoosterSDK" to "AppsfireSDK". It is therefore safe to do a "Replace All" from the old name to the new name.

ARC now fully supported

ARC (Automatic Reference Counting) is now fully supported. You need to remove any compilation flag that was previously preventing ARC processing.

Two more frameworks

Please add "AdSupport" and "StoreKit" frameworks into your project.

Deprecated methods

A lot of methods were deprecated. Some because of improvements, others for homogeneity reasons. Please find below the list and how you can handle each case in your app.

  • Methods which will be removed:

    • +abortInitialization We removed this method. If you need at some point to stop activity, please take a look at the +pause method.
    • +openUDID OpenUDID was deprecated with iOS 6. Furthermore, OpenUDID no longer works as initially designed with iOS 7. We are still returning an ID in SDK 2.0, but we'll completely suppress it in a future iteration.
    • +useFullScreenStyle: You can specify the kind of display in the presentation method (see below).

  • Renamed methods:

    • +closeNotifications was renamed +dismissPanel
    • +setApplicationDelegate: was renamed +setDelegate:
    • +useCustomValues: was renamed +setCustomKeysValues:

  • Methods that were merged / updated:

    • +presentNotifications / +presentFeedback you should use the +presentPanelForContent:withStyle: method instead.
    • +useGradients: We updated our panel to the newer iOS 7 look. We do not use gradients anymore. Please take a look at +setBackgroundColor:textColor: method instead!

Two examples:
If you want to replace the way to display notifications:

// old way
// [AFAppBoosterSDK presentNotifications];

// new way
[AppsfireSDK presentPanelForContent:AFSDKPanelContentDefault withStyle:AFSDKPanelStyleDefault];

If you want to customize colors (careful, don't purely copy/paste the gradient colors into background/text colors as parameters have a different meaning in 2.0):

// old way
// [AFAppBoosterSDK useGradients:@[[UIColor colorWithRed:.1137 green:.2274 blue:.7764 alpha:1.0], [UIColor colorWithRed:.2196 green:.3411 blue:.9333 alpha:1.0]]];

// new way
[AppsfireSDK setBackgroundColor:[UIColor colorWithRed:66.0/255.0 green:67.0/255.0 blue:69.0/255.0 alpha:1.0] textColor:[UIColor whiteColor]];

Notification Names

In an attempt to harmonize the code, we renamed most of our notification names. And now you can use a static variable to be sure it's correctly spelled! You can find the list in "AppsfireSDKConstants.h".

Old representation New representation
@"AFSDKisInitializing" kAFSDKIsInitializing
@"AFSDKisInitialized" kAFSDKIsInitialized
@"AFNotificationNotificationsCounterNeedsUpdate" kAFSDKNotificationsNumberChanged
@"AFSDKdictionaryUpdated" kAFSDKDictionaryUpdated
@"AFNotificationsHaveBeenLoaded" kAFSDKPanelWasPresented
@"AFNotificationsHaveBeenUnLoaded" kAFSDKPanelWasDismissed

If you encounter any problem you can't solve, don't hesitate to contact us (see "Support Considerations" section).