objective-cios8handoff

Handoff programming with Safari (iOS 8)


I want to open a native app along with the UserInfo(some sort of custom request) when the user clicks a button on my webpage in Safari browser. As per apple documentation, When you want to do Webpage-to-native-app handoff, UserInfo is always nil.

Is there any workaround to achieve this?


Solution

  • Even though userInfo will always be empty, there might be a workaround. From reading the documentation, it seems that only the domain of webpageURL is tested for equality to the domain associated with your App ID. Therefore, if you'd like to pass any extra data along to your app, you might be able to do it by appending a query string or hash fragment to the end of the URL.

    E.g., http://example.com/?email=123&level=5 or http://example.com/#email=123&level5