打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
IOS 支付宝支付问题

// iOS调用 AlipaySDK 支付宝找不到头文件<openssl/rsa.h>

首先将 openssl 和 Util 目录添加到Build setting->header search path 中 ($(PROJECT_DIR)/SXH/Vendor/AlipaySDK)

添加 AlipaySDK 的库和 framework (添加的内容可以查看 AlipaySDKDEMO )


//运行后报错,类似于以下提示信息:
Cannot find interface declaration for 'NSObject', superclass of 'Base64'

//解决

那么需要打开报错了的文件,增加头文件。
#import <Foundation/Foundation.h>


//Undefined symbols for architecture x86_64:

//解决

在 Build Phases -> Link Binary  With Libraries 中新增 'SystemConfiguration.framework'


//跳转支付宝 APP 客户端返回后弹出 web 登录页面
//解决

在项目中加上 Main.storyboard  ,Info.plist 中加上 Main storyboard file base name -> Main


ps: 在 IOS 的开发中最好加上 LaunchScreen 和 Main.storyboard ,不然在引用一些第三方的库时,可能会出现一些奇怪的问题和现象,难以排查。


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 判断客服端有没有安装支付宝
//        NSURL * myURL_APP_A = [NSURL URLWithString:@"alipay:"];
//        if (![[UIApplication sharedApplication] canOpenURL:myURL_APP_A]) {
//            //如果没有安装支付宝客户端那么需要安装
//            UIAlertView *message = [[UIAlertView alloc]initWithTitle:@"提示信息" message:@"您还没有安装支付宝钱包!" delegate:self cancelButtonTitle:@"确定" otherButtonTitles: nil];
//            [message show];
//            return;
//        }
         
        //判断客服端有没有安装支付宝,没有跳转 web
//        NSArray *array = [[UIApplication sharedApplication] windows];
//        UIWindow* win=[array objectAtIndex:0];
//        [win setHidden:NO];
         
//        //跳转 AppStore 下载支付宝
//        NSString * URLString = @"http://itunes.apple.com/cn/app/id535715926?mt=8";
//        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:URLString]];


本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
iOS App 自定义 URL Scheme 设计 | Architecting Life
iOS app通信(app相互调用、网页调用app)
iOS 9 failed for URL: “XXX://@”
iOS----------获取通知状态并跳转设置界面设置
UIDevice用法以及调用自带应用
阻止iOS设备锁屏
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服