iPhone 上的 OpenURL 字符串问题

发布于 2024-12-02 02:36:49 字数 395 浏览 4 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

盗梦空间 2024-12-09 02:36:50

我认为你需要使你的 app 变量成为成员变量。我认为当您在 -(void) open 方法中使用它时,它已经为零。

尝试这样的操作:

@interface SUItem__HAX : NSObject
{
    long long itemIdentifier;
    NSString *app;
}

然后在 -(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:

@interface SUItem__HAX : NSObject
{
    long long itemIdentifier;
    NSString *app;
}

then in -(void) setItem change NSString* app = appid; to app = appID;

The method to open a link should also read: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string];

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文