HaxeFoundation / HaxeFoundation/hxcpp

EXC_BAD_ACCESS with nativeGen, iOS

Open
#721 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
330
Forks
227
Avg merge
2d 16h
Merged PRs (30d)
18

Description

Hi,
I'm trying to use nativeGen, but I've get `EXC_BAD_ACCESS` error with it.
Classes without nativeGen meta seems to works fine.

![](https://i.imgur.com/pHWkYOI.png)

Haxe code:
```
class Main implements IBridge {

public static function main():Main {
return new Main();
}

public function new () { }

public function test1():Void {
trace("hello 1");
}

public function test2():Void {
trace("hello 2");
}
}

@:nativeGen
interface IBridge {
public function test1():Void;
public function test2():Void;
}

@:nativeGen
class Api {
public static function create():IBridge return new Main();
}
```

ObjectiveC code:
```
//this works fine
src::Main api1 = src::Main_obj::main();
api1->test1();
api1->test2();

//this not works
src::IBridge *api2 = src::Api::create();
api2->test1();
api2->test2();
```

Did I miss something?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.