SiriKit can't send message in my project - message

I want to use SiriKit send a message, but I found that the whole event at the end of the handler method, will not continue in the main app. In my project, sending a message module depends on many things, is not simple abstract into a framework, so the SiriKit can't realize my demand, is that right?

Sirikit allows to handle voice in framework. When you say "Send message to Thornaci using 'myApp'." it handle it in intent and you can listen it with Handoff in mainApp. You can check here for Handoff

First, u should add intent extension in your app
After u builded your app, u should check your phone setting--siri--app support--yourapp permission
Then u can try "Send message to XX on myApp" in siri test.

Related

How to enable Ios Callkit Call Directory extension

I am trying to add the Callkit Call Directory extension to my React Native app so that I can add additional numbers that will show with caller id (populated from my app).
The Callkit documentation states:
"Before a Call Directory extension can operate on incoming calls, the user must explicitly enable the extension in the iOS Settings app."
However, there is no section for "Call blocking and identification" in my phone's settings (see here for similar issue: https://discussions.apple.com/thread/251896172)
I have tried using the openSettingsWithCompletionHandler method, which does open the settings on the phone, but still no option for "Call blocking and identification".
How can I let my app use this functionality if it cannot be seen in the phone settings? Am I doing something completely backward?
Thanks.

How do I send a message using MessagingCenter from PCL to iOS with Xamarin Forms?

I am creating a cross-platform mobile app with Xamarin, and I am trying to use MessagingCenter to send a message when an event occurs. The event should be handled differently depending on if the phone is running iOS or Android.
I am able to send a message from my PCL to MainActivity.cs (in Droid).
Here's how I'm sending a message:
MessagingCenter.Send<object, string>(this, "ChangeVenue", "Zw325nfe2");
And here is how I am subscribing to that message for Android in MainActivity.cs:
MessagingCenter.Subscribe<object, string>(this, "ChangeVenue", (sender, msg) =>
{
//stuff
});
I am not able, however, to do a the same thing for iOS.
I think I just don't know where to add a subscription. Main.cs doesn't work because "this" cannot be referenced from a static context. I'm thinking AppDelegate.cs may be a good place to subscribe to the message, but putting it in FinishedLaunching() doesn't make sense.
How do you subscribe to messages using MessagingCenter for iOS builds?

How do I embed my app commands with siri or any other voice activation library

Basically, I want my app to be voice activated
If user asks my app to open then it should open
if the user says something it has to be typed in the textbox
if the user says to click on a button it has to be done
if the user wants to be voice read then it should read it out.
basically, I would like to read the user command sometimes if possible in the app and serve my user base the best
There is no much documentation available there,,, so I thought of asking the question here
This is not possible. You cannot use Siri with apps for anything else than what is implemented in the SiriKit framework and SiriKit does not provide any methods for just opening your app without actually handling an intent and custom commands are also not supported at the moment.
For dictation you can use the Speech framework and for the system to "read out" something from your UI, you need to support VoiceOver, which is part of Accessibility.
My purpose is to open secret screen (test screen) into my app. Best way is to display a normally hidden button, I use a fake messaging with Siri. App is ok for Siri request but no other special code is necessary, I just add appDelegate.m method with a postNotification, somewhere some code will append a button
- (BOOL)application:(UIApplication *)application willContinueUserActivityWithType:(NSString *)userActivityType {
if ([userActivityType isEqualToString:#"INSendMessageIntent"]) {
[[NSNotificationCenter defaultCenter] postNotificationName:#"modeTest" object:nil];
}
return YES;
}
Now ask Siri "Send message with 'AppName' " a view from my IntentWiewController.m is display, you can abord process by touching screen, application is running now but Notification is send, some process can easily be done like adding any secret control. Next run will hide button.

Call WKInterfaceController's method from UIViewController

I have an iPhone app and added a WatchExtension. Now I managed to send a string to the Watch using the MMWormhole. In order to use the string I must call update() inside the WKInterfaceController from a method inside my UIViewController, so the iPhone application.
Is that possible?
I tried to do something like InterfaceController.update() but Xcode complained that it does not know the variable InterfaceController.
Thanks in advance :)
The iPhone App and Watch Extension are TWO seperate process, although they are stored in ONE bundle, so you can not call the method of other process in runtime.
In WatchKit:
If you want to share code, use Framework.
If you want to share data, use App Group.
If you want to use notification, use Inter-Process Communication(In iOS, It's Darwin Notification, and MMWormhole use this feature).
I think you want to let the Watch update its interface when iPhone app do something, you can do like this:
send a message to Watch Extension.
Watch Extension receive that message.
In the message handler, update interface.
In my option, the iPhone App and Watch Extension can be seen as a kind of C/S architecture, iPhone App is Server and Watch Extension is Client, maybe this metaphor is easier to understand.

Send SMS without presenting MessageComposeViewController in iOS

I am working on sending SMS demo. I want to send how to send the SMS and how to set the delegate to MessageComposeViewController. and in order to send the message we have below line
[self presentViewController:messageController animated:NO completion:nil];
This line will present the MessageComposeView on screen with SEND button. And Once we click on send button it sends the message. What I want is to send the message directly without presenting this MessageController on screen. Please help how can I do this.
In this related question, Apple has restrictions in place on being able to send a SMS message without the user clicking the SEND button.
Apple really wants the user to be in control of the SMS functionality of their phone. Otherwise all sorts of data could be flying off some random app (e.g. spamming your contacts with "try this app out!", which would not be very friendly nor very nice).
One of the answers in this question does have a potential non-MFMessageComposeViewController solution, however I have a feeling that if Apple catches you doing this they might deny your app from being approved for the app store.
You could send the message using some webservice on the internet. http://client.suresms.com/ProjectInfo.aspx?Info=3 or www.clickatell.com. They have bunches of API for sending messages.
In SureSMS simply create an account and make a http request to
http://suresms.com/Script/GlobalSendSMS.aspx?login=[youraccountnumber]&password=[yourpassword]&to=[phonenumber]&Text=Hallo.
Remember to URL encode the message text and use countrycodes. Thats it.
You have to present MessageComposeViewController.It's not possible to send without presenting it.
MFMessageComposeViewController has delegate method while delete/send/save. which only perform while we present it.
(void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
You can't do it without MFMessageComposeViewController. Apple won't allow to send SMS without user interaction.
As per document
You must not modify the view hierarchy presented by this view
controller. You can, however, customize the appearance of the
interface using the UIAppearance protocol.
I've alternate solution of this, Alternative way can be Using web service API. Create a web service at server side that send a message to specific number(s) that accept numbers as parameters with request.(according to your requirement)
As using Web server or external sms provider can do it.
It is NOT possible . Apple willn't accept your App. Apple will reject your App if you do like that. Human interface guidelines should be followed up.

Resources