I set up the launch images as so, XCode forced me to rename the images which is ok, but for some reason when I run iOS Simulator, there is no launch image displayed. Instead, a black screen is displayed. Previously I had the warning Missing default-568h#2x launch image which went away when I clicked add on the menu that was popping up when I expanded the warning. However the launch images still do not display when launching the app. I have tried resetting all content, cleaning, building, and then running again, but nothing seems to be working. Additionally, XCode did not rename any of my images to default568h#2x so I'm assuming that is a problem, even after I clicked add. I do have launch image set to default in info.plist.
Any suggestions?
I meet the same problem, but the result comes out because i changed the Launch Image Source Setting.
Here is how I fix it:
Go to the target in the Project Editor
Select the General tab
Find the "APP Icons and Launch Images" section and click "Launch Images Source"
If the current state is "Use Asset Catalog", select "Migrate".
Problem Solved.
Xcode 11 outputs this error if you move your Info.plist file and forget to tell Xcode about the new location in Build Settings.
The Info.plist contains metadata about your LaunchScreen storyboard/image. Apparently, Xcode assumes you want to use a launch image (and did not provide one) when it cannot find the target's Info.plist file. Updating the Info.plist location in Build Settings fixes this disconnect:
Select the Project file (top item) in the sidebar.
Select the Target in the Project editor.
Select the Build Settings tab in the Project editor.
Scroll/search for "plist", or "INFOPLIST_FILE" to be exact.
Double-click the plist entry to edit it, and type in the correct location for the Info.plist file.
(e.g. if you moved it to a Resources folder within the MyGreatApp project root folder, set the value to "MyGreatApp/Resources/Info.plist")
This is not the OP's situation (they intended to use launch images), but I thought I would add this breadcrumb for anyone like me who got this error after moving an Info.plist file.
I am guessing but just try following steps :
Go to the launch image path in your resources .
Copy paste your image and give the same name default-568h#2x
Try to clean and build the project .
Then also if you are not seeing the image then just simply delete the application and install it again .
No need to name a file like that.
Just doing this solves the problem :
1. Add launch images inside assets by right click / add new files.
By doing this, you will add launge images set.
2. Then set all of these launge images.
To see the sizes do these : Select the image then you can check the size on the property inspector at right. Like this:
If (as opposed to all the previous answers) you're not interested in any launch image at all (i.e. the error appeared after deleting it), the following suffices:
1. Product > Clean
2. Product > Build
I am using Xcode 11.3.1, and I just did a project clean up, this warning is gone:
β§ + β + K to Clean Build Folder.
Close Xcode.
Re-open Xcode.
Re-build project.
None of the suggestions worked, but this did
Delete the targets that cause the error
Recreate the target
Problem solved π
Clean project
Build project
Toggle issue navigator window
In the issue navigator window there will be a warning message saying Missing Default-568h#2x.png
Click that issue
The dialog will come up prompting to add the missing file
Hitting add will place the file (all black in colour) into the root of the project
Issue solved
Related
I just downloaded Xcode 11 Beta 4 and when I want to build my Swift 4 project gives me:
UILaunchImages has been deprecated, use launch storyboards instead
How can I fix it?
Please read the release notes for Xcode 11 beta 4:
Known Issues
Your app might fail to build if it contains a launch image. The failure message resembles the following: βThe launch image set named <image set name> did not have any applicable content.β Launch images are deprecated and should be removed; use a launch storyboard or .xib file instead. (50210495)
Workaround: Clear the build setting ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME.
Xcode -> File -> New -> File... -> Launch Screen.
Select Target -> Build Settings -> Search "LaunchImage" & delete string from (Debug and Release) Asset Catalog Launch Image Set Name.
Select "Assets.xcassets" & remove LaunchImage from it.
Build & Run.......enjoy
add a new storyboard to your project
name it LaunchScreen.storyboard and save
add a new view controller to your LaunchScreen, add an imageView, and
reference your launch image
make LaunchScreen.storyboard your initial view controller in
the Attributes Inspector (make sure to uncheck the old initial view
controller)
in your General settings (App Icons and Launch Images) in the Launch Screen File dropdown, select LaunchScreen
After testing, to get rid of compiler warnings, delete the LaunchImage folder in Images.xcassets, and in Build Settings, delete LaunchImage (in Debug and Release) from Asset Catalog Launch Image Set Name.
In my case a couple things were happening...
I had in my Info.plist file UILaunchImages which was causing this warning. After deleting it, the warning went away.
On the General tab of my ProjectTraget the Launch Screen File was empty. So, adding my launch screen file there from the drop down made my app launch correctly again (This was my main storyboard file).
I hope this helps anyone else having the same warning, and also their app looking letter-boxed.
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.
I'm having some trouble getting my launch image to show up in my application.
I have created all the static image files in the Images.xcassets file in an asset set called "LaunchImage".
I noticed that my project also contains a LaunchScreen.xib file (which was automatically created by Xcode).
This .xib file appears when I run the application on my iPhone6 device. It doesn't appear in the simulator for iPhone4s (which makes sense, since xib launch screen is only for iOS 8 +).
I want to use the static images that I have created since they fall under the Apple Guidelines and go with my application. However, I haven't had any luck at getting it to show up.
I noticed under the project settings that there is a section called App Icons and Launch Images. I see how the .xib is connected by the Launch Screen File option I assume.
However, there is an option called Launch Image Sources. What does this do?
I found this: http://matthewpalmer.net/blog/2014/09/10/iphone-6-plus-launch-image-adaptive-mode/. However, it didn't explain anything about the Launch Image Source option.
There is a button next to the Launch Image Sources called "Use Asset Catalog". When I click it, it just says Migrate Launch Images to an asset catalog. Your existing launch images will be copied into a new image set. Choose an asset catalog to use: .
This is confusing to me because I've already created my asset catalog and I definitely don't want it to overwrite images.xcassets file. So, how do I link this to the Launch Images Asset Set that I already have created? Also what "existing launch images" is it referring to will be copied into a new image set?
Thank you!
UPDATE 1
So, I tried the migrate images option and chose to the new set option. This caused a new image set to be created which I deleted. However, the name left in the Launch Image Source was set to LaunchImage which somehow connected to the image set that contains my launch images. It did mess up my LaunchImage set -- the images were set to unassigned. I deleted them and dragged my files to the appropriate box in the LaunchImage asset set. However, when I run the application it still doesn't work. =( Launch Image doesn't show up.
I even removed the information that was in Launch Screen File (which my assumption was the setting that connects to the .xib file). Still, somehow the .xib file appears on my iPhone6 device. =(
Any ideas what's going on?
I had this problem. I tested on simulator. I left the "Launch screen file" blank and removed the line about the "launch screen file" inside the plist. I restarted Xcode. Nothing. In my case in was not black it was white. Xcode 7 target ios 9.
i read this one as well: Launch Image does not show up in my iOS App
The launch image only showed up when i deleted the app from the simulator and run the app again.
I finally figured it out!
So, in your project settings, go to the section that says: App Icons and Launch Images
Remove the information found in Launch Screen File if you do not want to use .xib file.
Then, in Launch Image Source, Choose to migrate and if you have already created your LaunchImage file and added the images to it. Then click the asset catalog that shows up. The name of the one that contains your Launch Images.
This will create a new Launch-Image2 in your image set. To use the one you already have created, click the drop-down menu next to Launch Image Source. And you should see your other Launch Image set. Choose it. Then re-build your application and run it. You should see your Launch Image. =)
Hope this helps!
Note: it won't delete your images that you already have in the asset catalog. It will just create a new LaunchImage asset set.
Reference: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/StoringAppIconsandLaunchImagesinanAssetCatalog.html
This is too important !
should be empty ! Launch Screen File
Working solution. Saved my time and hope it will save yours as well.
Make sure your images are accurate size according to Apple Guidelines.
Make sure, You will select only one option , either launch screen file or Launch Image Source. You can find these two options in Project build settings -> General
Clean and build.
Recommended solution step by step:
Create splash image assets (name as LaunchImage) there in
Image.assests folder.
Select LaunchImage asset in Launch Image Source option.
And Clear the text in Launch screen File option.
Clean and build.
Below is the reference image for right configuration:
I had this problem in XCode 9.4.1, turned out to be caused by the assets folder not being included in the Bundle Resources.
Select the project, then your target. Go to 'Build Phases' and open up 'Copy Bundle Resources'. If the .xcassets group you want to use isn't listed then just drag it in from the file browser.
Worked for me...
After few hours of unclear answers:
1) go to setting app General section in xCode.
2) Scroll down to App Icons and Launch Images.
3) Clear Launch Screen File (just leave it blank)
4) Set Launch Images Source to LaunchImage (remember to create them in Assets.xcassets)
Now app will use images You set in LaunchImage.
Had a similar issue today. Tried to let xCode create automatically the Asset, but it was always unassigned.
The solution was to create manually the Launch Image in the ImageAsset and assign the files for his respective resolution.
It looks like xCode created a different type of Launch Image asset, so it didn't
recognized the asset (v8.3.2)
Solved! I've tried a lot. The problem was that the launch image shows in simulator and didn't show in real device. I got a Storyboard with UIImageView in it. Strange was that old images worked, and images, that i did add recently not. First i thought that this is a problem with assets. No. Than i checked color profiles and did a lot of tries with different profiles: left-working image, right-not working. Didn't help.
Then i started google and found this thread
Main solutions from here:
1) Didn't helped for me.
Change image property of my launch image using Preview app: [ Tools
--> Assign Profile... --> ColorSync Profile: <> ]
2) Helped
Even deleting the app and re-installing from XCode doesn't work.
However, changing the bundle ID does work. With no other changes, the
existing bundle ID shows no images, but the new bundle ID shows them
all correctly. I'm doing that as a temporary work-around, since a
previous post in this thread suggests that installing the builds via
TestFlight doesn't encounter the problem.
3)
I did three things (the first two on their own didn't do it, but may have assisted the third which did work)
1) Copied all of the images to the root directory (same location as
xcode puts the images)
2) Created a folder in Images.xcassets and put the images in there.
3) The images in the launchScreen.xib were originally called
imageName.png. This was changed to just imageName (remove the file
extension.
After the third thing the images appeared. I don't know if either of
the first two steps are required, but hopefully it will help someone.
4) Helps but old and rude
Taking the images out of the asset catalog fixed the problem for me.
I just added the #1x, #2x, and #3x image used on my launch screen to
the project the old way and it seems to be working fine. Trying to
confirm it through TestFlight now, but iTunes Connect isn't behaving
at the moment.
I thought this is an iPhone cash problem. So you don't need to warn about it thus the image will show when installing with testFlight. After this conclusion i did next and that worked:
1) Uninstall app
2) Reboot phone
3) Build app to the phone
I just figured this out. My launch image was not showing up, I get a white screen when launching on a device (iPhone 6, 7+) or testFlight. Fix: Renamed "Landing_screen.png" to just "Landing_screen" removing .png part. https://stackoverflow.com/a/43592662/3445278
Close the simulator & open it again worked for me
I have face same issue.
In splash screen image is not displaying but other thing like label and view are showing up correctly .
To fix issue first verify all of the above settings in your code. If nothing works then Restart the iPhone solves my problem.
Hope it is helpful to someone here (Happy to help) :)
I've just spent a little while on the same problem, but found the answer, and put it into a Youtube Tutorial
Create your ArtWork Image. 1024x1024 that conforms to Apple's requirements for Appicons and LaunchImages
Set up a folder to hold your newly created Assets.xcassets
Open Asset Creator Pro and drag your new image into it.
Do your app icons first, putting the created file into your new folder.
Using the SAME image, select LaunchImages next, and "Append" the created set into the new, existing Assets.xcassets
Open your XCode project, and delete the eisting - probably empty - Assets.xcassets folder. If you have other files in it, then just
delete the Appicons and Launchimages sets.
Drag your newly created Assets into the XCode project, making sure you set the option to Copy the files. Sometimes this can be off!
beware.
check what's in the cassets, you should see your new images.
Make sure the line Launch Screen File in your Project settings is BLANK.
Make sure your LaunchScreen storyboard is BLANK. Anything in there and the images wont load.
test it.
Watch the video.
should be empty ! Launch Screen File
it worked for me
Its working fine for set Launch Image:
Go to setting app General section in xCode.
Scroll down to App Icons and Launch Images.
Check Launch Screen File in settings page
Set Launch Images Source to LaunchImage as storyboard file(Set image in Launch screen) (or) You create a own launch image Xib file.
Note:
Now app will use images You set in LaunchImage.
Close the simulator & open it again worked for me
Clean Build Folder
Close your xcode and reopen it
Adjust constrain for the UIImageview
Check Launch Screen File in settings page
I deleted my original launchImage image set.
Then went to "App Icons and Launch Images" in the project section of Xcode.
I de-selected "Launch Image Source" and then reselected it. I get the "Migrate launch images to an asset catalog". I choose an asset catalog and "Migrate" and then a launchImage image set opens up.
I add my files, but then I get a red compile warning.
I checked the Plist - no launchimage in there at all.
Previously, I got yellow warnings about Ambiguous content and the files being the wrong sizes - I check and rechecked - they were the right sizes!
How do I fix?
EDIT: I found this in my files. Do I just trash the selected folder?
Go to the project explorer and select the project. Click "Build Phases". At the bottom there's a section called "Copy Bundle Resources." I suspect you'll find two images.xcassets files there and, if so, remove one by highlighting and clicking the minus icon (there are legitimate reasons to have two, or more, but you'd have purposefully done that so it's outside the scope of this answer). On the remaining one add your images to the LaunchImage.
Your reason for adding two isn't clear so I'll add that if you are using multiple targets you can have different images.xcassets files for each target (xcode adds multiples by default). However, if most assets are the same and you don't want to manage multiples, you can use the same in all targets and write add a script to build phases to copy the different assets, like the launch image, over at compile time. This is also done in build phases: add a phase that runs a script then a copy (cp) line to copy images. Needless to say you should do this with very few assets: I use it for launch images and app icons.
Edited to add: there's a new scheme where launch images are in storyboards and/or xib's. I'm assuming that you're not using it because you said you were using the older launch images but, if you are, then just put your launch image in the storyboard/xib launch image file.
Hi as per your question please visit the below link:
EDIT:
I have tried to regenerate the issue which you are facing. please check your 'images.xcassets' you need to have both 'Launchimage' and 'AppIcon' in 'images.xcassets'. If you don't have either 'LaunchImage' or 'AppIcon' it will generate error.
Based on the image you have added it seems you have deleted image.xcassets from application but not moved to thrash.
You can follow the below image to set launch screen images.
1.) Before entering launch image in images.xcassets
2.) images.xcassets without launch screen image
3.) Add launch screen image in images.xcassets
4.) Set launch image in launch Image screen
This will help you to add new 'image.xcassets' in your application.
http://www.intertech.com/Blog/xcode-assets-xcassets/
5.) Folder structure after adding new image xcasset
6.) Launched the application after deleting and adding new image assets.
This will help you if you have removed just launch image from your 'images.xcassets' not your images.xcassets.
How to use Image.xcassets:
To set launch screen image and other images in your application.
https://www.youtube.com/watch?v=_36Y6rDcKP0&list=PLXCowKcXAVgrCe2Lezv0acRf4adQLshv2
Hope this will be more helpful.
I'm trying to define launch images. Probably only one image is missing.
I'm following the instructions from this site Create launch images in different sizes for different devices
So I have 7 images with the required size.
But when I drag them to LaonchImages sheet it requires 8 images...the one that is missing is called "iPhone Portrait 2x" and according to the details pane I found its size 640x960 and I added it.
sill I'm getting the error - and the compilation fails...
Select your project, go to Build Settings, search for AppIcon-2 and change it into AppIcon and you will be fine.
Select project file and then select target in question. In General tab there is in app icons and launch images launch image source should be "Use assets category"
My LaunchImage file had been deleted and I had to add a new one in my xcassets.
Go to your images.xcassets. If there is no LaunchImage listed on the left, click the plus button at the bottom and navigate to new iOS launch image.
The Launch Image asset has been deprecated. I deleted the Launch Image asset but then I was getting compilation error.
In order to fix the error, the Launch Image asset catalog name has to be removed from Build Settings.
I could solve this by going to Build Settings of my target, searching for word "launch", then removing (using Backspace) "Asset Catalog Launch Image Set Name", that was set to LaunchImage.
In my case the problem was solved by removing the reference to Images.xcassets and then add it to the project again.
I'm not sure what caused the problem, but it may have something to do with the fact that I moved the assets "file" from one Xcode group to another, which would be weird as the file's path remained the same, but that was also the only thing I did with the file...
We had our Asset Catalog Launch Image Set Name set in our project target. After removing this from the target and instead setting it in our project it compiled fine.
For me the problem occurred when i have added a new watch target. Even though i had AppIcon set i was getting the error, i fixed it by removing the reference of asset catalog and added it back, you can do it by deleting the reference and add it back.
This generally happens when you have accidentally deleted Assets.xcassets. You need to follow the below steps.
Right click on Assets.xcassets and select Show File
Inspector.
Check if the desired target has been checked under
Target Membership.
If its unchecked, Please select the target for which you need the
Assets to be used.
Clean and Build the App.
With xcode 11.3.1 you have to select the project file and after that, select the target in question, and in the General tab under "App Icons and Launch Images" select as shown bellow.