Just want to know if it will ever be possible to support slices of supported. I currently have to write a wrapper object around an array to pass it back and forth between IOS and Go.
/cc @crawshaw @hyangah
It will not be impossible and eventually it should be supported. I don't know anyone who's currently working on this problem.
yeah this is the most frustrating issue for me right now
Do you have any ideas when this will be done? What I could do?
I tried and failed using: https://golang.org/pkg/container/list/ as an alternative
+1
Would highly recommend this as currently falling short without this.
This is stopping me from using gomobile in anything worthwhile at the moment
@scisci - If you don't mind can you please share across a gist on how you handle the problem currently as said? My requirement would be to return an array/slice of custom modal class objects with 4 string properties.
hi @ioArchman, I made a quick repo here:
https://github.com/scisci/go-mobile-collection
If you think it can work for you, you will probably want to fork it and modify the render.go function to add/remove the methods you want on your collection wrapper. Feel free to make a comment on the project if you have any questions. Its pretty directly adapted from another tutorial on go generics, which you can find here http://www.onebigfluke.com/2014/12/generic-programming-go-generate.html
Keep in mind, I don't consider this a good solution. It feels hacky working with a wrapper on the objective-c/swift side, but it does work. Really would prefer something that feels more natural.
Thanks @scisci. Will look into this and try utilizing for now. Agreed on your last point too.
hi @hyangah, do you have any hints on how this would be technically implemented in case someone wanted to attempt it from outside the gomobile team?
馃憤
This is very limiting.
Is this still on the road map? I found this library and would like to use it, but this issue may be keep me from using gomobile.
It seems this is a show-stopper for many people. Are there any plans to support this?
What's the status of this issue? It has been around for quite a while. It looks like the main show stopper for many people.
CC: @hyangah @crawshaw
I just ran into this, and it would be great to be able to support slices.
Just linking the stack overflow question here : https://stackoverflow.com/questions/44382115/golang-gomobile-tool-for-cross-platform-slices-of-struct-return-type
have any update for this issue?
Will there be any news?
Currently no one is working on the x/mobile project and adding this feature is not a small project.
Not ideal but need to work around by writing a wrapper package for binding, or using what @scisci mentioned for now.
Does the project have a future?
It's community supported at this point, so its future depends on you. There are others from the community working on it, but not full time.
Anyone currently working on this? If not, could you give some pointers where to start with this?
As a really slow and dumb bypass, you could serialize the data into JSON, pass the string and unserialize it on the other side. Use this only as a last resort, though.
Most helpful comment
What's the status of this issue? It has been around for quite a while. It looks like the main show stopper for many people.
CC: @hyangah @crawshaw