相关疑难解决方法(0)

application:openURL:options: not called

I have created html with following body:

<html>
    <head>
        <meta http-equiv="Refresh" content="3; URL='MyApp://?Success'">
    </head>
    <body>
      success
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

When i try to open page where html uploaded. from my iphone (safari) my app successfully opened but

application:openURL:options:
Run Code Online (Sandbox Code Playgroud)

does not called. Have u any ideas?

my info plist look like this:

<array>
        <string>MyApp</string>
    </array>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>MyApp</string>
            </array>
            <key>CFBundleURLName</key>
            <string>url here</string>
        </dict>
    </array>
Run Code Online (Sandbox Code Playgroud)

My appDelegate Methods:

func application(_ app: UIApplication, open url: URL, options [UIApplication.OpenURLOptionsKey : Any] = …
Run Code Online (Sandbox Code Playgroud)

ios swift

-1
推荐指数
5
解决办法
270
查看次数

标签 统计

ios ×1

swift ×1