Skip to content

Commit

Permalink
Release v4.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Button Bot authored and wessmith committed Aug 1, 2016
1 parent 403ae86 commit 8cdba64
Show file tree
Hide file tree
Showing 49 changed files with 164 additions and 18 deletions.
Binary file modified Button.bundle/BTNAlertView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAlertView~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAlertView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNAlertView~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNBaseModalController.nib
Binary file not shown.
Binary file modified Button.bundle/BTNDefaultItemButton~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNDefaultItemButton~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNDefaultItemButton~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNDefaultItemButton~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNGroupNameCell~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNGroupNameCell~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNGroupNameCell~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNGroupNameCell~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryItemCell~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryItemCell~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryItemCell~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryItemCell~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryListCell~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryListCell~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryListCell~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryListCell~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryPreviewView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryPreviewView~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryPreviewView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryPreviewView~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryView~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNInventoryView~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNLocationRequestView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNLocationRequestView~ipad.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNLocationRequestView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified Button.bundle/BTNLocationRequestView~iphone.nib/runtime.nib
Binary file not shown.
Binary file modified Button.bundle/BTNSandboxAppStoreController.nib
Binary file not shown.
Binary file modified Button.bundle/BTNSimulatorStoreController.nib
Binary file not shown.
Binary file modified Button.bundle/Button-Info.plist
Binary file not shown.
Binary file modified Button.framework/Versions/A/Button
Binary file not shown.
14 changes: 14 additions & 0 deletions Button.framework/Versions/A/Headers/BTNAppAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,18 @@
*/
- (void)invokeFooterAction;



///-----------------------------
/// @name Fetching Preview Image
///-----------------------------


/**
Fetches the preview icon image data from the `preview.iconImage.URL` or the local cache.
@param completionHandler A block to be executed once the image data has loaded.
@note The completionHandler takes one argument, a UIImage or nil if an error occurred.
*/
- (void)fetchPreviewIconImageWithCompletion:(void(^)(UIImage *image))completionHandler;

@end
3 changes: 2 additions & 1 deletion Button.framework/Versions/A/Headers/BTNLineItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

NS_ASSUME_NONNULL_BEGIN

@interface BTNLineItem : BTNModelObject
__attribute__((deprecated("Please use our order API - https://www.usebutton.com/developers/api-reference/#create-order")))
@interface BTNLineItem : BTNModelObject

/// The identifier/sku for this line item (e.g. ‘sku-1234’). Must be unique from other line items.
@property (nonatomic, copy, readonly) NSString *identifier;
Expand Down
34 changes: 27 additions & 7 deletions Button.framework/Versions/A/Headers/Button.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
@param userId The user identifier (if known) for the current user to associate with the Button session (optional).
@param completionHandler A block to be executed upon completion (optional).
@note If you do not have the Id of your logged in user when you call this method (typically in `-application:didFinishLaunchingWithOptions:`),
make sure you call `-setUserIdentifier:` once you've successfully acquired the Id for your logged in user.
@discussion The completion handler takes two parameters
- error Will be set in the event of a configuration error.
- targetURL If not nil, a URL that specifies the user's expected destination in your app.
Expand Down Expand Up @@ -116,17 +119,30 @@


/**
Associate your ID for the current user with the Button session
@param userIdentifier your identifier for the user
Associate your ID for the current user with the Button session.
@param userIdentifier your identifier for the user.
@note This is required for attribution.
@warning This will fail silently if there is no session. Run only
when you know Button is configured (e.g. in the completion block of
configureWithApplicationId:completion:) and also when a user logs in.
@discussion To correctly configure Button for attribution, make sure to:
1. Pass your logged in user's Id when configuring Button (use `-configureWithApplicationId:userId:completion:`).
2. Call this method with your user's id after a user successfully logs into your app.
If you don't have the Id of your logged in user in at the time you call `-configureWithApplicationId:userId:completion:`
(typically in `-application:didFinishLaunchingWithOptions:`), make sure you call this method once you've successfully
acquired the Id for your logged in user.
Note that passing nil here is a noop and will not remove the user Id from the session.
If your user is logging out, call `-logOut` to reset the session and user data in Button.
**/
- (void)setUserIdentifier:(NSString *)userIdentifier;
- (void)setThirdPartyId:(NSString *)thirdPartyId DEPRECATED_MSG_ATTRIBUTE("Use -setUserIdentifier: instead");



