iPhone 上的 OpenURL 字符串问题
我正在使用 openURL 打开带有参数的应用程序,但在编译时出现错误(theos...mobilesubstrate)
这是我的代码: http://pastie.org/private/mg6lbuttin85llxaxwdkw
抱歉,代码在这里没有格式化;O 正如您在最后看到的,我正在尝试使用参数打开 URL:“itemIdentifier”
任何帮助将不胜感激,谢谢:)
这是错误日志: http://pastie.org/2460416
i am using openURL to open an app with arguments but i get errors when compiling (theos...mobilesubstrate)
Here is my code:
http://pastie.org/private/mg6lbuttin85llxaxwdkw
sorry the code wasn't formating right here ;O
As you can see at the end, i'm trying to open the URL with the argument: "itemIdentifier"
Any help would be much appreciated, thanks :)
here is the error log:
http://pastie.org/2460416
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你需要使你的
app
变量成为成员变量。我认为当您在-(void) open
方法中使用它时,它已经为零。尝试这样的操作:
然后在
-(void) setItem
中将NSString* app = appid;
更改为app = appID;
打开一个链接还应为:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:string];
I think you need to make your
app
variable a member variable. I think that by the time you come to use it in the-(void) open
method, it's nil.Try something like this:
then in
-(void) setItem
changeNSString* app = appid;
toapp = appID;
The method to open a link should also read:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:string];