0
votes

I'm developing an Hybrid Application with IBM MobileFirst Platform Fondation 8.0, Ionic2 and Cordova. On iOS I found a problem at compilation time, the same problem happens also using the default mobile first ionic template and so I cannot to upload software on emulator.

This is my configuration:

Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.8.6  
ios-sim version: 5.0.8  
OS: Mac OS X Yosemite 
Node Version: v4.4.3 
Xcode version: Xcode 6.4 Build version 6E35b

At compile time I obtain the follow link error:

1] Undefined symbols for architecture x86_64:

std::terminate()", referenced from:
___clang_call_terminate in IBMMobileFirstPlatformFoundationHybrid(ZipArchive.o)
___cxa_begin_catch", referenced from: 
 ___clang_call_terminate in IBMMobileFirstPlatformFoundationHybrid(ZipArchive.o) 
 ___gxx_personality_v0", referenced from: 

[...]

On internet I found an advice to add in Xcode linker option: -lc++

2] Undefined symbols for architecture x86_64: _crc32", referenced from: -[ZipArchive addFileToZip:newname:] in IBMMobileFirstPlatformFoundationHybrid(ZipArchive.o) _deflate", referenced from: _zipWriteInFileInZip in IBMMobileFirstPlatformFoundationHybrid(zip.o) [...]

On internet I found an advice to add in Xcode linker option: -lc++

Resolved adding -lz into linker options.

3] duplicate symbol _llvm.cmdline in:

Torna a Casa/Plugins/cordova-plugin-mfp/IBMMobileFirstPlatformFoundationJSONStore.framework/IBMMobileFirstPlatformFoundationJSONStore(JSONStoreValidator.o)

Torna a Casa/Plugins/cordova-plugin-mfp/IBMMobileFirstPlatformFoundationJSONStore.framework/IBMMobileFirstPlatformFoundationJSONStore(JSONStoreIndexer.o)

It can be resolved removing -ObjC but removing it Application crash with the follow error:

[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance 0x7f814d2081a0 

Somewhere I found a suggest to add ENABLE_BITCODE = NO but it is already.

Thanks. Daniele

1
Please note that IBM does not officially provide any "default Ionic template".Idan Adar
Also note that your Xcode version is old and that you should upgrade to Xcode 7 at minimum.Idan Adar

1 Answers

0
votes

You need not do any of those workarounds.

  1. Upgrade your Xcode to v7.0 at the very least.
  2. Then make sure you follow these basic steps to use MobileFirst in Ionic apps: https://mobilefirstplatform.ibmcloud.com/blog/2016/07/19/integrating-mobilefirst-foundation-8-in-ionic-based-apps/