how to remove xcode ios default launch image - ios

I want to remove my app's launch image.
I deleted the two launch image files from my project folder:
Default-Landscape#2x~ipad.png
and
Default-Portrai#2x~ipad.png
And now get a build errors:
"Can't find .../Default-Landscape#2x~ipad.png
copypng failed"

Click on your project in the Project Navigator, then go to "General" and scroll down to "Launch Images"
then you can click on each Image you specified to deleted it.
If you see the source as "LaunchImage" click on the scroll list and select "Don't use Asset Catalogs".
Then you will see the first screen shot where you can change/delete the launch images.
NOTE: That being said, I agree with the previous answer that you need Launch Images to improve the user experience, and give the user the feeling that the app is running and its not only a black screen!

Your app is trying to copy these pngs to the bundle. Since you've deleted them from the folder in Finder, Xcode doesn't know that it shouldn't try to copy them.
Choose your project in Project Navigator, then select your application's target, then select the Build Phases section and remove those two images from the list of Copy Bundle Resources.
Here's a snapshot of a sample project for reference:

Please read this: https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/LaunchImages.html
You need to provide at least one launch image. If you have removed the current launch image, please provide a new one.
Apple recommends that your launch image should improve user experience:
"Design a launch image that is identical to the first screen of the
app, except for:
Text. The launch image is static, so any text you display in it won’t
be localized. UI elements that might change. If you include elements
that might look different when the app finishes launching, users can
experience an unpleasant flash between the launch image and the first
app screen."

Related

Add Launch Screen Image instead of using LaunchScreens.storyboard for iOS

I'm doing my UI for my iOS apps programmatically. The only things that is left is the LaunchScreen.storyboard where I didn't find a way around using it, yet.
Strangely I can't find much about that in the internet.
Is there a way to get rid of it and use an AssetSet instead?
That's (the highlighted file) what I want to get rid of
Since the question included "use a View or and UIImage instead?"
From Apple's docs...
Static Launch Screen Images
It’s best to use an Xcode storyboard for your launch screen, but you can provide a set of static images if necessary.
Reference page, including a list of required image sizes: https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/launch-screen/
Note: To use images instead of a storyboard...
In Xcode open your Assets catalog (or create a new one), right-click in the assets section and select App Icons & Launch Images -> New iOS Launch Image and it will create the proper template. Also go to project General settings and select Launch Images Source - Use Asset Catalog...
There is noway to accomplish what you want , you have to supply a storyboard file for the launch screen in plist , if you want to customize go to the layout and add image or anything you want , there is no place to configure a programmatically UIView for that
Here a short description of the steps based on the answer from https://stackoverflow.com/users/6257435/donmag:
create a new AssetSet: + -> AppIcons & Launch Images -> New iOS Launch Image
Go to your Target Settings to General
Under App Icons and Launch Images clear the field Launch Screen File and select your LaunchScreen Asset set that you just created at Launch Images Source
You might have to delete the App from the device/simulator that you test it on and the new Launch Image should show up on start

Why is my iOs launcher and appicon not applying?

I need some help figuring out why I can't get a launch icon and appicon to apply to my project. I am running xcode Version 6.3.2. Note: another developer has already applied an appicon The following I have tried:
I created an asset catalog and added new app icon and launcher image via the plus sign button in the lower left of the asset window.
In the general settings of the app I clicked on "Use Asset Catalog" for both the launcher icon source and app icon source. I selected my asset catalog and it prompts me to migrate images, which I did.
My icon and launch icon are not applying even though I have followed these steps. How do I figure out why they are not applying?
EDIT:
All of the slots for the different devices are filled with a .png image. Now that I look at it I wonder if this could be the issue- when I select use asset catalog it migrates my images which creates a new subset of launch icons and all of those slots are empty. With that subset selected my project builds fine. If I select my original subset with the icons in the slots the build fails with message - The app icon set named "AppIcon" did not have any applicable content. Same for the launch icons.
Delete the app from the simulator or device and try again. Due to caching optimizations, sometimes resources are not updated if the name doesn't change.
You might also need to clean your project and rebuild it. Select Clean from the Product menu in Xcode.
It's a long shot, but your Asset Catalog may not be included in your target. Select the catalog file, open the File Inspector and check the Target Membership. Although I believe #Dave Batton has provided the correct answer.

Launch Image not showing up in iOS application (using Images.xcassets)

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

iOS Xcode 6 LaunchImage The launch image set named "LaunchImage" did not have any applicable content

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.

Missing default-568h#2x launch image, launch image won't display

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

Resources