From 7c8fdf69f51a58bc6b23ade61b3769b956a09280 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sun, 31 Mar 2019 11:37:27 +0200 Subject: [PATCH] README.md: add iOS/tvOS setup instructions Signed-off-by: Elias Naur --- README.md | 24 ++++++++++++++++++- .../ios/gophers/Assets.xcassets/Contents.json | 6 ----- 2 files changed, 23 insertions(+), 7 deletions(-) delete mode 100644 apps/gophers/ios/gophers/Assets.xcassets/Contents.json diff --git a/README.md b/README.md index 57c67836..9b20d9a3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ window management, input and GPU drawing. For Linux you need Wayland and the `wayland-client`, `wayland-egl`, `wayland-cursor`, and `xkbcommon` development packages. -Xcode is required for macOS and iOS. +Xcode is required for macOS, iOS, tvOS. For Windows you need the ANGLE drivers for emulating OpenGL ES. You can build ANGLE yourself or use [mine](https://drive.google.com/file/d/1k2950mHNtR2iwhweHS1rJ7reChTa3rki/view?usp=sharing). @@ -43,6 +43,28 @@ The gio tool passes command line arguments to os.Args at runtime: $ go run gioui.org/cmd/gio -target android .. -token +## iOS/tvOS + +To build a Gio program for iOS or tvOS you need a macOS machine with Xcode installed. + +The gio tool can produce a framework ready to include in an Xcode project. For example, + + $ go run gioui.org/cmd/gio -target ios gioui.org/apps/gophers + +outputs Gophers.framework with the demo program built for iOS. For tvOS, use `-target tvos`: + + $ go run gioui.org/cmd/gio -target tvos gioui.org/apps/gophers + +To run the demo on an iOS device, use the sample Xcode project: + + $ git clone https://git.sr.ht/~eliasnaur/gio + $ cd gio/apps + $ go run gioui.org/cmd/gio -target ios -o gophers/ios/gophers/Gophers.framework ./gophers + $ open gophers/ios/gophers.xcodeproj/ + +You need to provide a valid bundle identifier and set up code signing in Xcode to run the demo +on a device. + ## License Dual-licensed under MIT or the [UNLICENSE](http://unlicense.org). diff --git a/apps/gophers/ios/gophers/Assets.xcassets/Contents.json b/apps/gophers/ios/gophers/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164c..00000000 --- a/apps/gophers/ios/gophers/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file