diff --git a/haxelib.json b/haxelib.json index 3f6db7a..44f1fe6 100644 --- a/haxelib.json +++ b/haxelib.json @@ -4,7 +4,7 @@ "license": "BSD", "tags": ["hyperfiction", "macro","shoebox","openfl"], "description": "Essential macros for native extensions", - "version": "1.0.1", - "releasenote": "Initial release", + "version": "1.0.2", + "releasenote": "@iOS meta", "contributors": ["shoebox"] } \ No newline at end of file diff --git a/src/org/shoebox/macros/MacroMirrors.hx b/src/org/shoebox/macros/MacroMirrors.hx index 77b0deb..955683f 100644 --- a/src/org/shoebox/macros/MacroMirrors.hx +++ b/src/org/shoebox/macros/MacroMirrors.hx @@ -51,7 +51,7 @@ class MacroMirrors{ * @return void */ static public function build( ) : Array{ - + //Fields var aFields : Array = Context.getBuildFields( ); var oClass : Null> = Context.getLocalClass( ); @@ -70,7 +70,7 @@ class MacroMirrors{ for( field in aFields.copy( ) ){ // - aMetas = [ for( m in field.meta ) if( m.name == "CPP" || m.name == "JNI" ) m ]; + aMetas = [ for( m in field.meta ) if( m.name == "CPP" || m.name == "JNI" || m.name == "IOS" ) m ]; // if( aMetas.length == 0 ) @@ -79,7 +79,6 @@ class MacroMirrors{ // for(m in aMetas) { - if(m.name == "CPP" && Context.defined("cpp")) { aFields.push( _cpp( @@ -96,6 +95,14 @@ class MacroMirrors{ ( m.params.length > 1 ) ? _getString( m.params[ 1 ] ) : field.name ) ); } + else if( m.name == "IOS" && Context.defined("ios")) + { + aFields.push( _cpp( + field , + ( m.params.length > 0 ) ? _getString( m.params[ 0 ] ) : oClass.get( ).module, + ( m.params.length > 1 ) ? _getString( m.params[ 1 ] ) : field.name + ) ); + } }