Mobile Development 10.11 | webMethods Mobile SuiteWeb Help | Using webMethods Mobile Designer | Creating Mobile Application Projects | Coding a Mobile Application | Linking to External (3rd Party) Native Libraries/Frameworks | iOS
 
iOS
Note:
Under iOS, a static library should be built as a FAT version. This file should contain code for all the required architectures.
<addExtraLibs platform="ios-app">
<library name="MobileCoreServices.framework"/> <!-- using default path for
Frameworks -->
<library name="Twitter.framework"/>
<library name="libz.1.2.5.dylib"/> <!-- using default path for libraries -->
</addExtraLibs>
Here, the default paths are used to import libraries. These default paths are determined by the SDK that is currently used for the compilation, the device architecture, and the target build type. For iOS applications using an iOS 8.3 SDK, the default paths are:
For the simulator
*Frameworks:
*/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/System/Library/Frameworks
*Libraries
*/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/usr/lib
*/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.3.sdk/usr/include
For iOS 8.3 on devices
*Frameworks:
*/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks
*Libraries
*/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/Developer/SDKs/iPhoneSimulator.sdk/usr/lib
*/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/Developer/SDKs/iPhoneSimulator.sdk/usr/include
The location of the default paths cannot be altered, but custom paths for libraries and includes may be specified using the libPath and includePath attributes. Static libraries will be used if they have their libPath and includePath set directly or if they are stored in a location pre-configured as a search path within Xcode.
You can also import libraries from custom locations using the optional libPath and headerPath attributes.
<addExtraLibs platform="ios-app">
<!-- use a custom path for libraries-->
<library name="MyTestLib.1.2.dylib" libPath="/Users/libs" headerPath="/
Users/include"/>
<library name="MyStatictLib.1.2.a" libPath="/Users/libs" headerPath="/
Users/include"/>
</addExtraLibs>
The libPath attribute gives the location of the actual library/framework file itself, and the headerPath gives the location of any header files that can be used for compilation.
Note:
Both the libPath and headerPath attributes must currently be a full path (e.g., /Users/your_name/your_project/path_to_libs), not relative paths.