2

验证我的苹果应用程序站点关联文件时,我通过了主域和子域

阿萨

当然还有启用和添加的权利

关联域

每当我想在设备上进行测试时,我都会重新安装该应用程序,以获取设备上安装的文件的新版本……并在从 XCode 安装之前删除旧应用程序。

{
    "applinks": 
    {
        "apps": [],
        "details": [
            {
                "appID": "TeamID.AppID",
                "paths": [ "*" ]
            }
        ]
    },
    "activitycontinuation": 
    {
        "apps": ["TeamID.AppID"]
    }
}

但问题很简单,当我点击我在线托管的 html 中的链接时,它会在 Safari 中打开,而不是在应用程序中!

PS:这是因为我没有该网站的 https 吗?它只适用于http...

iOS 控制台输出,使用 swcd 关键字过滤,站点名称替换为 mySiteName

Mar  5 20:05:56 DevaEldeen swcd(CoreUtils)[184] <Notice>: Get info for service 'applinks', app ID '<<NULL>>', domain 'www.je...'
Mar  5 20:05:56 DevaEldeen swcd(CoreUtils)[184] <Notice>: Get info for service 'activitycontinuation', app ID '<<NULL>>', domain 'www.je...'
Mar  5 20:06:00 DevaEldeen swcd(CoreUtils)[184] <Notice>: Get info for service 'applinks', app ID '<<NULL>>', domain 'm.je...'
Mar  5 20:06:00 DevaEldeen swcd(CoreUtils)[184] <Notice>: Immediate retry for domain 'm.je...'
Mar  5 20:06:00 DevaEldeen swcd(CoreUtils)[184] <Notice>: Started request for domain 'm.mySiteName.com', URL 'https://m.mySiteName.com/.well-known/apple-app-site-association'
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TCP Conn Start [99:0x17e57310]
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_handler_start [99 m.mySiteName.com:443 initial path (null)]
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 initial path (null)] reported event path:start
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 waiting path (satisfied)] reported event path:satisfied
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 waiting path (satisfied)] skipping state update
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 in_progress resolver (satisfied)] reported event resolver:start_dns
Mar  5 20:06:00 DevaEldeen mDNSResponder[85] <Info>:  15: DNSServiceCreateConnection START PID[184](swcd)
Mar  5 20:06:00 DevaEldeen mDNSResponder[85] <Info>:  15: DNSServiceGetAddrInfo(4000D000, 0, 3, m.mySiteName.com.) START PID[184](swcd)
Mar  5 20:06:00 DevaEldeen mDNSResponder[85] <Info>:  15: DNSServiceCreateConnection STOP PID[184](swcd)
Mar  5 20:06:00 DevaEldeen mDNSResponder[85] <Info>:  15: DNSServiceGetAddrInfo(m.mySiteName.com.) STOP PID[184](swcd)
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_resolver_update [99 m.mySiteName.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 104.25.215.11:443
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_resolver_update [99 m.mySiteName.com:443 in_progress resolver (satisfied)] Adding endpoint handler for 104.25.214.11:443
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 in_progress resolver (satisfied)] reported event resolver:receive_dns
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_resolver_start_next_child [99 m.mySiteName.com:443 in_progress resolver (satisfied)] starting child endpoint 104.25.215.11:443
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_resolver_start_next_child [99 m.mySiteName.com:443 in_progress resolver (satisfied)] starting next child endpoint in 316ms
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_handler_start [99.1 104.25.215.11:443 initial path (null)]
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99.1 104.25.215.11:443 initial path (null)] reported event path:start
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99.1 104.25.215.11:443 waiting path (satisfied)] reported event path:satisfied
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99.1 104.25.215.11:443 in_progress socket-flow (satisfied)] reported event flow:start_connect
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_flow_protocol_connected [99.1 104.25.215.11:443 in_progress socket-flow (satisfied)] Output protocol connected
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_flow_connected_path_change [99.1 104.25.215.11:443 ready socket-flow (satisfied)] Connected path is satisfied
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99.1 104.25.215.11:443 ready socket-flow (satisfied)] reported event flow:finish_connect
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 ready resolver (satisfied)] reported event flow:finish_connect
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99.1 104.25.215.11:443 ready socket-flow (satisfied)] reported event flow:changed_viability
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 ready resolver (satisfied)] reported event flow:changed_viability
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TCP Conn Event [99:0x17e57310]: 1 Err(0)
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TCP Conn Connected [99:0x17e57310]: Err(0)
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC Enabling TLS [99:0x17e57310]
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_start_tls_while_connected [99.1 104.25.215.11:443 ready socket-flow (satisfied)]
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99.1 104.25.215.11:443 in_progress socket-flow (satisfied)] reported event flow:start_secondary_connect
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 in_progress resolver (satisfied)] reported event flow:start_secondary_connect
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 in_progress resolver (satisfied)] reported event flow:start_connect
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_flow_protocol_connected [99.1 104.25.215.11:443 in_progress socket-flow (satisfied)] Transport protocol connected
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99.1 104.25.215.11:443 in_progress socket-flow (satisfied)] reported event flow:finish_transport
Mar  5 20:06:00 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 in_progress resolver (satisfied)] reported event flow:finish_transport
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TLS Event [99:0x17e57310]: 2, Pending(0)
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TLS Event [99:0x17e57310]: 11, Pending(0)
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TLS Event [99:0x17e57310]: 22, Pending(0)
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TLS Event [99:0x17e57310]: 12, Pending(0)
Mar  5 20:06:00 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TLS Event [99:0x17e57310]: 14, Pending(0)
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Info>: Accepting URL 'https://m.mySiteName.com/.well-known/apple-app-site-association' trust
Mar  5 20:06:01 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TLS Trust Result [99:0x17e57310]: 0
Mar  5 20:06:01 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TLS Event [99:0x17e57310]: 20, Pending(0)
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_flow_protocol_connected [99.1 104.25.215.11:443 in_progress socket-flow (satisfied)] Output protocol connected
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_flow_connected_path_change [99.1 104.25.215.11:443 ready socket-flow (satisfied)] Connected path is satisfied
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99.1 104.25.215.11:443 ready socket-flow (satisfied)] reported event flow:finish_connect
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_connection_endpoint_report [99 m.mySiteName.com:443 ready resolver (satisfied)] reported event flow:finish_connect
Mar  5 20:06:01 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TCP Conn Event [99:0x17e57310]: 8 Err(0)
Mar  5 20:06:01 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TLS Handshake Complete [99:0x17e57310]
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Info>: Retrying non-well-known request for domain 'm.mySiteName.com', status -6768/0xFFFFE590 kSecurityRequiredErr
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Notice>: Started request for domain 'm.mySiteName.com', URL 'https://m.mySiteName.com/apple-app-site-association'
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Info>: Canceled URL 'https://m.mySiteName.com/.well-known/apple-app-site-association'
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Notice>: ### Denying redirect 'https://m.mySiteName.com/apple-app-site-association' -> 'http://m.mySiteName.com/apple-app-site-association'
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Notice>: Completing request for 'https://m.mySiteName.com/apple-app-site-association', status -6768/0xFFFFE590 kSecurityRequiredErr
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Info>: Canceled URL 'https://m.mySiteName.com/apple-app-site-association'
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Notice>: Closing URL session
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Info>: Skipping scheduling retry of 'm.mySiteName.com' at retry limit (8 of 8)
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Notice>: Retry needed for 'mySiteName.com' failure in 3h 12m 40s
Mar  5 20:06:01 DevaEldeen swcd(CoreUtils)[184] <Notice>: Scheduling recheck in 3h 12m 49s
Mar  5 20:06:01 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TCP Conn Cancel [99:0x17e57310]
Mar  5 20:06:01 DevaEldeen swcd(CFNetwork)[184] <Notice>: TIC TCP Conn Destroyed [99:0x17e57310]
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_handler_cancel [99 m.mySiteName.com:443 ready resolver (satisfied)]
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_handler_cancel [99.1 104.25.215.11:443 ready socket-flow (satisfied)]
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Notice>: __nw_socket_service_writes_block_invoke sendmsg(fd 4, 31 bytes): socket has been closed
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_flow_protocol_disconnected [99.1 104.25.215.11:443 cancelled socket-flow (null)] Output protocol disconnected
Mar  5 20:06:01 DevaEldeen swcd(libsystem_network.dylib)[184] <Info>: nw_endpoint_handler_cancel [99.2 104.25.214.11:443 initial path (null)]
4

1 回答 1

2

在这种情况下,真正的答案是该apple-app-site-association文件需要可通过 HTTPS 访问。来自App Search 编程指南

笔记

如果您的应用在 iOS 9 或更高版本中运行,并且您使用 HTTPS 来提供 apple-app-site-association 文件,您可以创建一个使用 application/json MIME 类型的纯文本文件,并且您不需要对其进行签名。如果您在 iOS 8 中支持 Handoff 和 Shared Web Credentials,您仍然需要按照 Shared Web Credentials Reference 中的说明对文件进行签名。

对于 iOS 8,您需要对 JSON 文件进行签名,因此在这种情况下,可以通过 HTTP 提供,因为它是通过签名进行验证的。对于更新的 iOS 版本,它不需要签名,这很好,但是我们需要 HTTPS 来保护它。

原始无关答案:

如果您已经在 Safari 中,我相信它会留在 Safari 中。您应该在其他应用程序(如 Notes)中尝试该链接。此外,您的手机可能配置为始终访问该链接的网络。在这种情况下,您可以再次长按 Notes 中的 URL,系统会提示您是要打开应用程序还是访问 Web。

于 2017-03-05T17:22:57.193 回答