最简易方法调用淘宝app:
引用文件
#import <AlibcTradeSDK/AlibcTradeSDK.h>
AlibcWebViewController* view = [[AlibcWebViewController alloc] init];
AlibcTradeShowParams* showParam = [[AlibcTradeShowParams alloc] init];
showParam.openType = AlibcOpenTypeNative;
//8位数appkey
showParam.backUrl=@"tbopenxxxxxxxx://"; showParam.isNeedPush=YES;
showParam.nativeFailMode=AlibcNativeFailModeJumpH5;
id<AlibcTradePage> page = [AlibcTradePageFactory page: _model.taobao_url];
// 0: 标识跳转到手淘打开了
// 1: 标识用h5打开
// -1: 标识出错
NSInteger ret =[[AlibcTradeSDK sharedInstance].tradeService show:self webView:view.webView page:page showParams:showParam taoKeParams:nil trackParam:nil tradeProcessSuccessCallback:nil tradeProcessFailedCallback:nil];
NSLog(@"ret-----%ld",ret);
if (ret == 1) {
[self.navigationController pushViewController:view animated:YES];
}
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
iOS不支持V5图片,只支持V4 图片吐槽一下文档未能注明
这样下载下来的安全图片放到项目中才不会报错