Uikit extern for IOS

I released the first 0.0.1 version of uikit extern, which can be used to write IOSUIKit, which also includes externs such as Webkit.


Haxelib update to 0.0.2
1.New: Added QuartzCore.framework support, removed the old implementation of ios.obj.CA*.
2.Fix: Fix the analysis of Obj-C, add missing methods and variables.
3.New addition: Use haxelib run hx-ios-uikit build frameworkdir outputdir to compile the header file of ObjC as Haxe Extern.

It is mainly used for writing IOS UIKit, WebKit net network library and other functions in haxe. At the same time, it has the command line support to convert Objective-C into haxextern.

1 Like

Now, update to 0.0.3:

  1. Remove: delete code files that are no longer needed.
  2. Add: add parsing comments to API (variables and methods).
  3. Improvement: all built-in framework classes add native annotations.
  4. Fix: fix the problem of incomplete parsing of variables and methods in the protocol.
  5. Add: add the ‘events. Listenuiviewclick’ method to add click events to uiview.

If you want to directly use the IOS native API in openfl, you can refer to configuring the following parameters and add them to project.xml:

<haxelib name="hxcpp"/>
<define name="objc"/>
<define name="HXCPP_ARM64"/>
<define name="iphoneos"/>
<define name="HXCPP_CPP11"/>
<define name="file_extension" value="mm"/>
<dependency name="WebKit.framework" if="ios" />
<dependency name="Metal.framework" if="ios" />
<dependency name="libresolv.9.tbd" if="ios"/>
<dependency name="libbz2.1.0.tbd" if="ios"/>
<ios linker-flags='-ObjC' />
<ios linker-flags='-lc++' />
<ios linker-flags='-lc++abi' />
<ios linker-flags='-lsqlite3' />
<ios linker-flags='-lz' />
1 Like