【问题标题】:Open app using gmail app invite iOS使用 gmail 应用程序邀请 iOS 打开应用程序
【发布时间】:2016-09-04 05:27:10
【问题描述】:
【问题讨论】:
标签:
ios
google-app-invites
【解决方案1】:
请尝试 info.plist 中的以下代码
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.App</string>
<key>CFBundleURLSchemes</key>
<array>
<string>app</string>
</array>
</dict>
</array>
对于句柄,在您的 appdelegate.m 文件中添加以下代码
if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"app://"]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"app://"]];
}
else
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"ituneslinkifuhave"]];
}
为了测试,打开您的 Safari 浏览器并运行 app://。