a***@163.com
a***@163.com
  • 发布:2019-12-30 19:30
  • 更新:2020-01-04 15:09
  • 阅读:824

4.4.9 alpha-SDK IOS离线打包找不到apple id登录

分类:5+ SDK

xcode 真机离线打包SDK里找不到 apple id登录

其中服务只有:[{"id":"qq","description":"QQ"},{"id":"xiaomi","description":"小米"},{"id":"sinaweibo","description":"新浪微博"},{"id":"weixin","description":"微信"}]

plus.oauth.getServices(function(services) {  
    for (var i in services) {  
        var service = services[i];  
        // 获取苹果授权登录对象,苹果授权登录id 为 'apple' iOS13以下系统,不会返回苹果登录对应的 service      
        if (service.id == 'apple') {  
            appleOauth = service;  
            break;  
        }  
    }  
    console.log(JSON.stringify(services))  
    if (appleOauth === null) {  
        return uni.showToast({  
            title: `您的系统暂不支持apple id登录`,  
            icon: 'none'  
        });  
    }  
    appleOauth.login((oauth) => {  
        console.log(oauth.target.appleInfo)  
        uni.request({  
            url: 'https://xxx.xxx.com/xxx/xxx',  
            method: 'POST',  
            header: {  
                'Content-Type': 'application/x-www-form-urlencoded',  
            },  
            data: {  
                user: oauth.target.appleInfo.user,  
                familyName: oauth.target.appleInfo.fullName.familyName || '--',  
                giveName: oauth.target.appleInfo.fullName.giveName || '--'  
            },  
            dataType: "json",  
            success(res) {  
                console.log(res);  
            },  
            fail(e) {  
                console.log(e, '失败')  
            }  
        })  
        // 授权成功,苹果授权返回的信息在 oauth.target.appleInfo 中      
    }, function(err) {  
        console.log(err)  
        // 授权失败 error    
    }, {  
        // 默认只会请求用户名字信息,如需请求用户邮箱信息,需要设置 scope: 'email'      
        scope: 'user'  
    })  

}, function(err) {  
    console.log('get services error', err)  
    // 获取 services 失败    
})
2019-12-30 19:30 负责人:无 分享
已邀请:
a***@163.com

a***@163.com (作者)

补充一下,自定义基座是可以的,sdk和编辑器都是最新alpha版的

小疯子呵

小疯子呵

@DCloud_iOS_XHY 看下这个问题

CLP

CLP

下个版本加上这个库

a***@163.com

a***@163.com (作者)

@DCloud_IOS_CLP 请问SDK啥时候更新?

该问题目前已经被锁定, 无法添加新回复