Xamarin app shows black screen on ios11 - ios

An application, which works perfectly in simulator on iOS10 shows black screen after slash screen on iOS 11.
Also on real device it shows splash and then black screen, but here I don't have a spare device with iOS10 to confirm it will work differently on older iOS.
Any hint, what could be done to get it running on ios11?
Clarification: I had this application running on ios11 too, but when I needed to fix something in the app, and started Xamarin Studio after long time (since Jan'17), there were a lot of component updates. And now the App shows black screen after splash...

Try to do real clean (delete bin & obj folder) for each project & right click on solution & choose clean {your solution name}. After it is done, right click on solution again & choose rebuild {your solution name}. After all done, try to debug on iOS11 simulator/ device.
If option no.1 is not working, maybe you can try to do breakpoint in finished launching method to see is it everything is working.

I figured this out after a few hours.
My issue was at the Info.plist, below what I did on Visual studio for windows:
Right click on the info.plist and select Open with
Choose iOS manifest editor
Click on the tab visual effect
Go to the Launch Images
Make sure the option Source and Launch Screen are set up properlly
Clean your entire solution
Rebuild project
Try again
in my case Source was set as none.
enter image description here

What worked for me:
Step 1. Replaced the info.plist with that from a fresh new project.
Step 2. Edit only those fields in the file to its original content
which matters (like package name, permissions, etc.)
I am suspecting the below piece of code in info.plist to have caused the issue:
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
</dict>

Related

LaunchScreen IOS Xamarin Forms Not Showing

I followed some tutorials on how to display my launch screen on ios. but it is still not showing. what I am missing?. All I see is the default blue screen.
https://learn.microsoft.com/en-us/xamarin/ios/app-fundamentals/images-icons/launch-screens?tabs=macos
This is what I have
What you did is enough to change the LaunchScreen of a Xamarin.iOS app. The steps are:
1.Create a new LaunchScreen1.Storyboard and add your custom view there.
2.Change the Launch Screen option in info.plist as you did in the screenshot in the question.
I would suggest you to clean and rebuild your project, and then run it again. Also you can try to uninstall the app in your simulator first and then run your new project.
I uploaded a sample project here and you can check it.

iOS launch screen will not stop showing the launchscreen.xib

I've made images, an asset file for all the devices I need to support, no errors saying wrong size etc. I have it set up as follows:
Also I have the asset file set up as follows:
I've read loads of guides and questions on here regarding this but none of the answers solved my problem. No matter what, it just keeps showing the launchscreen.xib which is set as grey. I've tried rebuilding, cleaning, relaunching the program, everything and it still shows the same grey screen.
Make sure that there is no "Launch screen interface file base name" key in your Info.plist (the opposite of what Aamir has suggested)
Delete the app from the device/simulator (in case of simulator I'd suggest also to "Reset Content and Settings")
Clean the build folder (in Xcode, open "Product" menu, press & hold the alt button, select the "Clean Build Folder..." option)
Run again
Please add key Launch screen interface file base name in info.plist and give name of LaunchScreen in its value, hopefully it solves your problem.
For reference I have attached following screenshot.

Launch Screen not displaying iOS 8

I'm trying to get the Launch screen to display instead I get the default black screen.
I remember I've had this issue in the past and is something really silly but I can't remember what it is.
I have a LaunchScreen.xib. I've set in my target -> info to use LaunchScreen and not image catalog. I am running iOS 8 and using Xcode 6.1. I tried on all iPhone simulators and iPhone 4s.
I can't think what more info to give than that.
For those who are still looking for another answer here's what worked for us:
Our launch xib only contains an imageView in the middle of the view. For some reason the image never showed (but the view was there, checked it with changing the background color).
The solution was to move the image file out of the image catalog and just drop it in the project as a standalone file. Pretty strange considering when we tried other images from the catalog they appeared correctly but not this one. Anyway, I hope this helps someone!
I had the same issue.
Turned out that I had earlier tried to attach a viewcontroller file with the launchscreen. To fix:
Go to launch screen
Click Connections Inspector in right pane
Remove all connections.
Accoring to #doctorBroctor: also go to the File's Owner tab and remove the connections there.
Go to your launch screen
Go to file inspector
Check the checkbox for "Use as Launch Screen"
I have tried with:
Deleted Launch Screen File.
Tapped on Use Asset Catalog in Launch Image Source and added Splash screen Images as desired in the image asset.
Deleted Previous Project on Simulator or Device. Clear the Project.
Run Again and it is showing now.
One reason for why you might experience the black screen instead of your launch screen is that the .xib file might not get copied in your build phase. At least that was my issue that caused my app to show the black screen even though I had done the steps you describe.
So, double check that your LaunchScreen.xib (or whatever it is named) appears in:
Your target -> Build Phases -> Copy Bundle Resources
And if not, make sure to add it. That resolved my issue.
For me the problem was that I hadn't selected the LaunchScreen.storyboard in the General tab of the project settings.
I've experienced the same issue. The solution for me was simply delete the app, reboot the device, then reinstall it. I think iOS caches the Launchscreen, and this cache is not invalidated every time when it should be.
I had the same issue in iOS 9 as well. Deleting the old app in simulator alone is not enough. Simulator has to be quit launched. It worked for me.
I fix it by select the "is Initial View Controller" in storyboard.
Make sure to delete the installed app from the emulator. Then run the app again from xcode (product->clean, product->run).
That worked for me.
I've looked at all the above answers, it helped a bit. Especially the answer by Suragch put me in right direction.
The LaunchScreen.storyboard isn't showing up, even after applying simple background colour to the view and removing the image.
Firstly, I cannot see the "LaunchScreen.storyboard" as shown in the image
This was because, some reason the LaunchScreen.storyboard wasn't added to the build Target.
Solution: Ensure the LaunchScreen.storyboard is included to the build Target.
Also, Choose the LaunchScreen.storyboard from the drop down as shown in above pic.
I hope it helps someone!
I found this old post 'cause my launch screen WAS working, then it stopped. I thrashed around for a good while and then realized this, undocumented problem:
If your launch XIB or storyboard file has a UIImageView with an image whose name contains a space, the entire screen won't load.
I only had a centered UIImageView in my LaunchScreen.xib that contained an image (.png file), and had the same black screen showing.
I removed the image (the .png file) from the project, added it again with new name, and used the new image.
Make sure to use empty Launch Screen File, then Xcode would use Launch Image Source.
Make sure you have "is initial View Controller" checked in interface builder.
I tried pretty much everything else but this finally fixed the problem and now it works in simulator as well as the device.
New feature in the iOS 8 SDK: you can now use a storyboard scene in place of your app’s launch images.
Create a blank storyboard file named LaunchScreen.storyboard.
Go to your target settings and, on the General tab, select the storyboard as your Launch Screen File. Xcode will add a corresponding UILaunchStoryboardName key to your app’s Info.plist. When this key is present, Xcode will prioritize it over any launch images you might have set.
Add a view controller scene to the storyboard. Add some subviews to the scene and position them with constraints. When you launch the app on a device, the OS should use the scene as the launch screen.
For more information check out this blog post by Ole Begemann "Replacing Launch Images With Storyboards".
Reset Simulator working for me
For iOS 14 and newer:
Device > Erase All Contents and Settings...
For iOS 11 and newer:
Hardware > Erase All Contents and Settings...
For previous versions:
Simulator > Reset Content and Settings...
Your launch image should be a PNG. A JPEG may work under certain targets, but you should use PNG anyway.

IOS 7 Black bars at the top and bottom (running 3.5 only)

I seem to have some across and interesting issue that I can not resolve. I have a app written in XCode 5 running ios 7.1.
The app was working perfectly until I moved the folder location of the project. When I ran up the app on my phone the app worked perfectly but now I no longer get a app icon, launch image and the whole thing seems to only run in 3.5" mode as well, even on my phone (5S). I get black bars at the top and bottom.
I have renamed the folder that the project now sits under back to the original name but this issue has not gone away.
I was wondering if anybody else has ever come across this??
Cheers
Geraint
It seems your pbxproject got a bit messed up (maybe you had absolute paths used ? )
Select your target in Xcode.
Under general, App Icons , re-assign the launch images.
The clean and rebuild your project.
Check this link out as well :
Black bars showing when running app on iOS 7 (4 inch retina display)
I was able to resolve the issue manually, seems like it is a bug with Xcode for now and I will file a radar report.
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.

Xcode 4 Icon Problem !

My problem is:
Icon specified in the Info.plist not found under the top level app wrapper: Icon.png (-19007)
I've done exactly what Apple documentation says and I'm still getting this warning!
I have everything set, everything is in PNG, the size is correct, Info.plist has added Icon files with 6 items (Icon.png, Icon#2x.png, Icon-72.png, Icon-Small-50.png, Icon-Small.png, Icon-Small#2x.png)
I have tried all the ways which I found in different website but none of these solution work for me.
Anyone please help me? I didn't get this warning while I'm doing Debug build but this comes out when I'm doing Distribution build.
Previously I never encounter this problem.
Make sure that your icon is in the root of your project. Or you can select the app icon you want to use from the target's summary tab and Xcode will automatically copy the selected icon to the root of the project.
I had iphone and ipad icon.
First I removed ipad target.
I solved it, editing info.plist file manually and deleting no existing reference.
All very simple and quick, but difficult to find the solution.

Resources