Error while packaging application - Flex ANE - apache-flex

We are integrating Push notification with AppBoy SDK in our Flex project.
We are created ANE but while packaging application got error like this
Error occurred while packaging the application:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
objc-class-ref in libcom.fingent.appboyapn.a(ABKDevice.o)
"_CTFontManagerRegisterGraphicsFont", referenced from:
-[ABKInAppMessageViewController applyIconToLabelView:] in libcom.fingent.appboyapn.a(ABKInAppMessageViewController.o)
"_SLServiceTypeFacebook", referenced from:
+[ABKFacebookDataProvider facebookAccountExistsInIOS] in libcom.fingent.appboyapn.a(ABKFacebookDataProvider.o)
___85+[ABKFacebookDataProvider fetchAndPostFacebookDataAccessPromptWithSuccessCompletion:]_block_invoke in libcom.fingent.appboyapn.a(ABKFacebookDataProvider.o)
"_ACFacebookPermissionsKey", referenced from:
+[ABKFacebookDataProvider fetchAndPostFacebookDataAccessPromptWithSuccessCompletion:] in libcom.fingent.appboyapn.a(ABKFacebookDataProvider.o)
"_ACFacebookAppIdKey", referenced from:
+[ABKFacebookDataProvider fetchAndPostFacebookDataAccessPromptWithSuccessCompletion:] in libcom.fingent.appboyapn.a(ABKFacebookDataProvider.o)
"_ACAccountTypeIdentifierFacebook", referenced from:
+[ABKFacebookDataProvider fetchAndPostFacebookDataAccessPromptWithSuccessCompletion:] in libcom.fingent.appboyapn.a(ABKFacebookDataProvider.o)
"_OBJC_CLASS_$_SLRequest", referenced from:
objc-class-ref in libcom.fingent.appboyapn.a(ABKFacebookDataProvider.o)
"_OBJC_CLASS_$_ACAccountStore", referenced from:
objc-class-ref in libcom.fingent.appboyapn.a(ABKFacebookDataProvider.o)
"_OBJC_CLASS_$_SLComposeViewController", referenced from:
objc-class-ref in libcom.fingent.appboyapn.a(ABKFacebookDataProvider.o)
ld: symbol(s) not found for architecture armv7
Compilation failed while executing : ld64

Have your ANE been recompiled to 64bit from old 32bit xcode compile? If not you need to do this to compile w Apache Flex SDK above 16 (check doc for exact version...) Someplace on this site is a nifty ANT compiler that I used once: http://easynativeextensions.com/making-your-ios-apps-universal/ Good luck.

Related

Issue while installing pod

Added Firebase pod for Cloud Messaging(Push notification)
pod 'Firebase/Core'
pod 'Firebase/Messaging'
Undefined symbols for architecture x86_64:
"__T09Alamofire11URLEncodingVAA17ParameterEncodingAAWP", referenced from:
__T09App0A3ApiO4task4Moya4TaskOfg in App.o
"__T09Alamofire12JSONEncodingVN", referenced from:
__T09App0A3ApiO4task4Moya4TaskOfg in App.o
"__T09Alamofire11URLEncodingVN", referenced from:
__T09App0A3ApiO4task4Moya4TaskOfg in App.o
"__T09Alamofire12JSONEncodingVAA17ParameterEncodingAAWP", referenced from:
__T09App0A3ApiO4task4Moya4TaskOfg in App.o
"__T09Alamofire11URLEncodingV7defaultACfgZ", referenced from:
__T09App0A3ApiO4task4Moya4TaskOfg in App.o
"__T09Alamofire12JSONEncodingV7defaultACfgZ", referenced from:
__T09App0A3ApiO4task4Moya4TaskOfg in App.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am also using Moya. But issue while adding Firebase pods.
From the logs it looks like you miss also the AlamoFire (which can be a dependency of your pods). Try do a pod deintegrate and then a pod install again and don't forget to open the Workspace and not the project.

CocoaAsyncSocket Apple Mach-O Linker Error

I need to receive TCP packets using CocoaAsyncSocket. When I'm importing that library to Xcode and trying to run my application, it gives me Apple Mach-O Linker Errors:
Undefined symbols for architecture i386:
"_kCFStreamErrorDomainMach", referenced from:
-[AsyncSocket errorFromCFStreamError:] in AsyncSocket.o
"_kCFStreamErrorDomainNetDB", referenced from:
-[AsyncSocket errorFromCFStreamError:] in AsyncSocket.o
"_kCFStreamErrorDomainNetServices", referenced from:
-[AsyncSocket errorFromCFStreamError:] in AsyncSocket.o
"_kCFStreamErrorDomainSystemConfiguration", referenced from:
-[AsyncSocket errorFromCFStreamError:] in AsyncSocket.o
"_kCFStreamPropertySSLSettings", referenced from:
-[AsyncSocket maybeStartTLS] in AsyncSocket.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
So, What Can I do???
You just need to add SecurityFramework in the Frameworks.
I also met this similar problem.

