Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we detect which ios application is using my Custom keyboard

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

like image 516
Abeer Iqbal Avatar asked Apr 15 '15 06:04

Abeer Iqbal


1 Answers

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

like image 57
Thanh Dat Nguyen Avatar answered Oct 22 '22 00:10

Thanh Dat Nguyen