0

I'm adding a native iOS module to my fuse project, and tagging the native methods with [Foreign(Language.ObjC)], like this:

public class MyModuleIOS
{
    [Foreign(Language.ObjC)]
    public void Init(string token)
    @{
        // ...
    @}
}    

When I run fuse preview from command line I get the following build error:

ERROR: Failed to compile .NET type MyModuleIOS: Statement type not supported in bytecode backend: ExternScope

Thanks for any suggestions for how to fix this

Bjørn Egil
  • 2,398
  • 1
  • 20
  • 22

1 Answers1

1

It seems you are trying to run the local preview. ObjectiveC will only run on ios device or simulator. You can add extern(ios) on your class so you only compile it on ios. Then you will also neeed one implementation for .net in preview though. Here is an example of foreign code.

bondehagen
  • 890
  • 1
  • 8
  • 11