Hi,
I am trying to integrate Siri with my existing core application, but currently have trouble handling message intent in core application - actually the handler methods are not called after Siri says "Ok, it's sent".
Neither:
===
- (void)application:(UIApplication *)application handleIntent:(INIntent *)intent completionHandler:(void(^)(INIntentResponse *intentResponse))completionHandler NS_AVAILABLE_IOS(11_0)
{}
===
Nor:
===
- (BOOL)application:(UIApplication*)application continueUserActivity:(NSUserActivity*)userActivity restorationHandler:(void (^)(NSArray* restorableObjects))restorationHandler
{}
===
Here is the IntentHandler for sendMessage I am using:
===
- (void)handleSendMessage:(INSendMessageIntent *)intent completion:(void (^)(INSendMessageIntentResponse *response))completion {
// Implement your application logic to send a message here.
NSUserActivity *userActivity = [[NSUserActivity alloc] initWithActivityType:NSStringFromClass([INSendMessageIntent class])];
INSendMessageIntentResponse *response = [[INSendMessageIntentResponse alloc] initWithCode:INSendMessageIntentResponseCodeSuccess userActivity:userActivity];
completion(response);}
===
Has anyone experienced such behavior, or knows how to resolve this problem ? I need to catch the Siri message in main application and process it appropriately.
Note, that:
1) Siri capability is enabled for both main app/Siri extension app in developer portal.
2) All required intents are included in info.plist file.
3) Added "com.apple.developer.siri" in entitlements file.
4) All (for both main app and Siri extension app) provisioning profiles are generated/used as expected.
Any help would be highly appreciated. Thanks in advance.