Phonegap application getting crash when entered in background mode - ios

I'm working on application in ios using PhoneGap(1.9).Following are the issue's i'm facing with quiet few hours...
1)My application is getting crash when application enters in background mode.
2)Also,how to disable splash screen.I have deleted default.png image,but still it is showing splash screen with phonegap logo followed by white blank screen.
Thanks & regards.

I came across this question because I'm having the same problem with background mode.
However, regarding splash screen, I can tell you that you have to replace the specific file for the screen size. It generates images for all of the screen sizes and you have to replace them in the built folder, not just the original project folder (at least I seem to have to do this).
The built folder is at the path that should look like /MyProject/platforms/ios/www/res/screen/ios/[screen_specific_splash_screens]
Similarly I had to do the same for the icons:
/MyProject/platforms/ios/www/res/icon/ios/[screen_specific_icons]
Docs for these files (talks about which screen sizes):
http://docs.phonegap.com/en/4.0.0/config_ref_images.md.html

Related

iOS app missing splash screen, new black borders and ui glitching after visualstudio 8.10.10 and xcode 13 update

Just updated to Xcode 13 and Visualstudio Mac to 8.10.10. Since then my app:
Wont display the splash screen.
The app is cropped at top and bottom.
Ui is acting generally weird.
Now I have read old threads on similar problems and adding the Launch screen interface file base name. in the info.plist file does make the app cover the whole screen.
I have tried switching splash screens and change location. But it's just black. I don't use a storyboard for the splash and instead provide several different resolutions, which have worked fine for several years.
The UI is glitching like the loader picture, and several different ui elements where colors are provided are "cut" in the middle showing two colors when it should switch.
I have read the release notes for xcode13 but haven't found anything related that would break the whole UI.
The interface glitching and no splash screen I can't seem to find a solution for. Everything worked fine before the update.
What could be the problem? Some setting in the info.plist, a checkbox in the storyboard?
I'm still new to Xamarin and iOS development and greatly accept suggestions.
Let me know if I can clarify anything.
Thanks
iOS load glitch picture
According to your statement, you are not using a storyboard, so you need to replace the Launch Screen with a LaunchImage, then check the LaunchImage file (if it does not exist, you need to create it yourself) and add all strictly standardized pictures inside.

App icon showing before Splash screen image on Mobile App

I recently starting seeing the icon selected for the App display before the image selected for Mobile App. Please advise if any one notice similar thing with latest iOS update and how to avoid displaying the icon.
Thanks
This was discussed here it's an old feature which is now on by default. You should customize the XIB to get a different look for the splash screen. We might add additional default configurations in the future based on RFE's.

Two Different Launch Screens Shown for on iPhone X on Initialization

Just updated a Cordova app to contain an iPhone X LaunchImage and now in emulation, I'm seeing a properly sized launch image, which then a second later shows another that is too large and expands off the page.
I can't figure out why a launch image/splash screen is being displayed twice? In device initialization the navigator.splashscreen invokes hide and then never calls show so it isn't happening in the code. I placed launch images in Xcode and am using the cordova-plugin-splashscreen plugin. From the docs I assumed using Xcode or adding them to the config.xml were equivalent regarding splashscreen legacy assets, but now I'm confused. This only occurs on iPhone X and not on iPhone 5s, 6, 7, 8, or iPad.
Okay so the first launch image display is the one displayed by the system, and the second is the one displayed by the splashscreen plugin. The issue was solved by updating to cordova-plugin-splashscreen v5.0.2, which contains the bug fix.
In addition to #mtpultz solution above, I also found old splash screen files that needed to be deleted and a few new ones added.
For anyone sharing my above issue or having issues on an Ionic app related to this, after compiling I found OLD splash screen files in this folder: platforms/ios/myApp/Images/xcassets/LaunchImage.launchimage/ - also check the LaunchStoryboard.imageset folder and ensure all your images are correct. I found two files still showing the default cordova icon (Default-2436h.png and Default-Landscape-2436h.png) - I created two new image files of those Width/Height dimensions and copied over those two files. Everything is working now.
The problem is that you splascreen hidden early and iOS change to native splash screen, one posible solution is increase SplashScreenDelay in config.xml <preference name="SplashScreenDelay" value="100000"/> or manually hide splash screen when you app charge all components.

iOS 9 xCode 7 built app displays black rectangle instead of splash screen

I know this question may seem like a duplicate of a few existing ones but its not.
I am struggling with this issue where universal (iPad/iPhone) application does not display the splash screen anymore.
Before upgrading to iOS 9 and Xcode 7, no such issues were present. After upgrading no changes were made to the splash screen in any way.
Tech data relevant to the question:
Supported devices are iPad (landscape only) and iPhone
(portrait/landscape)
I use "Launch Screen.xib" that has an UIImageView with size classes and
constraints set up so that it's always full screen.
I have added all splash screen images in image assets (except iPad
Portrait ones)
I use Xcode Version 7.0.1 (7A1001) and iOS 9.0.2
This issue does not happen on an iPad
The wrong splash screen looks like this on iPhone 5s:
This is made in portrait mode, so there are white squares on top and on bottom of this "black square".
I was struggling with this issue yesterday but I managed to fix it by renaming my launch screen to "LaunchScreen.xib" (without the space). But this morning the issue re-appeared.
Things I've tried:
Removing and creating LaunchScreen.xib again with and without space
Creating LaunchScreen.storyboard file instead of xib
Adding #2x and #3x versions of image used in LaunchScreen.xib
Removing/adding/replacing images in image assets
Cleaning, build cleaning and even deleted derived data
Restarting device, reinstalling app, relaunching without building and many other solutions that I could think of.
Nothing helped, so maybe someone fixed a similar issue already and can lead me to the right direction.
EDIT 1
So I renamed my LaunchScreen.xib image used from "Default.png" to "DefaultSplash.png". This instantly fixed all issues on iPhone. But now I have a new problem - iPad splashscreen is now black. If I set the LaunchScreen image to some other image used in project, the Ipad displays it as splashscreen without any problems, but neither Default.png nor DefaultSplash.png can be used on ipad now. This is really weird issue.
In my case the images in the "Launch Screen.xib" weren't displaying. I had to rename them and reset the new names in the nib file to make it work.
So I fixed the issue like this:
Since I renamed the file LaunchScreen.xib, it fixed an issue on iPhone but caused a similar problem on iPad. Since then, I cannot use the same image file name for the same xib (i.e. if image "Default.png" failed, it cannot be used anyomre... Bug?). So I created two files, LaunchScreen.xib and LaunchScreen~iphone.xib with separate image files for each. Now it works okay.
Seems ugly and buggy but it works.
There is a change in Xcode7 iOS 9 onwards. They have modified Launchscreen(Black screen we will get).If you change deployment target means you can see the previous launch screen. Only empty view controller is present so we have make changes on it.
As per requirement in assets add images in imagecassets.
It may sound stupid but something related to this scenario may happen:
If you hook any outlet and then break it by changing the custom class you will get this black screen behavior without any warning, instead of the typical crash from any non launch storyboard/scenes this will lead to a black screen before the app start.

Xcode launch images and full screen issues

I'm testing my app on a physical device (using a provisioning profile). The device is an iPad Air 2 with iOS version 8.1.
My App wasn't appearing full screen, so I managed to get it full screen following the advice to add Default-568h#2x.png to the project, as per this thread:
Why [UIScreen mainScreen].bounds] is not returning full screen size?
However, upon adding it to images.xcassets, I see this:
Question 1) Why is Xcode complaining about a Missing Default-568h#2x.png launch image when it's clearly there?
So anyway, this made my app start full screen but the launch image was not appearing. Instead, just a plain black screen was showing up during app load.
Question 2) Why wasn't the launch image showing up?
I deleted all the launch images that were eventually added in an attempt to get something working (because this is iOS and trial and error seems to work way more than a logical process). So at the moment, no launch images exist in images.xcassets. However, my app still runs full screen. I removed the already installed app from the device (by making the icon wiggle and tapping the 'X'), selecting Product>Clean from Xcode and building again. No luck. App still appears full screen on future runs. I then attempted to follow the answer by EliSKoren on this thread:
Launch image doesn't update
However, the only reference I could find to launch images were for simulators, not physical devices.
Question 3) Trying really hard not to loose it ... What's happening!? Why is my app still appearing full screen even though I've removed launch images?
This is because Xcode provides placeholders for different devices and respective to them being retina or non retina and device sizes.
As you can see your image is on a placeholder as "unassigned", So xcode cant figure it out which device it is for, hence the image is not showing.
To correct this here is a screenshot --
EDIT
Please migrate to get the launch image assigned to the assets from here
Click on Launch Image Sources -- Use assets catalogue and the pop up will show and then click on migrate.
As you can see in the attribute inspector, you can choose which device launch image you want and it will give you that.
Check by clicking the place holder what image size or resolution it requires and then you just drag and drop those images from finder.
Hope this helps
Edit Final
As it turned out OP was using cMake for the xcode project and by default xcode had already a launch image asset JSON installed which had a wrong configuration, Thus creating another Launch Image wasnt overriding the existing JSON as for cmake the earlier config was being loaded. And by default Universal devices was selected but the Device orientation was totally unchecked.
Checking device orientation after getting a clean version of the project and letting Xcode decide its default Launch Image assets and filling up images in that JSON fixed the issue with OP. Further discussions are mentioned in the link in the comments.

Resources