Can an ios host app implement more than one keyboard extension? - ios

I have a request to implement a keyboard extension for an established ios app that already appears to have a keyboard extension. I've been reading docs, but I am having trouble discerning if a host app can have more than one implementation of a keyboard extension point.

After creating a demo app with two keyboard extensions I can confirm this works - at least in within a dev environment. I have no reason to believe this wouldn't pass app store submission.

Related

Safari extension iOS - messaging from app to extension

With iOS 15, Apple had made it possible to create Safari extension for iOS as well.
I'm currently in the process of bringing an existing macOS Safari extension to iOS.
My problem is that there doesn't seem to be the option to send a message from the host app to the extension. It is possible to answer a request from the extension through the
beginRequest(with:) function. However, I actively need to send a message to the extension after an user action. In macOS, this can be done through the dispatchMessage(withName:toExtensionWithIdentifier:userInfo:completionHandler:) function as described here: https://developer.apple.com/documentation/safariservices/safari_web_extensions/messaging_between_the_app_and_javascript_in_a_safari_web_extension. This function is unfortunately not available for iOS.
Would greatly appreciate any ideas for solving this problem.
You can enable permission ["nativeMessaging"] in manifest file of the safari extension
Use appGroup to store data between the extension and your application.
In SafariWebExtensionHandler, you can response appGroup Data to the message called from any extension javascript file.

Are voice shortcuts for custom SiriKit Intents supported on watchOS?

I’m trying to get a voice shortcut for a custom Siri Intent working as part of an Apple Watch app, but I’m not sure whether that’s possible. Has anyone had success with this or know if it’s supported?
There isn't much code to share in this case, since most of the code is auto-generated by Xcode, but here’s a quick overview of how I have everything set up.
I created a custom Intent with a .intentdefiniton file and separate Intents Extension targets for my iOS app and watchOS app to handle the Intent.
I set up and donate the shortcuts at the appropriate time. I included an INUIAddVoiceShortcutButton in my app so a user can easily add or edit a phrase for the shortcut.
Everything works fine on an iPhone: the shortcut shows up at relevant times throughout iOS, and the Intents Extension in my iOS app handles the shortcut when I say the invocation phrase to Siri.
Since 20% of my app’s users use the Apple Watch app, I want to provide a congruent experience on watchOS. The donated shortcut shows up on the Siri watch face, as expected. I trigger the shortcut from the Siri watch face, and is handled by the Intents Extension that's part of my watchOS app.
When I say the intent’s invocation phrase to my Apple Watch (Series 3 GPS-only), however, it doesn’t work. Siri says:
Checking with the app...
Then a few seconds later:
I do not recognize that command.
I’ve tried this with a separate Intents Extension for my watchOS app, and without. I get the same results in both situations. It works on the simulator, but not on a real device.
I’ve also made sure I have my Watch Extension and Watch App selected under Target Membership for the .intentdefinition file.
I’ve also tried going into Settings > Developer and enabling Display Recent Shortcuts then tapping Force Sync Shortcuts to Watch, but that doesn’t change the behavior.
Are voice shortcuts for these custom intents even supported on Apple Watch? I haven’t been able to tell one way or another with Apple’s documentation. The SoupChef sample project is set up with an Intents Extension for the watchOS app, which makes me think it should be supported. And, since it works on the simulator, that makes me think it should be supported.
However, this page doesn’t list custom intents as being supported on watchOS, so that makes me think they may not be supported: https://developer.apple.com/design/human-interface-guidelines/watchos/user-interaction/siri/
If anyone can help me figure out whether this is supported I’d really appreciate it. I’m not sure if I’m doing something wrong or if this just isn’t supported.
The problem was on my Apple Watch.
I was able to get it working by erasing the watch (Settings > General > Reset > Erase All Content and Settings) then restoring it from a backup.

Open Container App from Share Extenion

So I've found that the you cannot open URLs (and therefore deeplinks) from Share Extensions in iOS. But I'm wondering if there is any way to open the container app of the extension.
For instance, in my app the share extension will only work if you are logged in, so if you tap the extension it will present an alert view telling you so. But I want a button on that alert view to bring you into the container app to make it easier to log in.
Hope this makes sense and thanks in advance!
No, Apple does not permit this. It's not an accident that you can't open URLs from share extensions. There have been workarounds in some versions of iOS, but Apple has closed them, because they apparently considered them to be bugs. The intended behavior is apparently that a share extension must be able to do whatever it needs to have done without relying on the containing app.

Open Siri using private API's in iOS 8

I want to make an app that won't be released on the App Store. I want this app to open siri through private API's, basically inject a home button press and hold into the events queue. I have tried using GSEvent(GSSendEvent - Inject Touch Event iOS), but it no longer works(it silently fails) after iOS 7. I believe it is possible through SBUIController but I can't figure how to use SBUIController in iOS 8. To be clear, I want to do this on a non-jailbroken phone.
How can I go about doing this in iOS 8?
Thanks
You should check out the runtime headers of all the private/public apis here.
I found a method hidden in accessibility, which could possibly work in your case. Have a look at it here: http://git.io/frK6Sw . The method is named -(void)openSiri, which suggest that it might open Siri, I haven't tried though.

Create custom international keyboard for iPhone

Is it possible to take advantage of the international keyboard feature for the iPhone and create a custom keyboard that can be used over the entire phone not just within a particular app?
Similar to the Emoji keyboard but I'm under the impression that's somehow native to iOS and is just disabled by default?
I've looked at a lot of the questions on here regarding this, I'd just like to get a definitive answer.
As per Apple's submission guidelines:
2.5 Apps that use non-public APIs will be rejected
2.6 Apps that read or write data outside its designated container area will be rejected
There are no public APIs to add an additional keyboard.
The files that store keyboard data are definitely stored outside of your app's container.
In short: There is no way to implement a custom global keyboard on a non-jailbroken iOS device at this point in time.
As of iOS 8 you can now create custom keyboard extensions: https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Keyboard.html
#0x90
this App adds an international keyboard to iOS (a keyboard you will see in your iOS general settings)
http://itunes.apple.com/us/app/emoji-free!/id332509635?mt=8
how did they manage to do it?
--
EDIT: i'm sorry for not searching it before, this should be the answer
Making An Emoji Enabeling App
The best way i found is to add shortcuts.
Go in the keyboard setting and paste the symbols you copied from a document or safari and give it a shortcut. For exemple: for √ i used ss. So i just double the first letter of the thing. Or for an exponent like ², i just use 22.
It takes a while to setup but its an easy way instead of switching between the symbol app and do a copy and paste every time. And for greek symbols, i just installed the greek keyboard.
Have fun.

Resources