mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Updated Mobile (markdown)
parent
dd0c6a5cb4
commit
56661482bf
10
Mobile.md
10
Mobile.md
@ -92,7 +92,7 @@ You can deploy .app files by dragging and dropping them to the device.
|
||||
* Drag and drop the .app file to "Installed Apps" section.
|
||||
* Check the "Copy items if needed" option
|
||||
|
||||

|
||||

|
||||
|
||||
Alternatively, you can deploy application bundles to your iOS device by using the [ios-deploy](https://github.com/phonegap/ios-deploy) utility command line tool. Use ios-deploy to push the application to your device.
|
||||
|
||||
@ -133,7 +133,7 @@ If you are using Android Studio, you can use the [Gradle plugin](https://plugins
|
||||
* Launch Android Studio.
|
||||
* File > Import Project... to import the reference project from $GOPATH/src/golang.org/x/mobile/example/bind/android.
|
||||
|
||||

|
||||

|
||||
|
||||
* Open hello/build.gradle to edit the absolute path to GOPATH and GO.
|
||||
* Build and deploy the application to the device.
|
||||
@ -164,11 +164,13 @@ $ open ios/bind.xcodeproj
|
||||
```
|
||||
Drag and drop the `Hello.framework` bundle to the Xcode project. Check "Copy items if needed" if you need a different copy of the framework bundle within the Xcode otherwise. Otherwise, modifying the Go package source code and rerunning `gomobile bind` will update the hello.framework.
|
||||
|
||||

|
||||
|
||||
|
||||

|
||||
|
||||
Your project layout should look like what's shown below.
|
||||
|
||||

|
||||

|
||||
|
||||
Build and run it on the simulator or an actual device (Cmd+R). When the application launches, the label on the main view will be modified with the string returned from `GoHelloGreetings` which invokes the `hello.Greetings` function.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user