xcode static library link error while building for iPhone device

I am using xcode 4.6. The SDK is iOS 6.1. The error I got is "Undefined symbols for architecture armv7" while project linking my own created static library, called "libEncrypt.a".
I am sure I have created the libEncrpt.a using architecture armv7. Using "otool -a" to verify the static library, it displays below message. Don't understand why xcode sill complains the error like "Undefined symbols for architecture armv7"??
> otool -a libEncrypt.a
Archive : libEncrypt.a (architecture armv7)
0100644 505/20 108 1360127518 #1/20
0100644 505/20 3604 1360127513 #1/20
Archive : libEncrypt.a (architecture armv7s)
0100644 505/20 108 1360127518 #1/20
0100644 505/20 3604 1360127513 #1/20
Add the detail error message blow:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_libEncrypt", referenced from:
objc-class-ref in LoginViewController.o
objc-class-ref in SignupViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Double check your "Build Active Architecture Only" settings in your app and static library projects.
I had this exact same issue because I had "Build Active Architecture Only" set to YES for my static library but not for my iOS app. When the iOS app tried do a Debug build it expected all architectures to exist but only armv7s was being built for the static library because I was deploying to my iPhone 5.

link to dylib in xcode 4

I'm trying to use libxar inside my xcode4 project and get the famous "undefined symbols for architecture" error, no matter what arch I choose for building, e.g.:
Undefined symbols for architecture x86_64:
"xar_open(char const*, int)", referenced from:
_main in main.o
I did what I always did to include the dylib:
set "library search path" to the path where libxar.dylib is placed
set "header path" to the path where xar.h is placed (which contains xar_open)
added libxar.dylib to build phases - link binary with libraries
Did I miss something?

CppUTest examples build fails

