I have a MonoTouch project which builds and runs fine on i386/iOS Simulator. The project references a native (Obj-C) library, which I converted to a MonoTouch DLL by using the btouch process as described in Xamarin's BindingSample:
So my makefile builds all three architectures (i386, armv6 and armv7), then combines the three outputs to one 'Universal' library, and finally uses btouch to generate a MonoTouch DLL.
To be sure that my universal library contains all three architectures, I checked with lipo -info
, and indeed, it contains i386, armv6 and armv7.
However, when I'm building for deployment on an actual iOS device, I get the following errors:
Undefined symbols for architecture armv7:
"_ABAddressBookCreate", referenced from:
-[ContactsTokenField setupSms] in libContactsTokenFieldViewUniversal.a(ContactsTokenField.o)
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_ABAddressBookCopyArrayOfAllPeople", referenced from:
-[ContactsTokenField setupSms] in libContactsTokenFieldViewUniversal.a(ContactsTokenField.o)
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_ABAddressBookGetPersonCount", referenced from:
-[ContactsTokenField setupSms] in libContactsTokenFieldViewUniversal.a(ContactsTokenField.o)
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_ABRecordCopyValue", referenced from:
-[ContactsTokenField setupSms] in libContactsTokenFieldViewUniversal.a(ContactsTokenField.o)
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_kABPersonFirstNameProperty", referenced from:
-[ContactsTokenField setupSms] in libContactsTokenFieldViewUniversal.a(ContactsTokenField.o)
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
-[ContactsTokenField setupSms] in libContactsTokenFieldViewUniversal.a(ContactsTokenField.o)
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_kABPersonLastNameProperty", referenced from:
-[ContactsTokenField setupSms] in libContactsTokenFieldViewUniversal.a(ContactsTokenField.o)
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
-[ContactsTokenField setupSms] in libContactsTokenFieldViewUniversal.a(ContactsTokenField.o)
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_ABMultiValueGetCount", referenced from:
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_ABMultiValueCopyLabelAtIndex", referenced from:
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_ABMultiValueCopyValueAtIndex", referenced from:
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_kABPersonEmailProperty", referenced from:
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
"_kABPersonPhoneProperty", referenced from:
-[TITokenFieldView setupWithAddressType:prompt:] in libContactsTokenFieldViewUniversal.a(TITokenField.o)
ld: symbol(s) not found for architecture armv7
collect2: ld returned 1 exit status
mtouch exited with code 1
What am I doing wrong?