2

According to PhoneGap Email Composer Plugin. I have added .m, .h, js and framework in my project. But I don't know why, it has many warnings and errors.

Warning:

/Users/mc228/project/platforms/ios/WorkplaceInspection/Plugins/de.appplant.cordova.plugin.email-composer/APPEmailComposer.m:396:18: Implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'int'

Errors

/Users/mc228/project/platforms/ios/EmailComposer.m:158:30: 'presentModalViewController:animated:' is deprecated: first deprecated in iOS 6.0

/Users/mc228/project/platforms/ios/EmailComposer.m:162:19: 'release' is unavailable: not available in automatic reference counting mode

/Users/mc228/project/platforms/ios/EmailComposer.m:162:19: ARC forbids explicit message send of 'release'

/Users/mc228/project/platforms/ios/EmailComposer.m:190:17: 'dismissModalViewControllerAnimated:' is deprecated: first deprecated in iOS 6.0

I also tried to use Files doesn't support the ARC feature, how to deal with to solve, but it came out with more questions, such as:

  1. "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:

  2. "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:

All these questions come from EmailComposer.m file. Is there anyone helping me solve this problem?

Also, I didn't use objective C, I used HTML, CSS and JavaScript to build iOS application.

Community
  • 1
  • 1
Ethan Cao
  • 23
  • 5
  • If you are using Cordova/PhoneGap >= 3.0 (released over a year ago), you should use the CLI to install plugins. https://github.com/katzer/cordova-plugin-email-composer e.g. `cordova plugin add de.appplant.cordova.plugin.email-composer` – Lee Crossley Aug 06 '14 at 16:31
  • @LeeCrossley I applied cordova to install plugins. so i don't think that is the problem – Ethan Cao Aug 06 '14 at 16:43

1 Answers1

1

It looks like you have manually added files from an old version of the plugin as well as installing the latest version via cordova plugin add, there should not be a EmailComposer.m or EmailComposer.h:

https://github.com/katzer/cordova-plugin-email-composer/tree/master/src/ios

Delete any files you have added manually and any references you have added, the Cordova CLI handles this.

Lee Crossley
  • 1,280
  • 12
  • 17
  • Yes, i did add EmailComposer.m EmailComposer.h manually. i will try again. thank u so much. – Ethan Cao Aug 06 '14 at 16:57
  • Thank u. i have solved plugin problem, but that code doesn't work, do you know how to write related code? is there some tutorials? i didn't find it . – Ethan Cao Aug 06 '14 at 20:48
  • Examples here: https://github.com/katzer/cordova-plugin-email-composer#examples if you need more help, probably best to ask the plugin author on github – Lee Crossley Aug 06 '14 at 20:50