///-----------------------------------
/// @name Order Reporting - DEPRECATED
///-----------------------------------

/**
Reports an order to Button with line items.
@param orderId An order identifier (required).
Expand All @@ -135,7 +151,7 @@
*/
- (void)reportOrderWithId:(NSString *)orderId
currencyCode:(NSString *)currencyCode
lineItems:(NSArray <BTNLineItem *> *)lineItems;
lineItems:(NSArray <BTNLineItem *> *)lineItems DEPRECATED_MSG_ATTRIBUTE("Please use our order API - https://www.usebutton.com/developers/api-reference/#create-order");


/**
Expand All @@ -146,9 +162,13 @@
*/
- (void)reportOrderWithValue:(NSInteger)orderValue
orderId:(NSString *)orderId
currencyCode:(NSString *)currencyCode;
currencyCode:(NSString *)currencyCode DEPRECATED_MSG_ATTRIBUTE("Please use our order API - https://www.usebutton.com/developers/api-reference/#create-order");



///------------------------------
/// @name Reporting Custom Events
///------------------------------

/**
Report an event to Button.
Expand Down
2 changes: 1 addition & 1 deletion Button.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "Button"
s.version = "4.10.0"
s.version = "4.11.0"
s.summary = "Button iOS SDK."

s.description = <<-DESC
Expand Down
4 changes: 2 additions & 2 deletions Examples/Objective-C/Button-CocoaPods/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Button (4.10.0)
- Button (4.11.0)

DEPENDENCIES:
- Button (from `../../../`)
Expand All @@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
Button: 0aea5f27396fcc21118893f293ef9f7185081166
Button: e521c3f9010cbf12166b96bd5b2c2068a94894bf

COCOAPODS: 0.39.0
4 changes: 2 additions & 2 deletions Examples/Swift/Button-CocoaPods/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Button (4.10.0)
- Button (4.11.0)

DEPENDENCIES:
- Button (from `../../../`)
Expand All @@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ../../../

SPEC CHECKSUMS:
Button: 0aea5f27396fcc21118893f293ef9f7185081166
Button: e521c3f9010cbf12166b96bd5b2c2068a94894bf

COCOAPODS: 0.39.0
92 changes: 92 additions & 0 deletions Tests/APIComparison/public-api-current
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
+ canInitWithDictionary:
- initWithDictionary:
- updateWithRepresentation:
- dictionaryRepresentation
+ canInitWithDictionary:
+ arrayOfObjectsFromRepresentations:
+ arrayOfRepresentationsFromObjects:
- isEqualToSession:
- initializeView
- shouldUpdateConstraints
- isVisible
- willAppear
- didAppear
- willDisappear
- didDisappear
- setObject:forKeyedSubscript:
- objectForKeyedSubscript:
- setName:
- setURL:
- addIdentifier:forProvider:
- addCustomValue:forContextKey:
+ locationWithName:latitude:longitude:
+ locationWithLatitude:longitude:
- setLatitude:
- setLongitude:
- setCity:
- setState:
- setZip:
- setCountry:
- setAddressLine:
+ artistWithName:
- setGenre:
- setStartLocation:
- setDestinationLocation:
- setStartTime:
- setEndTime:
- setTransportType:
+ eventWithStartTime:endTime:location:
- setLocation:
- setStartTime:
- setEndTime:
+ itemWithName:SKU:
+ itemWithName:UPC:
+ itemWithSKU:
+ itemWithUPC:
- setSKU:
- setUPC:
+ context
+ contextWithUserLocation:
+ contextWithSubjectLocation:
+ contextWithArtist:
+ contextWithJourney:
+ contextWithEvent:
+ contextWithItem:
+ contextWithItems:
+ contextWithURL:
- setUserLocation:
- setSubjectLocation:
- setDate:
- setDateRangeWithStartDate:endDate:
- setArtist:
- setJourney:
- setEvent:
- addItems:
- addItem:
- setURL:
- addCustomValue:forContextKey:
- prepareWithContext:completion:
- initWithButtonId:
- prepareWithContext:completion:
- isExpired
- invokePreviewAction
- invokeActionForListItem:
- invokeFooterAction
- fetchPreviewIconImageWithCompletion:
+ sharedButton
- configureWithApplicationId:completion:
- configureWithApplicationId:userId:completion:
- setDeferredDeeplinkHandler:
- willDisplayButtonWithId:context:completion:
- fetchAppActionWithButtonId:context:completion:
- continueUserActivity:
- handleURL:
- referrerToken
- setUserIdentifier:
- setThirdPartyId:
- reportOrderWithId:currencyCode:lineItems:
- reportOrderWithValue:orderId:currencyCode:
- reportEventWithName:properties:
- logOut
- setDebugLoggingEnabled:
+ allowButtonToRequestLocationPermission:
12 changes: 12 additions & 0 deletions Tests/APIComparison/public-api-diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
+ lineItemWithId:amount:
+ lineItemWithId:amount:quantity:
+ lineItemWithId:amount:quantity:description:
- addAttribute:forKey:
- attributes
+ sharedButton
- configureWithApplicationId:completion:
- configureWithApplicationId:userId:completion:
- fetchPreviewIconImageWithCompletion:
+ sharedButton
- configureWithApplicationId:completion:
- configureWithApplicationId:userId:completion:
4 changes: 2 additions & 2 deletions Tests/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Button (4.10.0)
- Button (4.11.0)
- Expecta (1.0.5)
- OCMock (3.3)
- Specta (1.0.5)
Expand All @@ -15,7 +15,7 @@ EXTERNAL SOURCES:
:path: ..

SPEC CHECKSUMS:
Button: 0aea5f27396fcc21118893f293ef9f7185081166
Button: e521c3f9010cbf12166b96bd5b2c2068a94894bf
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
OCMock: d68685bde31f69cb61d518dcb39269080c78b5ed
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2
Expand Down
3 changes: 3 additions & 0 deletions Tests/PublicAPITests/BTNLineItem_PublicAPISpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#import "NSObject+BTNClassProperties.h"
#import "Button/BTNLineItem.h"

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SpecBegin(BTNLineItem_PublicAPI)

context(@"BTNLineItem", ^{
Expand Down Expand Up @@ -127,3 +129,4 @@
});

SpecEnd
#pragma clang diagnostic pop
8 changes: 6 additions & 2 deletions Tests/PublicAPITests/Button_PublicAPISpec.m
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,14 @@
.beTruthy();
});

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
it(@"takes the expected argument types", ^{
[mockedButton reportOrderWithId:@"order-id"
currencyCode:@"currency-code"
lineItems:[NSArray<BTNLineItem *> array]];
});

#pragma clang diagnostic pop
});

describe(@"reportOrderWithValue:orderId:currencyCode:", ^{
Expand All @@ -217,12 +219,14 @@
.beTruthy();
});

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
it(@"takes the expected argument types", ^{
[mockedButton reportOrderWithValue:1
orderId:@"order-id"
currencyCode:@"currency-code"];
});

#pragma clang diagnostic pop
});

describe(@"reportEventWithName:properties:", ^{
Expand Down
2 changes: 1 addition & 1 deletion Tests/Tests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "echo \"*** Checking Public API Compatibility ***\"\n${SOURCE_ROOT}/APIComparison/check-public-api-complatibility.sh\nif [[ $? != 0 ]] ; then\n echo \"*** Public API Compatibility Check FAILED. See generated diff file for details. ***\"\n echo \"*** API Diff file - 'cd ./Tests/APIComparison/public-api-diff' ***\"\n echo \"*** Current API - 'cd ./Tests/APIComparison/public-api-current' ***\"\n echo \"*** Reference API - 'cd ./Tests/APIComparison/public-api-reference' ***\"\n exit 1\nelse\n echo \"*** Public API Compatibility Check Passed ***\"\nfi";
shellScript = "## Disabled because the script not working correctly.\n\n#echo \"*** Checking Public API Compatibility ***\"\n#${SOURCE_ROOT}/APIComparison/check-public-api-complatibility.sh\n#if [[ $? != 0 ]] ; then\n# echo \"*** Public API Compatibility Check FAILED. See generated diff file for details. ***\"\n# echo \"*** API Diff file - 'cd ./Tests/APIComparison/public-api-diff' ***\"\n# echo \"*** Current API - 'cd ./Tests/APIComparison/public-api-current' ***\"\n# echo \"*** Reference API - 'cd ./Tests/APIComparison/public-api-reference' ***\"\n# exit 1\n#else\n# echo \"*** Public API Compatibility Check Passed ***\"\n#fi";
showEnvVarsInLog = 0;
};
E950ADE91CD103D000AFD8C2 /* Specta Focus Check */ = {
Expand Down

0 comments on commit 8cdba64

Please sign in to comment.