Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In PhoneGap app and MessgeUI.framework crash in only iOS device

I created iOS app using PhoneGap version 0.9.6 long back. Now I am going to add Email Composer option. So, I used this URL for adding it https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/EmailComposer It is working fine in Simulator. But when I am sync that ".app" file using iTunes to device (Because I can't run directly from Xcode have problem with device and XCode).

After sync completed in iPhone,I opened the app it's immediately crashing after flash screen.

If I remove MessageUI.framework and those two classes. Then taken a build and sync to device works fine. Only getting problem when I add MessageUI.framework.

Even I did not use that MessageUI anywhere. just added MessageUI in linked Libraries and build and sync with iphone, it is also crashes after flash screen.

I found this URL https://github.com/phonegap/phonegap-iphone/issues/203 , but I can't move to another version of PhoneGap now. Any better solution or where I am going wrong in steps?

like image 466
Naga Harish M Avatar asked Nov 05 '11 07:11

Naga Harish M


1 Answers

Change the method getCommandInstance as shown below.

-(id) getCommandInstance:(NSString*)className
{
/** You can catch your own commands here, if you wanted to extend the gap: protocol, or add your
*  own app specific protocol to it. -jm
**/

   //if(className==@"Connection")
   if([className isEqualToString:@"Connection"])
       return nil;
return [super getCommandInstance:className];
}
like image 151
Ramakrishna Guttha Avatar answered Oct 11 '22 15:10

Ramakrishna Guttha