Search code examples
iosobjective-cios10url-schemeimessage

How to open our app from iMessage


I had created an app in iMessage that is work perfactly but i want to know how can i open our app from iMessage

Suppose I have one app after that i added iMessage target and from iMessage I want to open my app from iMessage is it possible ?

I tried with this but not succeed

 NSString *customURL = @"appName://";

 if ([[UIApplication sharedApplication] 
canOpenURL:[NSURL URLWithString:customURL]])
 {
     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:customURL]];
  }

Error :

enter image description here

enter image description here


Solution

  • Finally Problem solved. I've been to the Build Settings of my app again and stumbled over

    enter image description here

    First time i set to YES. The default though is NO. When I set this to NO the error disappeared. i am also shocked with this results