When validating my apple app site association file, I get passed for the main domain and sub domains
and of course have entitlements enabled and added
I reinstall the app whenever I want to test on a device, to fetch a new version of the file installed on the device... and I delete the old app before installing from XCode.
{
"applinks":
{
"apps": [],
"details": [
{
"appID": "TeamID.AppID",
"paths": [ "*" ]
}
]
},
"activitycontinuation":
{
"apps": ["TeamID.AppID"]
}
}
but the problem simply is, when I tap links from an html that i hosted online, it opens in safari not in app!!
PS : is this because I don't have https for the site? it works only on http...
iOS Console output, filtered with swcd keyword, and sitename replaced with 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)]
The real answer in this case is that the apple-app-site-association
file needs to be accessible over HTTPS. From the App Search Programming Guide:
NOTE
If your app runs in iOS 9 or later and you use HTTPS to serve the apple-app-site-association file, you can create a plain text file that uses the application/json MIME type and you don’t need to sign it. If you support Handoff and Shared Web Credentials in iOS 8, you still need to sign the file as described in Shared Web Credentials Reference.
For iOS 8 you needed to sign the JSON file, so in that case it was fine to be offered over HTTP, since it was validated via the signature. With more recent iOS versions, it doesn't need to be signed, which is great, but then we need HTTPS to secure it.
If you're already in Safari, I believe it will stay in Safari. You should try the link in another app like Notes. Also, your phone may be configured to always go to the web for that link. In that case, you can long press on the URL in Notes again, and you should get prompted whether you want to open the app or go to the web.