App 分享到 QQ、微信、微博等成功后无法返回到自己 App 的问题。
1、检查是否实现了系统回调方法
#if __IPHONE_OS_VERSION_MAX_ALLOWED > 100000 - (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options { BOOL result = [[UMSocialManager defaultManager] handleOpenURL:url]; if (!result) { } return result; } #endif - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { BOOL result = [[UMSocialManager defaultManager] handleOpenURL:url]; if (!result) { } return result; } - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { BOOL result = [[UMSocialManager defaultManager] handleOpenURL:url]; if (!result) { } return result; }
|
2、检查 URL scheme 配置
配置 QQ URL scheme:
配置微信 URL scheme:
- wx + WechatAppID,例如:wx86e14b9a89754586
配置微博 URL scheme:
- wb + WeiboAppID,例如:wb2427088669
微信扫一扫,向我赞赏
支付宝扫一扫,向我赞赏