From ba94b8edf80fb73c931ebe2b1c6bacd2934411a5 Mon Sep 17 00:00:00 2001 From: Christian Howe Date: Tue, 13 Dec 2016 07:37:13 -0600 Subject: [PATCH] Fix Travis iOS build --- .travis.yml | 9 ++++++++- src/platform/ios/mod.rs | 11 +++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index deeb1c39..2ea1a518 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,16 @@ addons: packages: - libxxf86vm-dev +install: + - | + if [ $TRAVIS_OS_NAME = osx ]; then + sh ~/rust-installer/rustup.sh -y --disable-sudo --prefix=/Users/travis/rust \ + --add-target=x86_64-apple-ios + fi + script: - cargo build --verbose - - [ $TRAVIS_OS_NAME = osx ] && cargo build --target x86_64-apple-ios + - if [ $TRAVIS_OS_NAME = osx ]; then cargo build --target x86_64-apple-ios --verbose; fi - cargo test --verbose os: diff --git a/src/platform/ios/mod.rs b/src/platform/ios/mod.rs index 547a9623..4948cc8e 100644 --- a/src/platform/ios/mod.rs +++ b/src/platform/ios/mod.rs @@ -31,7 +31,7 @@ //! //! Compile project and then drag resulting .a into Xcode project. Add glutin.h to xcode. //! -//! ```c +//! ```ignore //! void start_glutin_app(); //! ``` //! @@ -59,7 +59,6 @@ //! Also note that app will not receive Closed event if suspended, it will be SIGKILL'ed #![cfg(target_os = "ios")] -#![deny(warnings)] use std::collections::VecDeque; use std::ptr; @@ -300,8 +299,8 @@ impl Window { } } - let app_delegate_class = Class::get("AppDelegate").unwrap(); - let mut decl = ClassDecl::new("UIResponder", app_delegate_class).unwrap(); + let ui_responder = Class::get("UIResponder").unwrap(); + let mut decl = ClassDecl::new("AppDelegate", ui_responder).unwrap(); unsafe { decl.add_method(sel!(application:didFinishLaunchingWithOptions:), @@ -346,8 +345,8 @@ impl Window { } fn create_view_class() { - let main_vc_class = Class::get("MainViewController").unwrap(); - let decl = ClassDecl::new("UIViewController", main_vc_class).unwrap(); + let ui_view_controller = Class::get("UIViewController").unwrap(); + let decl = ClassDecl::new("MainViewController", ui_view_controller).unwrap(); decl.register(); }