-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Wes Smith
committed
Feb 19, 2016
1 parent
026fe68
commit 1577674
Showing
54 changed files
with
427 additions
and
6 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-6 Bytes
(100%)
Button.bundle/BTNDefaultItemButton~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Button.bundle/BTNDefaultItemButton~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
Button.bundle/BTNInventoryItemCell~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+8 Bytes
(100%)
Button.bundle/BTNInventoryItemCell~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Button.bundle/BTNInventoryListCell~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Button.bundle/BTNInventoryListCell~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
Button.bundle/BTNInventoryPreviewView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
Button.bundle/BTNInventoryPreviewView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified
BIN
-3 Bytes
(100%)
Button.bundle/BTNInventoryPreviewView~iphone.nib/runtime.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-6 Bytes
(100%)
Button.bundle/BTNLocationRequestView~ipad.nib/objects-8.0+.nib
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-7 Bytes
(100%)
Button.bundle/BTNLocationRequestView~iphone.nib/objects-8.0+.nib
Binary file not shown.
Binary file modified
BIN
+2 Bytes
(100%)
Button.bundle/BTNLocationRequestView~iphone.nib/runtime.nib
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Copyright (c) 2014–2016 Button, Inc. (https://usebutton.com/) | ||
|
||
Privately Licensed. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
|
||
Acknowledgments | ||
Portions of this Button Software may utilize the following copyrighted material, the use of which is hereby acknowledged. | ||
|
||
## AFNetworking | ||
|
||
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Copyright (c) 2014–2016 Button, Inc. (https://usebutton.com/) | ||
|
||
Privately Licensed. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. | ||
|
||
|
||
Acknowledgments | ||
Portions of this Button Software may utilize the following copyrighted material, the use of which is hereby acknowledged. | ||
|
||
## AFNetworking | ||
|
||
Copyright (c) 2011–2016 Alamofire Software Foundation (http://alamofire.org/) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#import "BTNModelObject.h" | ||
#import "BTNAppActionMeta.h" | ||
#import "BTNPreview.h" | ||
#import "BTNHeader.h" | ||
#import "BTNGroup.h" | ||
#import "BTNProduct.h" | ||
#import "BTNFooter.h" | ||
|
||
/** | ||
An App Action representations a button (i.e. “preview”) and inventory typically rendered as a “commerce card”. | ||
*/ | ||
@interface BTNAppAction : BTNModelObject | ||
|
||
/// App action metadata (id, source token, expiry, etc). | ||
@property (nonatomic, copy, readonly) BTNAppActionMeta *meta; | ||
|
||
|
||
/// The button preview data. | ||
@property (nonatomic, copy, readonly) BTNPreview *preview; | ||
|
||
|
||
/// Heading information for the inventory. | ||
@property (nonatomic, strong, readonly) BTNHeader *header; | ||
|
||
|
||
/// Grouped inventory (note: one of `groups` or `product` will be non-nil). | ||
@property (nonatomic, strong, readonly) NSArray <BTNGroup *> *groups; | ||
|
||
|
||
/// A single product representation (note: one of `groups` or `product` will be non-nil). | ||
@property (nonatomic, strong, readonly) BTNProduct *product; | ||
|
||
|
||
/// Footer information for the inventory and default action. | ||
@property (nonatomic, strong, readonly) BTNFooter *footer; | ||
|
||
|
||
|
||
///----------------------- | ||
/// @name Invoking Actions | ||
///----------------------- | ||
|
||
|
||
/** | ||
Invokes the Button commerce card flow or a preview action if one exists. | ||
@discussion For integrations that only customize the button preview, call | ||
this method when a user taps your custom button preview. | ||
@see @c -invokeActionForListItem: If you've built out your own custom inventory UI. | ||
@note Users will be sent to the destination application or through the | ||
Attended Install flow if the destination application is not installed. | ||
*/ | ||
- (void)invokePreviewAction; | ||
|
||
|
||
/** | ||
Invokes the action of a specific inventory list item. | ||
@discussion If you've built out your own custom inventory UI, call this | ||
method when a user taps a specific inventory item. | ||
@note Users will be sent to the destination application or through the | ||
Attended Install flow if the destination application is not installed. | ||
*/ | ||
- (void)invokeActionForListItem:(BTNListItem *)listItem; | ||
|
||
|
||
/** | ||
Invokes the footer action (i.e. default action). | ||
@discussion If your custom inventory UI includes BTNFooter data, call this | ||
method when you user taps on your custom footer view. | ||
@note Users will be sent to the destination application or through the | ||
Attended Install flow if the destination application is not installed. | ||
*/ | ||
- (void)invokeFooterAction; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#import "BTNModelObject.h" | ||
|
||
/** | ||
App action metadata objects contain information about the referrer, | ||
destination app, and expiration of an app action. | ||
*/ | ||
@interface BTNAppActionMeta : BTNModelObject | ||
|
||
/// The app action identifier. | ||
@property (nonatomic, copy, readonly) NSString *appActionId; | ||
|
||
|
||
/// The store id of the app represented by an app action. | ||
@property (nonatomic, copy, readonly) NSString *storeId; | ||
|
||
|
||
/// The source/referrer token associated with an app action. | ||
@property (nonatomic, copy, readonly) NSString *sourceToken; | ||
|
||
|
||
/// The maximum age in seconds an app action is valid. | ||
@property (nonatomic, copy, readonly) NSNumber *maxAgeSeconds; | ||
|
||
|
||
/// The deep link scheme for enabling attended install. | ||
@property (nonatomic, copy, readonly) NSURL *deepLinkScheme; | ||
|
||
|
||
/** | ||
Indicated whether or not the action has expired. | ||
@return YES is the action is expired, otherwise NO. | ||
*/ | ||
- (BOOL)isExpired; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#import "BTNModelObject.h" | ||
@import UIKit; | ||
|
||
/** | ||
BTNBackground objects specify how to fill a background. | ||
*/ | ||
@interface BTNBackground : BTNModelObject | ||
|
||
@property (nonatomic, copy, readonly) NSString *color; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#import "BTNModelObject.h" | ||
#import "BTNBackground.h" | ||
#import "BTNImage.h" | ||
#import "BTNText.h" | ||
|
||
/** | ||
BTNFooter objects specify footer information about inventory and a default action that may be executed. | ||
*/ | ||
@interface BTNFooter : BTNModelObject | ||
|
||
/// The footer text. | ||
@property (nonatomic, copy, readonly) BTNText *labelText; | ||
|
||
|
||
/// An icon image. | ||
@property (nonatomic, copy, readonly) BTNImage *iconImage; | ||
|
||
|
||
/// The footer background. | ||
@property (nonatomic, copy, readonly) BTNBackground *background; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#import "BTNModelObject.h" | ||
#import "BTNListItem.h" | ||
#import "BTNText.h" | ||
|
||
/** | ||
BTNGroup objects specify information for rendering an inventory group. | ||
*/ | ||
@interface BTNGroup : BTNModelObject | ||
|
||
/// The title of the group. | ||
@property (nonatomic, copy, readonly) BTNText *titleText; | ||
|
||
/// An array of items in the group. | ||
@property (nonatomic, copy, readonly) NSArray <BTNListItem *> *items; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#import "BTNModelObject.h" | ||
#import "BTNBackground.h" | ||
#import "BTNText.h" | ||
|
||
/** | ||
BTNHeader objects specify heading information about inventory. | ||
*/ | ||
@interface BTNHeader : BTNModelObject | ||
|
||
/// The main heading text. | ||
@property (nonatomic, copy, readonly) BTNText *titleText; | ||
|
||
|
||
/// An optional smaller subheading text. | ||
@property (nonatomic, copy, readonly) BTNText *subtitleText; | ||
|
||
|
||
/// The header background. | ||
@property (nonatomic, copy, readonly) BTNBackground *background; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#import "BTNModelObject.h" | ||
#import "BTNText.h" | ||
@import UIKit; | ||
|
||
/** | ||
BTNImage objects represent an image and how it should be rendered. | ||
*/ | ||
@interface BTNImage : BTNModelObject | ||
|
||
/// The URL of an image to be retrieved. | ||
@property (nonatomic, copy, readonly) NSURL *URL; | ||
|
||
|
||
/// The fill mode of an image (aspect fit or aspect fill). | ||
@property (nonatomic, assign, readonly) UIViewContentMode fillMode; | ||
|
||
|
||
/// Alternative text for the image. | ||
@property (nonatomic, copy, readonly) BTNText *altText; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#import "BTNModelObject.h" | ||
#import "BTNText.h" | ||
#import "BTNImage.h" | ||
|
||
/** | ||
BTNListItem objects specify information for rendering an inventory item. | ||
*/ | ||
@interface BTNListItem : BTNModelObject | ||
|
||
/// The line item main text of the item. | ||
@property (nonatomic, copy, readonly) BTNText *titleText; | ||
|
||
|
||
/// Secondary text for the item. | ||
@property (nonatomic, copy, readonly) BTNText *subtitleText; | ||
|
||
|
||
/// Text to be rendered at the icon position (e.g. right aligned). | ||
@property (nonatomic, copy, readonly) BTNText *iconText; | ||
|
||
|
||
/// A small preview icon representing the item. | ||
@property (nonatomic, copy, readonly) BTNImage *iconImage; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#import "BTNModelObject.h" | ||
#import "BTNBackground.h" | ||
#import "BTNImage.h" | ||
#import "BTNText.h" | ||
|
||
/** | ||
This class represents the data for rendering a button “preview”. | ||
BTNPreview objects specify information about how a button should appear and behave. | ||
*/ | ||
@interface BTNPreview : BTNModelObject | ||
|
||
/// The button text. | ||
@property (nonatomic, copy, readonly) BTNText *labelText; | ||
|
||
|
||
/// The background fill details of the button. | ||
@property (nonatomic, copy, readonly) BTNBackground *background; | ||
|
||
|
||
/// An icon image to be renderd on the button. | ||
@property (nonatomic, copy, readonly) BTNImage *iconImage; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#import "BTNModelObject.h" | ||
#import "BTNBackground.h" | ||
#import "BTNImage.h" | ||
#import "BTNText.h" | ||
|
||
/** | ||
BTNProduct objects specify information about rendering a single product. | ||
*/ | ||
@interface BTNProduct : BTNModelObject | ||
|
||
/// The card background. | ||
@property (nonatomic, copy, readonly) BTNBackground *background; | ||
|
||
|
||
/// An array of product images. | ||
@property (nonatomic, copy, readonly) NSArray <BTNImage *> *images; | ||
|
||
|
||
/// The main title text. | ||
@property (nonatomic, copy, readonly) BTNText *titleText; | ||
|
||
|
||
/// Secondary text representing the item. | ||
@property (nonatomic, copy, readonly) BTNText *subtitleText; | ||
|
||
|
||
/// A potentially multi-line description text. | ||
@property (nonatomic, copy, readonly) BTNText *descriptionText; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#import "BTNModelObject.h" | ||
@import UIKit; | ||
|
||
/** | ||
BTNText represent text and how it should be rendered. | ||
*/ | ||
@interface BTNText : BTNModelObject | ||
|
||
/// A string of text. | ||
@property (nonatomic, copy, readonly) NSString *text; | ||
|
||
|
||
/// The color for rendering the associated `text'. | ||
@property (nonatomic, copy, readonly) NSString *color; | ||
|
||
@end |
Oops, something went wrong.