Golang mobile SDK

polaris · · 530 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hey everyone, I have been looking at <a href="https://github.com/golang/go/wiki/Mobile">https://github.com/golang/go/wiki/Mobile</a> and was wondering if anyone has made a cross platform library before. I have looked around online and haven&#39;t found many resources. Has anyone used this before or can direct me to examples? I was also wondering if files can be saved to file the respective OS&#39;s documents and/or temp without getting it from native code. </p> <p>Thanks! </p> <hr/>**评论:**<br/><br/>tagesticket: <pre><p>Are you looking to make a cross-platform library that can be used with SDK apps or one that can be used with pure go mobile apps? The former is a little difficult now since the gomobile tool can only <a href="https://github.com/golang/go/issues/12245" rel="nofollow">generate bindings for a single package now</a>. In addition, it <a href="https://github.com/golang/go/issues/12570" rel="nofollow">doesn&#39;t support third party types</a>. However, you could publish your code and require users to either plug into it or write wrappers for it.</p> <p>If it is for the latter, then take a look at how the x/mobile packages are written.</p> <p>Edit: I should clarify that I mean that sharing your library with third parties is difficult. Not sharing between an ios and Android app. </p></pre>condanky: <pre><p>I am looking for the first option, cross platform library that can be used with objective c and java. The other option would be using C++ but since my server is already built in Go I thought it would be a wise choice to keep with Go, but those two limitations you mentions would pose a problem since I would need to couple multiple packages together</p></pre>tagesticket: <pre><p>I haven&#39;t found it a limitation so far though. The only problem is when sharing the library with third parties. For a single app sharing code it has worked really well. The way I end up working around it is to wrap the different packages into a single interface that is exposed. Far easier than using C++. </p></pre>condanky: <pre><p>Awesome! That actually sounds pretty good to me then. I am going to give it a shot on my IOS app tonight :D. Also, have you run into any bugs or issues that are not already documented? </p></pre>
530 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传