Dina Hussieny Dina Hussieny - 14 days ago 9
Objective-C Question

Force touch the app icon when app closed from task manager

while using quick actions of 3D Touch it works good but while app is terminated first time force touch the app icon it open home screen but the other times it open the right screen.
why this happen and how I can test the app while it is terminated


From the method application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) you can use the launchOptions argument to detect whether user is launching the app by pressing shortcut item key or not.

if launchOptions != nil {
        if let userInfo = launchOptions![UIApplicationLaunchOptionsShortcutItemKey] {
            //Handled the implementation here