ios - OpenUrl返回false并且在xamarin ios中超过5次后不起作用
问题描述
这是我打开另一个应用程序的代码:
string SchemeName = "ITSapp://";
string param = "AuGeoStart:id="+System.Guid.NewGuid().ToString()+"Image=" + imgString + "&Latitude=" + currentLat + "&Longitude=" + currentLong +
"&TargetLlatitude=" + targetLat+ "&TargetLongitude=" + targetLong +"&Angle=" + angle+"&Distance=" +distance+ "AuGeoEnd";
string finalReqURL = SchemeName + param;
NSString urlstring = new NSString(finalReqURL);
NSUrl request = new NSUrl(urlstring);
bool isCanOpened = UIApplication.SharedApplication.CanOpenUrl(request);
if (isCanOpened)
{
//bool isOpened = UIApplication.SharedApplication.OpenUrl(request);
bool isOpened =Task.FromResult(UIApplication.SharedApplication.OpenUrl(request)).Result;
}
这是我的 info.plist 文件
5 次后此代码不起作用,打开 url 返回 false,CanOpenUrl 返回 false
解决方案
推荐阅读
- immutable.js - 获取 OrderedMap 的子集/过滤器
- angular - Angular 5 firebase 数据库获得一项
- json - 从 json 回显多个变量
- python - 从控制台打印到文件有效,但在运行脚本时无效
- django - 带有 ManyToManyField 的 Django REST Framework 列
- php - 日期差异计数功能无法更新到数据库
- javascript - 我想使用 codenigator 在数据表中添加编辑和删除按钮
- javascript - 提交时获取复选框值
- html - 我希望第二个菜单出现在媒体上
- android - 通过解锁屏幕旋转屏幕