ios - Call order of performActionForShortcutItem vs applicationWillEnterForeground -
so, have app has server state, , refresh timeout value , checking timeout in applicationwillenterforeground, reloading if timeout has expired. has worked until now.
i want implement new force touch shortcut action performs server operation. however, don’t want status-fetch operation happen @ same time shortcut action. not problem when app launched through shortcut, when transitioning inactive -> active, end starting 1 server operation in applicationwillenterforeground, , in performactionforshortcutitem, not optimal.
what i'm after potentially refresh state if app not (re)launched result of force touch press.
i thought solve bool, “ishandlingshortcut” set in performactionforshortcutitem , check in applicationwillenterforeground, , in case skip refresh - turns out doesn’t work since applicationwillenterforeground called first!
is there any way can find out i’ve (re)launched app via shortcut in applicationwillenterforeground?
edit: perhaps move "refresh"-logic applicationdidbecomeactive? 1 called after performactionforshortcutitem.
Comments
Post a Comment