x/mobile: go_seq_go_to_refnum on objective-c objects is not permitted #20254
Comments
Also experiencing this. Happens to me when I manually instantiate golang's struct and then perform some actions with its internals. MygolangObject* obj = [[MygolangObject alloc] init];
[obj setProperty:value]; // fails here However it works if I introduce procedure to create objects in golang: MygolangObject* obj = MygolangFunctionToCreateObject(property_value);
[obj setProperty:value]; // works! |
I don’t understand how this works can you clearify ? With a full example ? |
I noticed the error when I implemented the generated class declared by gomobile from my Go interface which included the |
You can't use alloc/init to make a go struct.. You have to create a constructor in go code and call that. No: MyObject* obj = [[MyObject alloc] init]; Yes: func NewMyObject() *MyObject {
return &MyObject{...}
} MyObject* obj = TheFrameworkNewMyObject(); |
Change https://golang.org/cl/51870 mentions this issue: |
Change https://golang.org/cl/52012 mentions this issue: |
We've received a bug report that recently (2+ weeks at least) iOS builds have been erroring out with a strange error. Any ideas about it?
The text was updated successfully, but these errors were encountered: