diff --git a/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm b/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm index 18c90ebbfc14..edcd92178a39 100644 --- a/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm +++ b/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm @@ -73,6 +73,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UIApplication sharedApplication] setStatusBarHidden:true]; + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } + // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_viewController.view); cocos2d::Director::getInstance()->setOpenGLView(glview); diff --git a/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm b/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm index 18c90ebbfc14..6c5700be8441 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm +++ b/templates/js-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm @@ -73,6 +73,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UIApplication sharedApplication] setStatusBarHidden:true]; + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } + // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_viewController.view); cocos2d::Director::getInstance()->setOpenGLView(glview); diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm index 18c90ebbfc14..8116adeba98d 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm +++ b/templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/ios/AppController.mm @@ -72,6 +72,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [window makeKeyAndVisible]; [[UIApplication sharedApplication] setStatusBarHidden:true]; + + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)_viewController.view); diff --git a/tests/cpp-empty-test/proj.ios/AppController.mm b/tests/cpp-empty-test/proj.ios/AppController.mm index a167b06ced88..a3db2abcd16e 100644 --- a/tests/cpp-empty-test/proj.ios/AppController.mm +++ b/tests/cpp-empty-test/proj.ios/AppController.mm @@ -78,6 +78,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UIApplication sharedApplication] setStatusBarHidden: YES]; + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } + // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLViewImpl *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView); cocos2d::Director::getInstance()->setOpenGLView(glview); diff --git a/tests/game-controller-test/proj.ios/AppController.mm b/tests/game-controller-test/proj.ios/AppController.mm index 3a15b4b7feac..e87c4264b79b 100644 --- a/tests/game-controller-test/proj.ios/AppController.mm +++ b/tests/game-controller-test/proj.ios/AppController.mm @@ -76,6 +76,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UIApplication sharedApplication] setStatusBarHidden: YES]; #endif + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } + // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView); cocos2d::Director::getInstance()->setOpenGLView(glview); diff --git a/tests/js-tests/project/proj.ios/AppController.mm b/tests/js-tests/project/proj.ios/AppController.mm index 03f6e8443b86..fc429acffa7d 100644 --- a/tests/js-tests/project/proj.ios/AppController.mm +++ b/tests/js-tests/project/proj.ios/AppController.mm @@ -82,6 +82,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( #if !defined(CC_TARGET_OS_TVOS) [[UIApplication sharedApplication] setStatusBarHidden: YES]; #endif + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView); diff --git a/tests/lua-empty-test/project/proj.ios/AppController.mm b/tests/lua-empty-test/project/proj.ios/AppController.mm index 12172a818a0e..5f463bba4cc6 100644 --- a/tests/lua-empty-test/project/proj.ios/AppController.mm +++ b/tests/lua-empty-test/project/proj.ios/AppController.mm @@ -76,6 +76,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UIApplication sharedApplication] setStatusBarHidden: YES]; + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } + // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView); cocos2d::Director::getInstance()->setOpenGLView(glview); diff --git a/tests/lua-game-controller-test/project/proj.ios/AppController.mm b/tests/lua-game-controller-test/project/proj.ios/AppController.mm index 4a46196a5488..06e9c1ee9535 100644 --- a/tests/lua-game-controller-test/project/proj.ios/AppController.mm +++ b/tests/lua-game-controller-test/project/proj.ios/AppController.mm @@ -73,6 +73,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UIApplication sharedApplication] setStatusBarHidden: YES]; + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } + // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView); cocos2d::Director::getInstance()->setOpenGLView(glview); diff --git a/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm b/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm index 22818380c230..260767392cc8 100644 --- a/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm +++ b/tests/lua-tests/project/proj.ios_mac/ios/AppController.mm @@ -84,6 +84,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UIApplication sharedApplication] setStatusBarHidden: YES]; #endif + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView); diff --git a/tests/performance-tests/proj.ios/AppController.mm b/tests/performance-tests/proj.ios/AppController.mm index b1e54524e224..b8765f41fe66 100644 --- a/tests/performance-tests/proj.ios/AppController.mm +++ b/tests/performance-tests/proj.ios/AppController.mm @@ -81,6 +81,12 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( [[UIApplication sharedApplication] setStatusBarHidden:true]; + //Launching the app with the arguments -NSAllowsDefaultLineBreakStrategy NO to force back to the old behavior. + if ( [[UIDevice currentDevice].systemVersion floatValue] >= 13.0f) + { + [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"NSAllowsDefaultLineBreakStrategy"]; + } + // IMPORTANT: Setting the GLView should be done after creating the RootViewController cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView(eaglView); cocos2d::Director::getInstance()->setOpenGLView(glview);