From d596e6205c4f8af9bd1e9aa77cf535ea4a1e4e5d Mon Sep 17 00:00:00 2001 From: Maxime Graulich <maxime.graulich@gmail.com> Date: Thu, 27 Mar 2014 14:15:53 +0000 Subject: [PATCH] iOS: fix background issue --- contrib/mobile/iOS/Onelab/AppDelegate.mm | 1 + .../mobile/iOS/Onelab/ModelViewController.mm | 3 ++- contrib/mobile/iOS/Onelab/Onelab-Info.plist | 17 +++-------------- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/contrib/mobile/iOS/Onelab/AppDelegate.mm b/contrib/mobile/iOS/Onelab/AppDelegate.mm index e8ae08fe07..f5d6e9b54a 100644 --- a/contrib/mobile/iOS/Onelab/AppDelegate.mm +++ b/contrib/mobile/iOS/Onelab/AppDelegate.mm @@ -50,6 +50,7 @@ - (void)applicationDidBecomeActive:(UIApplication *)application { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + [[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil]; } - (void)applicationWillTerminate:(UIApplication *)application diff --git a/contrib/mobile/iOS/Onelab/ModelViewController.mm b/contrib/mobile/iOS/Onelab/ModelViewController.mm index c655f9a668..4cf7f76334 100644 --- a/contrib/mobile/iOS/Onelab/ModelViewController.mm +++ b/contrib/mobile/iOS/Onelab/ModelViewController.mm @@ -304,7 +304,8 @@ - (void)requestRender { - [glView drawView]; + if([[UIApplication sharedApplication] applicationState] == UIApplicationStateActive) + [glView drawView]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation diff --git a/contrib/mobile/iOS/Onelab/Onelab-Info.plist b/contrib/mobile/iOS/Onelab/Onelab-Info.plist index 3677b436e5..1aeceaf6cd 100644 --- a/contrib/mobile/iOS/Onelab/Onelab-Info.plist +++ b/contrib/mobile/iOS/Onelab/Onelab-Info.plist @@ -11,9 +11,6 @@ <key>CFBundleIconFiles</key> <array> <string>icon_app_iphone_retina</string> - <string>icon_app_ipad_61</string> - <string>ic_launcher.png</string> - <string>ic_launcher_retina.png</string> </array> </dict> </dict> @@ -24,12 +21,8 @@ <key>CFBundleIconFiles</key> <array> <string>icon_app_ipad</string> - <string>icon_app_iphone_61</string> <string>icon_app_ipad_retina</string> <string>icon_app_iphone_retina</string> - <string>icon_app_ipad_61</string> - <string>ic_launcher.png</string> - <string>ic_launcher_retina.png</string> </array> </dict> </dict> @@ -42,17 +35,13 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.0</string> + <string>1.0.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>1.0</string> + <string>1.0.0</string> <key>LSRequiresIPhoneOS</key> <true/> - <key>UIBackgroundModes</key> - <array> - <string></string> - </array> <key>UIFileSharingEnabled</key> <true/> <key>UIMainStoryboardFile</key> @@ -61,7 +50,7 @@ <string>iPadStoryboard</string> <key>UIRequiredDeviceCapabilities</key> <array> - <string>armv7</string> + <string>opengles-1</string> </array> <key>UISupportedInterfaceOrientations</key> <array> -- GitLab