gpt4 book ai didi

iOS 自定义 url 方案未打开应用程序 Xcode 5

转载 作者:塔克拉玛干 更新时间:2023-11-02 09:07:32 25 4
gpt4 key购买 nike

我正在尝试使用自定义 url 方案打开我的应用程序,但我不知道发生了什么。运行应用程序后,当我在模拟器上的 Safari 中输入方案时,出现以下对话框:

enter image description here

在 Safari 栏中,我输入“mycustomscheme://”

下面是我的plist:

enter image description here

编辑:

我忘记了我的 AppDelegate.m 文件中也有这个方法:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
// Do something with the url here
DLog(@"here");
return YES;
}

我是否漏掉了一些明显的东西?

最佳答案

好吧,我明白了。我认为这可能是 Xcode 5 的问题?我需要转到 Target -> Info 并添加一个 url 类型。这是现在的样子:

enter image description here

请注意,这是现在我的 plist 的样子:

enter image description here

奇怪的是,没有 url scheme 的条目?

关于iOS 自定义 url 方案未打开应用程序 Xcode 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22689472/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com