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

4

1 回答 1

1

您似乎正在尝试运行本地预览。ObjectiveC 只能在 ios 设备或模拟器上运行。你可以添加extern(ios)你的类,这样你就只能在 ios 上编译它。然后,您还需要在预览中实现 .net 的一种实现。是一个外国代码的例子。

于 2017-05-03T19:16:56.893 回答