I am new to mac!
I download the xcode4.2 and tried to build CppUTest-v3
1)when I do make, I have the following logs
compiling AllTests.cpp
compiling AllocationInCppFile.cpp
compiling CheatSheetTest.cpp
compiling CommandLineArgumentsTest.cpp
compiling CommandLineTestRunnerTest.cpp
compiling JUnitOutputTest.cpp
compiling MemoryLeakDetectorTest.cpp
compiling MemoryLeakOperatorOverloadsTest.cpp
compiling MemoryLeakWarningTest.cpp
compiling NullTestTest.cpp
compiling PluginTest.cpp
compiling PreprocessorTest.cpp
compiling SetPluginTest.cpp
compiling SimpleStringTest.cpp
compiling TestFailureTest.cpp
compiling TestFilterTest.cpp
compiling TestHarness_cTest.cpp
compiling TestInstallerTest.cpp
compiling TestMemoryAllocatorTest.cpp
compiling TestOutputTest.cpp
compiling TestRegistryTest.cpp
compiling TestResultTest.cpp
compiling UtestTest.cpp
compiling AllocationInCFile.c
compiling TestHarness_cTestCFile.c
compiling CommandLineArguments.cpp
compiling CommandLineTestRunner.cpp
compiling JUnitTestOutput.cpp
compiling MemoryLeakDetector.cpp
compiling MemoryLeakWarningPlugin.cpp
compiling SimpleString.cpp
compiling TestFailure.cpp
compiling TestFilter.cpp
compiling TestHarness_c.cpp
compiling TestMemoryAllocator.cpp
compiling TestOutput.cpp
compiling TestPlugin.cpp
compiling TestRegistry.cpp
compiling TestResult.cpp
compiling Utest.cpp
compiling UtestPlatform.cpp
Building archive lib/libCppUTest.a
ar: creating archive lib/libCppUTest.a
a - objs/src/CppUTest/CommandLineArguments.o
a - objs/src/CppUTest/CommandLineTestRunner.o
a - objs/src/CppUTest/JUnitTestOutput.o
a - objs/src/CppUTest/MemoryLeakDetector.o
a - objs/src/CppUTest/MemoryLeakWarningPlugin.o
a - objs/src/CppUTest/SimpleString.o
a - objs/src/CppUTest/TestFailure.o
a - objs/src/CppUTest/TestFilter.o
a - objs/src/CppUTest/TestHarness_c.o
a - objs/src/CppUTest/TestMemoryAllocator.o
a - objs/src/CppUTest/TestOutput.o
a - objs/src/CppUTest/TestPlugin.o
a - objs/src/CppUTest/TestRegistry.o
a - objs/src/CppUTest/TestResult.o
a - objs/src/CppUTest/Utest.o
a - objs/src/Platforms/Gcc/UtestPlatform.o
Linking CppUTest_tests
ld: library not found for -lgcov
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [CppUTest_tests] Error 1
I found out that I can build by using the llvm make command
CC=/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2 make
Linking CppUTest_tests
Running CppUTest_tests
..................................................
..................................................
..................................................
..................................................
..................................................
...........................................
OK (293 tests, 293 ran, 791 checks, 0 ignored, 0 filtered out, 7 ms)
2)Then I cd to the examples directory. I got the following errors. I tried to investigate but could not find out how to solve it. Your help will be appreciated.
compiling AllTests.cpp
compiling CircularBuffer.cpp
compiling CircularBufferTest.cpp
compiling EventDispatcher.cpp
compiling EventDispatcherTest.cpp
compiling HelloTest.cpp
compiling MockDocumentationTest.cpp
ApplicationLib/MockDocumentationTest.cpp:193:85: warning: expression result unused [-Wunused-value]
mock_c()->actualCall("foo")->withIntParameters("integer", 10)->returnValue().value.doubleValue;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~
1 warning generated.
compiling Printer.cpp
compiling PrinterTest.cpp
compiling hello.c
Building archive lib/libCppUTestExamples.a
ar: creating archive lib/libCppUTestExamples.a
a - objs/ApplicationLib/CircularBuffer.o
a - objs/ApplicationLib/CircularBufferTest.o
a - objs/ApplicationLib/EventDispatcher.o
a - objs/ApplicationLib/EventDispatcherTest.o
a - objs/ApplicationLib/HelloTest.o
a - objs/ApplicationLib/MockDocumentationTest.o
a - objs/ApplicationLib/Printer.o
a - objs/ApplicationLib/PrinterTest.o
a - objs/ApplicationLib/hello.o
Linking CppUTestExamples_tests
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
"mock(SimpleString const&)", referenced from:
TEST_EventDispatcher_EventWithRegistrationForEventResultsIntoCallback_Test::testBody() in libCppUTestExamples.a(EventDispatcherTest.o)
TEST_EventDispatcher_RegisterTwoObserversResultIntoTwoCallsAndARegistrationNotification_Test::testBody() in libCppUTestExamples.a(EventDispatcherTest.o)
TEST_GROUP_CppUTestGroupEventDispatcher::setup() in libCppUTestExamples.a(EventDispatcherTest.o)
TEST_GROUP_CppUTestGroupEventDispatcher::teardown() in libCppUTestExamples.a(EventDispatcherTest.o)
ObserverMock::notify(Event const&, int)in libCppUTestExamples.a(EventDispatcherTest.o)
ObserverMock::notifyRegistration(EventObserver*) in libCppUTestExamples.a(EventDispatcherTest.o)
productionCode() in libCppUTestExamples.a(MockDocumentationTest.o)
...
"MockNamedValue::getIntValue() const", referenced from:
TEST_MockDocumentation_returnValue_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockNamedValue::~MockNamedValue()", referenced from:
TEST_MockDocumentation_returnValue_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockSupport::setData(SimpleString const&, int)", referenced from:
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockSupport::setDataObject(SimpleString const&, SimpleString const&, void*)", referenced from:
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockSupport::getData(SimpleString const&)", referenced from:
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"MockNamedValue::getObjectPointer() const", referenced from:
TEST_MockDocumentation_setData_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"_mock_c", referenced from:
TEST_MockDocumentation_CInterface_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
"_mock_scope_c", referenced from:
TEST_MockDocumentation_CInterface_Test::testBody() in libCppUTestExamples.a(MockDocumentationTest.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [CppUTestExamples_tests] Error 1
I was able to find the location of CppUTest's missing libgcov.a on my Mac running Lion.
/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/libgcov.a
/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/x86_64/libgcov.a
Apparently these locations aren't in the loaders default search path, so after linking the 64 bit variant to /usr/local/lib I was able to make CppUTest without a hiccup.
sudo ln -s /usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/x86_64/libgcov.a /usr/local/lib/libgcov.a
Best of luck

Resources