If you want to upgrade you sdk to the lastest, please check the following points:
The latest version is v5.0.34
, you can upgrade sdk by CocoaPods and Carthage.
For example:
if you use CocoaPods, please make sure you pod repo contains v5.0.34
, you can use pod search AffirmSDK
to check it. Otherwise, you should update pod repo before upgrade.
If you already use specific sdk version in Podfile, please modify the line related to affirmSDK as follows:
pod 'AffirmSDK', '~> 5.0.34'
Otherwise, just use pod update AffirmSDK
in terminal to update AffirmSDK.
-
AffirmConfiguration
can be setup with simplified method. Current implementation is as follows:[[AffirmConfiguration sharedInstance] configureWithPublicKey:@"PUBLIC_API_KEY" environment:AffirmEnvironmentSandbox];
AffirmConfiguration *config = [AffirmConfiguration configurationWithPublicAPIKey:@"PUBLIC_API_KEY" environment:AffirmEnvironmentSandbox];[AffirmConfiguration setSharedConfiguration:config]; -
was deprecated, no need to pass this paramter when start checkout. Activity indicator was built into the webview controller, automatically show/hidden according to the loading progress. Current implementation is as follows:AffirmCheckoutType
AffirmCheckoutViewController *checkoutVC = [AffirmCheckoutViewController startCheckout:checkout delegate:self];
AffirmCheckoutViewController *checkoutVC = [AffirmCheckoutViewController startCheckout:checkout checkoutType:AffirmCheckoutTypeAutomatic useVCN:NO delegate:self]; -
was deprecated. Developer can handle callback flexibly when checkout creation was failed.AffirmErrorModal
- (void)checkout:(AffirmCheckoutViewController *)checkoutViewController didFailWithError:(NSError *)error;
- (void)checkout:(AffirmCheckoutViewController *)checkoutVC creationFailedWithError:(NSError *)error
-
is modified toAffirmAsLowAsButton
AffirmPromotionalButton
. Current implementation is as follows:AffirmPromotionalButton *button = [[AffirmPromotionalButton alloc] initWithPromoID:@"promoID" showCTA:showCTA presentingViewController:viewController frame:frame];
AffirmPromotionalButton
now suppports Interface builder.presentingViewController
must implementAffirmPrequalDelegate
. -
was deprecated. Promotional information is modified fromAffirmAsLowAsData
AffirmPromoRequest
, the processing of attribute text is encapsulated inAffirmPromotionalButton
. -
AffirmPrequalDelegate
provides a callback when prequalify flow fails. -
was renamed tototalAmount
payoutAmount
andwas renamed tototal
totalAmount
inAffirmCheckout
Class.
Rebuild you project, if there is no compile error and AffirmSDK work as you expected. Congratulations! you can ship it now.