github.com/coming-chat/gomobile@v0.0.0-20220601074111-56995f7d7aba/example/bind/ios/README (about)

     1  1. Use gomobile bind to bind the golang.org/x/mobile/example/bind/hello package.
     2     The following command will create an XCFramework in the current directory.
     3  
     4    $ gomobile bind -target=ios golang.org/x/mobile/example/bind/hello
     5  
     6  2. Open the Xcode project by double clicking on bind.xcodeproj.
     7     The project will not build - ViewController.m calls a function from the hello
     8     package so requires the Hello.xcframework that gomobile bind command created
     9     in Step 1.
    10  
    11  3. Drag-and-drop Hello.xcframework from the desktop to the project navigation window.
    12     This will automatically include the Hello.xcframework into the project.
    13  
    14  4. Build.