简体   繁体   中英

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?

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];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM