objective c - iOS "open in" while the app is already running -


i have gotten "open in" feature work in app developing open files. implementing application:didfinishlaunchingwithoptions: , using uiapplicationlaunchoptionsurlkey file url options dictionary, i'm not sure when application open.

any appreciated, thanks.

if app open, application:didfinishlaunchingwithoptions: won't called again. application:openurl:sourceapplication:annotation: called.

note if app wasn't open, application:didfinishlaunchingwithoptions: called , application:openurl:sourceapplication:annotation: called (unless returned no in didfinishlaunchingwithoptions signify cannot open url in question).

so best place process "open in" feature inside openurl. how depends on app, if user interaction involved , if different view controllers need behave differently, approach create , post nsnotification inside openurl describe "open in" action, , have subscribers elsewhere in app act accordingly.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -