How to enable multitasking on iOS with Ionic / Cordova? - ios

I've been trying to enable multitasking on my Ionic / Cordova app on iOS without success.
I've followed the steps in [CB-9161] Support iPad multitasking in iOS 9:
The three rules are:
Build your apps with the iOS 9 SDK
Support all orientations
Use Launch Storyboards
Fix for (1) is:
Use Xcode 7 (Cordova always uses the current SDK)
Fix for (2) is:
Click your Project icon in the Project Navigator
Click on your Target
Select the "General" tab
Go to the "Deployment Info" section
Select the "iPad" button segment
For "Device Orientation", select all four checkboxes (Portrait, Upside Down, Landscape Left, Landscape Right)
Fix for (3) is:
Add a new File: Launch Screen --> "Launch Screen.storyboard"
Click your Project icon in the Project Navigator
Click on your Target
Select the "General" tab
Go to the "App Icons and Launch Images" section
Select "Launch Screen.storyboard" from the "Launch Screen File" dropdown
I can see the new launch screen appearing before my app opens, but then I still can't split the view.
For your information, I'm building on a Mac with Xcode 8.2.1.
All Device Orientation boxes are ticked, and the Requires full screen is blank.
Any idea or direction to give me?

I just found the problem: I was using the cordova-plugin-ipad-multitasking plugin to solve this issue. It turns out that this plugin was preventing multitasking (by forcing the "Requires Full Screen" option I believe). Removing the plugin solved the problem.

Related

Swift 3 App has black frame on Ipad 3 [duplicate]

I am testing a new (simple) reactive native app, choosing ipad 2 as target in the simulator.
The loading screen shows full screen, but the first application screen (by react native) shows a big black border around the content. I created a completely new project, but it has the same border.
Is this a known issue? Do I need to add something to prevent this border from happening?
EDIT: I have an impression the application is built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. Probably this is causing it. So probably the first question is: how do I configure xcode that it is actually an ipad app?
Thanks in advance!
Jeroen
Go to Build Settings
Type Targeted Device Family in search bar
Select 1,2
Run the project it should resolve your issue.
The application was being built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. This was causing it. So: how do I configure xcode that it is actually an ipad app? See url below:
How to change iPhone/iPad app to iPhone only?
Now with newer version of XCode. Build Settings -> Targeted Device Family -> Select Universal.
I had this issues and solved it with this way,
Go to XCode, and General tab
In App Icons and Launch Image sections,
2.1. Click the dropdown Launch Image Source, and a pop up
will come out, click Migrate
2.2. Click the dropdown Launch Screen File, and select the very first one
Go to Build Settings Type Targeted Device Family in search bar Select 1,2
I had this issues after updating assets for AppIcons and SplashScreen
Hope it helps!

iPhone full height isn't being used

I inherited an iOS app and I've found that the full height isn't being used. Here's a pic on the iPhone 6:
Seems like it's stuck on an iPhone 4 resolution.
iOS deployment target: 7.1
Any ideas how to make the height fit to full screen for the entire app? Thank you!
The default launch screen is not utilizing the full size of the phone. You may need to create a launch screen first.
To create the launch screen go to File and then New File. Under the
User Interface tab select Launch Screen and save it.
From here, in your project file, select Targets and then Deployment
Info. Under app icons and images, change the Launch Main Screen to
main.
This should fix your issue!
To resolve the issue, follow the below steps:
Navigate to project settings
Under "App Icons and Launch Images" click on "Use Asset Catalog"
Select "Migrate" on the popup that appears.
This should fix the issue.
Here is a link to the reference where I've previously found this answer: Black bars appear in app

React Native: Unwanted Black border on ipad 2 simulation

I am testing a new (simple) reactive native app, choosing ipad 2 as target in the simulator.
The loading screen shows full screen, but the first application screen (by react native) shows a big black border around the content. I created a completely new project, but it has the same border.
Is this a known issue? Do I need to add something to prevent this border from happening?
EDIT: I have an impression the application is built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. Probably this is causing it. So probably the first question is: how do I configure xcode that it is actually an ipad app?
Thanks in advance!
Jeroen
Go to Build Settings
Type Targeted Device Family in search bar
Select 1,2
Run the project it should resolve your issue.
The application was being built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. This was causing it. So: how do I configure xcode that it is actually an ipad app? See url below:
How to change iPhone/iPad app to iPhone only?
Now with newer version of XCode. Build Settings -> Targeted Device Family -> Select Universal.
I had this issues and solved it with this way,
Go to XCode, and General tab
In App Icons and Launch Image sections,
2.1. Click the dropdown Launch Image Source, and a pop up
will come out, click Migrate
2.2. Click the dropdown Launch Screen File, and select the very first one
Go to Build Settings Type Targeted Device Family in search bar Select 1,2
I had this issues after updating assets for AppIcons and SplashScreen
Hope it helps!

View 3,5" Display on all devices with Xcode 6

I Running my app on Xcode6, i have a problem with the screen view with 4", 4,7", 5" (iPhone5, iPhone6 and 6+). it seems to display the screen of 3,5" (iPhone4)
println(UIScreen.mainScreen().bounds)
output:
display (0.0,0.0,320.0,480.0)
And it display like that on the phone :
How can i solve ?
Just add Launch Images for all devices and remove the Launch Screen File in project settings - it will fix issue.
In your project navigator, under Targets click on General tab.
Inside that there will be Launch Images Source click on Use casset catalog. It will prompt for migrate & cancel. Click on migrate it will solve your issue.

iOS Universal app Default images

In an universal app when I place launch images for iPhone the same is taken for iPad and warning is shown, I have give name like Default.png (iPhone) Default#2x.png (retina) and Default~ipad.png (for iPad). Please help me to fix this issue. Thanks in advance!
Go to XCode, click on the project name in the Project Navigator on the left, click on your app target in the list in the middle of the screen and choose the 'Summary' tab.
Now drag (from finder) and drop your images on the App Icons for both the iPhone and the iPad version.
XCode will take care of the proper naming and placing of your icon files.

Resources