Different Default.png files for different targets in one project - ios

I'm trying to set up a second target in my project, but when I drag the Default*.png files over to the Launch Images section of the target it tells me its going to overwrite the Default.png from my original target.
How do we add different launch images for different targets?
Before you answer, please understand I'm not looking for how to include different general files or images in different targets. I understand that, I'm specifically dealing with a problem regarding the Default.png launch images when I drag them onto the target pane's Launch Images section.

In your info.plist for each project, you create a entry for UILaunchImageFile pointing to the launch image.

Related

Is there a way to add all app icons in one go (one time) instead of adding all of them individually one by one?

There are 17 different sizes app icons which I've to add manually one by one in Xcode. Is there any way I can just copy and paste all icons somewhere inside project and have Xcode accept them?
Possible?
Yes, there are apps which generates app icons for all device and create .appiconset file which you can directly drag and drop in .xcassets folder in Xcode

How to set separate LaunchScreen storyboards for different targets in Xcode

I have an Xcode project with multiple targets. Basically each target is a customized version of my app for different clients. I've tried customizing the Launch Screen File based on user defined fields in each target's build settings and then using that variable in the info.plist to determine which Launch Screen. I'd prefer to maintain one info.plist using user defined build settings if possible.
You can also pick a different LaunchScreen on a per configuration basis, even within a single target. Just set a variable in your .xcconfig files like
LAUNCHSCREEN_NAME=launchscreen1
And then in a single Info.plist you can set
UILaunchStoryboardName to $(LAUNCHSCREEN_NAME)
At build time, the selected configuration will determine which Launch Screen is used.
By LaunchScreen you mean initial views rather than launch screen (iOS 8+ style launch storyboard that replaced static launch images). Correct?
EDIT: The OP indeed meant launch storyboards. These can be individually set to each targets as they are specified in the form of Info.plist option and each target can have its own Info.plist file.

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.

how to remove xcode ios default launch image

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."

ios - should I have app icons named icon-114#2x.png

I am working on some app icons and my understanding is that if the standard app icon is 57x57, then the retina display version of it is 114x114
But I am coming across some things that are named like this:
icon-114#2x.png
Is that a mistake? Or should that be there?
Thanks!
To add icons do this...
Put all your different icon images onto your desktop (or some folder that isn't part of the project).
Delete any icon images from your project.
Go to the project build summary page.
Drag each image to its respective slot.
Done.
You don't need to worry about names or anything. Xcode will rename them for you and copy them into your project.

Resources