x/mobile: handle assets on iOS #33350
Closed
Labels
Milestone
Comments
For asking questions about learning the language, see one of our forums: https://golang.org/wiki/Questions We only use this issue tracker for tracking bugs. People in the forums can explain what is happening here. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am new to IOS.
I build an IOS framework file by using gomobile.
I run gomobile bind -target=ios xxx (xxx is a package with a subdirectory "assets", and there are a file 'config.json' in assets).
In xxx package, I use asset.Open() to get the asset but it failed with log (no such file or directory). And then when I check the 'bind_iosapp.go' in gomobile, I find that it does not handle the "assets" directory at all.
What did you expect to see?
I can use my asset file in xxx.framework by using golang.
What did you see instead?
I see this tip on godoc of gomobile.(On iOS an asset is a resource stored in the application bundle. Resources can be loaded using the same relative paths). How can I get the asset file? Should I use the asset.Open API? What the path I should put the asset file into IOS is?
The text was updated successfully, but these errors were encountered: