How to get asset by using gomobile in IOS?

87 views
Skip to first unread message

wcr434...@gmail.com

unread,
Jul 29, 2019, 10:26:36 PM7/29/19
to golang-nuts
    I use 'gomobile bind -target=ios xxx' to get an ios file xxx.framework(xx is a package with a subdirectory "assets", and there are a file 'config.json' in assets)
    And I try to get the 'config.json' asset by using asset.Open() and then get an error 'no such file or directory'(I successfully get the asset when binding android).
    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? 

Thanks.
    
Reply all
Reply to author
Forward
0 new messages