Skip to content

Commit 97dd280

Browse files
committed
Updated SnapteeSDK to 1.1.6, deprecated fileType
1 parent c0b6bd5 commit 97dd280

4 files changed

Lines changed: 23 additions & 20 deletions

File tree

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@ iOS Snaptee SDK example project
55
## iPhone version
66

77
1. Design T-shirt with the image from your app
8-
8+
99
![](screenshots/iphone01.PNG)
1010

1111
2. Different color and clothing are available to choose
12-
12+
1313
![](screenshots/iphone02.PNG)
1414

1515
3. Order the T-shirt directly in the app
16-
16+
1717
![](screenshots/iphone03.PNG)
1818

1919
4. Support Credit Card, Paypal and Alipay (Chinese users)
20-
20+
2121
![](screenshots/iphone06.PNG)
2222

2323
## iPad version
2424

2525
1. Design T-shirt with the image from your app
2626
![](screenshots/ipad02.png)
27-
27+
2828
2. Different color and clothing are available to choose
2929
![](screenshots/ipad03.png)
30-
30+
3131
3. Order the T-shirt directly in the app
3232
![](screenshots/ipad04.png)
33-
33+
3434
4. Support Credit Card, Paypal and Alipay (Chinese users)
3535
![](screenshots/ipad05.png)
3636

@@ -93,7 +93,7 @@ Please download the latest version from https://github.com/snaptee/SnapteeSDK-iO
9393
@interface ViewController : UIViewController <STViewControllerDelegate>
9494
@end
9595
```
96-
96+
9797
- Initialize Snaptee View Controller
9898

9999
```objc
@@ -103,24 +103,22 @@ Please download the latest version from https://github.com/snaptee/SnapteeSDK-iO
103103
app_name: Optional. Will be shown in the action sheet when leaving Snaptee e.g. "Back to app_name"
104104
language: Optional. force SDK to display in a specific language (STLanguageDefault means to use device's language setting)
105105
*/
106-
106+
107107
[STAffiliateManager instance].affiliateId = @"sdk-demo";
108108
[STAffiliateManager instance].appName = @"Snaptee SDK Example"; // Optional
109109
[STAffiliateManager instance].language = STLanguageDefault; // Optional
110-
110+
111111
/*
112112
image: UIImage passing to Snaptee
113-
file type: PNG or JPG
114113
caption: Optional. Description of the image. Typically entered by users
115114
*/
116115
STViewController * stViewController = [[STViewController alloc] initWithImage:[UIImage imageNamed:@"sample2.jpg"]
117-
fileType:STImageFileTypeJPG
118116
caption:@"Funny bear!"];
119117
[stViewController setST_delegate:self];
120118
[stViewController setModalPresentationStyle:UIModalPresentationFormSheet];
121-
119+
122120
[self presentViewController:stViewController animated:YES completion:nil];
123-
121+
124122
```
125123
- Include the following delegate function to dismiss
126124
@@ -179,13 +177,13 @@ You may also open the example code to compare the plist file with your owns if y
179177

180178
It is recommended to use this graphic or text "Make a T-shirt" to start the T-shirt design flow
181179

182-
![](materials/Create-Tshirt@2x.png)
180+
![](materials/Create-Tshirt@2x.png)
183181

184182
## To test:
185183

186184
- check out with coupon code when using development ID
187185
- coupon code: st_sandbox
188-
186+
189187
## Dashboard:
190188

191189
The following website is the dashboard of the program. You may find statistics inside there.

SnapteeSDKExample/Frameworks/Snaptee/include/SnapteeSDKLibrary/STViewController.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,19 @@ typedef enum {
3333
caption: Optional. Description of the image. Typically entered by users
3434
*/
3535

36+
- (id)initWithImage:(UIImage *)image;
37+
3638
- (id)initWithImage:(UIImage*)image
37-
fileType:(STImageFileType) fileType;
39+
caption:(NSString*) caption;
40+
3841

42+
#pragma mark - Deprecated Methods
43+
44+
- (id)initWithImage:(UIImage *)image
45+
fileType:(STImageFileType)fileType DEPRECATED_MSG_ATTRIBUTE("Use `initWithImage:` instead.");
3946
- (id)initWithImage:(UIImage*)image
4047
fileType:(STImageFileType) fileType
41-
caption:(NSString*) caption;
48+
caption:(NSString*) caption DEPRECATED_MSG_ATTRIBUTE("Use `initWithImage:caption:` instead.");
4249

4350
@end
4451

1.55 MB
Binary file not shown.

SnapteeSDKExample/ViewController.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,9 @@ - (IBAction) designWithSnaptee:(id)sender{
6464

6565
/*
6666
image: UIImage passing to Snaptee
67-
file type: PNG or JPG (If it is transparent background, pleasae use PNG)
6867
caption: Optional. Description of the image. Typically entered by users
6968
*/
7069
STViewController * stViewController = [[STViewController alloc] initWithImage:[UIImage imageNamed:@"sample2.jpg"]
71-
fileType:STImageFileTypeJPG
7270
caption:@"Funny bear!"];
7371
[stViewController setST_delegate:self];
7472
[stViewController setModalPresentationStyle:UIModalPresentationFormSheet];

0 commit comments

Comments
 (0)