I want to detect in my custom keyboard extension app which application is using my extension. Can we detect any information in keyboard extension about application which is using my extension.I dont think it is possible .if any body have have knowledge about this kindly share it.
Thanks
You can try this code in your UIInputViewController
override public func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
if let parentViewController = self.parentViewController {
var hostBundleID = parentViewController.valueForKey("_hostBundleID")
println(hostBundleID)
}
}
But I'm not sure that Apple will approved when you release to App Store
来源:https://stackoverflow.com/questions/29642669/can-we-detect-which-ios-application-is-using-my-custom-keyboard