How to correctly generate bindings for iOS static library( .a library )

referring this support query
i also implemented this method step by step for applovin advertisement.

  • generating java bindings for a static library.

  • adding -ObjC flag here

and as well as in xcode

  • Linking the generated jar file to moe module

  • And using the library in a test project just for applovinn initialisation ( testing )

  • and i also added the desired frameworks in my xcode (reference applovin documentation)

shown here ,

  • running this test project in iphone device(any device) gives warning as well as crash

       `/moe/natj/natj/src/main/native/natj/ObjCRuntime.mm:1481
    

WARNING: Binding class refers to class ��*a��ݺ�p, but it can not be found. Fallback to indirect super class.
org.moe.natj.objc.ObjCException: +[NSObject initializeSdk]: unrecognized selector sent to class 0x1b0a83ea0
at apple.uikit.c.UIKit.UIApplicationMain(Native Method)
at com.phonato.s.farkel.Main.main(Main.java:20)`

Please fix this and help me out .
Thank you.

Dear Manjul_Kadyan,

it seems like the AppLovin SDK is not linked correctly. In Xcode please try to add the following to “Other linker flags”:

-force_load
path/to/libAppLovinSdk.a

Dear Kristóf Liliom ,

This resolved my issue.
Thanks a lot for your help.

Dear Kristóf Liliom ,
Please tell me the way to generate bindings for static library in MOE 1.3 update.
what kind of .h file i should import as Import Headers.

Screen Shot 2016-12-19 at 12.18.32 PM

Dear Manjul_Kadyan,

usually we import frameworks like this:

#import <frameworkname/umbrellaheader.h>

In most cases the umbrella header has the same name as the framework for convenience, thus in AppLovinSDK’s case the following should work:

#import <AppLovinSDK/AppLovinSDK.h>

Best Regards,
Kristóf

Dear Kristóf Liliom ,

Java binding for the same is generated well but before generating bindings app was launching fine but now it gives error
java.lang.UnsatisfiedLinkError: No implementation found for void com.badlogic.gdx.backends.iosrobovm.IOSGLES20.init() (tried Java_com_badlogic_gdx_backends_iosrobovm_IOSGLES20_init and Java_com_badlogic_gdx_backends_iosrobovm_IOSGLES20_init__)
at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.init(Native Method)
at com.badlogic.gdx.backends.iosrobovm.IOSGLES20.(IOSGLES20.java:28)
at com.badlogic.gdx.backends.iosmoe.IOSGraphics.init(IOSGraphics.java:118)
at com.badlogic.gdx.backends.iosmoe.IOSApplication.didFinishLaunching(IOSApplication.java:162)
at com.badlogic.gdx.backends.iosmoe.IOSApplication$Delegate.applicationDidFinishLaunchingWithOptions(IOSApplication.java:75)
at com.phonato.farkle.IOSMoeLauncher.applicationDidFinishLaunchingWithOptions(IOSMoeLauncher.java:158)
at apple.uikit.c.UIKit.UIApplicationMain(Native Method)
at com.phonato.farkle.IOSMoeLauncher.main(IOSMoeLauncher.java:132)

BUILD SUCCESSFUL
Screen Shot 2016-12-20 at 12.25.57 PM

Dear Kristóf Liliom ,
Can you please also suggest me a procedure to generate static library (.a ) with header files bindings in updated MOE 1.3

Dear Manjul_Kadyan,

please check out this blogpost, it will most likely fix your issue: https://multi-os-engine.org/blog/2016-12-18-using-libgdx-with-moe-1.3.0-beta-1/

Best Regards,
Kristóf