Require Forcetouch iOS App

Require ForceTouch iOS App

You normally use the UIRequiredDeviceCapabilities key, which can require certain features to be present. However at this time it doesn't seem like 3D Touch has been added.

A large warning will have to suffice for now, while waiting for apple to add 3D touch as a thing you can require. Otherwise there might be some features only the new iPhones models have, such as the arm chip, you could require. I haven't looked into this though.

On apples page for documentation you can see available keys for the UIRequiredDeviceCapabilities, where 3D Touch doesn't seem to be present.
open https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3

IS it impossible to develop a force touch web app without a new apple device?

Here at the bottom of the page it says

With Xcode 7.0 you must develop on a
device that supports 3D Touch. Simulator
in Xcode 7.0 does not support 3D Touch.

Unfortunately it looks like you'll need an actual device that supports 3D Touch in order to develop for it.

Force touch the app icon when app closed from task manager

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
}
}

How can I test force touch peek and pop in the iOS simulator?

I find way! If your have MacBook Pro with ForceTouch Trackpad, you can do it.

Follow:
Choose iOS 9.3 with iPhone 6S Simulator, Find Hardware option on menu bar, check "Use Trackpad force for 3D Touch", then use your force touch Trackpad simulate 3D Touch.

Disable 3D touch for iOS application

The way to remove 3d touch from your web view is -

yourWebView.allowsLinkPreview = false


Related Topics



Leave a reply



Submit