Insights

PhoneGap EmailComposer: i386 Architecture Error

Quick fix to a common problem

When using the EmailComposer plugin to develop iOS apps on PhoneGap / Cordova, I've seen this error multiple times:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
      objc-class-ref in EmailComposer.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Translation: MessageUI.framework is not linked to your project.

It is likely the framework used to be linked to your project and was unintentionally removed. I like to blame the latest plugin I've added for removing the link.

Adding MessageUI.Framework To Your Project

Step 1: Find where to link libraries inside of Xcode:

Step 2: Open 'add library' dialog:

Step 3: Type "message" to find the MessageUi.Framework. Add library to project.

Step 4: Build.

That should do it.

I know PhoneGap / Cordova developers aren't always comfortable in Xcode so I figured I'd take some time and share this quick fix.

This post was written using Markdown for Sitecore.

👋 Hey Sitecore Enthusiasts!

Sign up to our bi-weekly newsletter for a bite-sized curation of valuable insight from the Sitecore community.

What’s in it for you?

  • Stay up-to-date with the latest Sitecore news
  • New to Sitecore? Learn tips and tricks to help you navigate this powerful tool
  • Sitecore pro? Expand your skill set and discover troubleshooting tips
  • Browse open careers and opportunities
  • Get a chance to be featured in upcoming editions
  • Learn our secret handshake
  • And more!
Sitecore Snack a newsletter by Fishtank Consulting
 

Meet Dan Cruickshank

President | Sitecore MVP x 11

Dan is the founder of Fishtank. He's a multi-time Sitecore MVP and Coveo MVP award winner. Outside of technology, he is widely considered to be a top 3 father (routinely receiving "Father of the Year" accolades from his family) and past his prime on the basketball court.

Connect with Dan