RoboVM: Workaround for enhance.co
08 Nov 2018 | bug hacking robopodsAs continue of previous post here is a workaround:
Solution is to keep static linking to Enhance
class from libconnector.a
. To achieve result lets introduce objc class that extends(and as result statically links) from Enhance
:
(all source codes at github)
Simple XCode static library project was cleated with single wrapper class:
#import <Foundation/Foundation.h>
#import "enhance.h"
@interface EnhanceW : Enhance
@end
Compile and pack everything with build.sh script into fat library libenhancew.a
and it is ready to be used with RoboVM.
Bindings needs to be manually updated to point to wrapper EnhanceW
class:
/*<annotations>*/@Library(Library.INTERNAL)
@Marshaler(NSString.AsStringMarshaler.class)
@NativeClass("EnhanceW")
/*</annotations>*/
/*<visibility>*/public/*</visibility>*/ class /*<name>*/Enhance/*</name>*/
extends /*<extends>*/NSObject/*</extends>*/
/*<implements>*//*</implements>*/ {
...
}
NP: Don’t forget to update
Comments