com.lampa.startapp在ios中的问题

这个插件怎么用,怎么下载,我就不说了,百度一大堆。我说一下我在ios中遇到的问题。我用这个插件进行高德地图、腾讯地图的跳转。我说一下我遇到的问题。(我项目是ionic+angular做的)

一、添加白名单

需要在Xcode中,添加白名单,这个百度就行

二、canOpenURL:failed for URL:"(null)"-error:invalid input URL

这个错误的原因是插件在ios的编码有问题。需要修改一下ios的代码(文件:src/ios/startAPP.m)。代码如下

NSString* scheme = [command.arguments objectAtIndex:0];

NSURL* scheme_url = [NSURL URLWithString:[scheme stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]];

if ([[UIApplication sharedApplication] canOpenURL:scheme_url]) {

      [[UIApplication sharedApplication] openURL:scheme_url];

。。。。。。

}

这是github的地址:https://github.com/lampaa/com.lampa.startapp/issues/89

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容