iOS : Icon occasionally fails to transfer to device - ios

Does anyone know why this happens? My project uses a local network, so it doesn't make sense to test it on just one device, so I want to install it on 20. The way I do this is I build it once and then load it onto each device using the organizer. However, about every 3 or 4 transfers, the icon fails to transfer with it, and instead I am left with a white icon only on the home screen. If I launch it, and then check the multitask bar, the icon is there (and it is shown faded out on the home screen while the multitask bar is active). If I transfer the app again, the icon comes just fine. The devices are all 32 GB iPad 2.
The dimensions of the icon are correct (72x72 RGB24), and the name of the icon is correct (Icon-72.png). I noticed that there are two entries in my info plist: Icon files and Icon files (iOS 5). My deployment target is 5.0, so should I erase the first one? This program is big and takes a long time to transfer and install so I dislike loading it twice. What can I do?

The App icons (retina and normal) need to be placed on the root of your application.
To fix the problem I found that the best is to start the process from scratch:
remove the icons from your project
clean the build
delete Derived Data (Organizer->Projects) *
remove the icons from the app info plist file (Icon files and Icon files iOS5).
drag the icons into the Summary App Icon section
Build
* I do not know if this step is needed but I do it anyway while troubleshooting.

In newer versions of Xcode it doesn't seem to be happening. So I will chalk it up to a quirk in Xcode.

Related

iOS: new image on LaunchScreen.storyboard not showing updating app

this is my problem.
I have an app with version v1.0.0. I have built a splash screen from Storyboard, its name is LaunchScreen.storyboard and it has three elements: a background image, a header image and a footer image. In the General Settings into the Project, in "App Icons and Launch Images" section, in subsection "Launch Screen File" is set like "LaunchScreen". it works perfect!
Well, in this new version (v1.1.0) I had to replace the first image of header image for another one in png. So, when I simulate the update app process (Run app v1.0.0, then run app v1.1.0), and every element show but header image not. If I uninstall the v1.0.0 app and install app v1.1.0 is not showing the new image. The only way that I can see the new image in app update process is if I refresh the device (long press Home button + Power Button until restart device) and install directly the version v1.1.0.
I need to show this new header image in that app update process. Anyone have idea or a solution for that? or if is a bug of iOS anyone know the oficial reference to justify this?
Thanks!
I have noticed the same behavior in Xcode 8.2.1: After editing a subImage superimposed on a launchScreen storyboard, the modified subImage does not get reflected in subsequent app runs, either in the sim or on a physical device.
Rebooting the sim sometimes works, sometimes I have to delete the subImage, rename it (because just re adding it in Interface Builder does not do the trick) and then replace it with IB.
I chalk this up to an Xcode bug.
It is probably a cached image for which the rules regarding flushing that cache are not disclosed. It would be very nice the system would recognize that the data changed and a new image should be cached. This applies to be sim and to physical devices.

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.

React Native: Unwanted Black border on ipad 2 simulation

I am testing a new (simple) reactive native app, choosing ipad 2 as target in the simulator.
The loading screen shows full screen, but the first application screen (by react native) shows a big black border around the content. I created a completely new project, but it has the same border.
Is this a known issue? Do I need to add something to prevent this border from happening?
EDIT: I have an impression the application is built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. Probably this is causing it. So probably the first question is: how do I configure xcode that it is actually an ipad app?
Thanks in advance!
Jeroen
Go to Build Settings
Type Targeted Device Family in search bar
Select 1,2
Run the project it should resolve your issue.
The application was being built as an iphone app, but deployed/displayed to an ipad. I see the 1x / 2x button. This was causing it. So: how do I configure xcode that it is actually an ipad app? See url below:
How to change iPhone/iPad app to iPhone only?
Now with newer version of XCode. Build Settings -> Targeted Device Family -> Select Universal.
I had this issues and solved it with this way,
Go to XCode, and General tab
In App Icons and Launch Image sections,
2.1. Click the dropdown Launch Image Source, and a pop up
will come out, click Migrate
2.2. Click the dropdown Launch Screen File, and select the very first one
Go to Build Settings Type Targeted Device Family in search bar Select 1,2
I had this issues after updating assets for AppIcons and SplashScreen
Hope it helps!

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.

Launch Images in iOS 7 with Xcode 5

I've been setting my own names on launch images for my apps in the Info.plist like
with the following images in bundle (with correct dimensions, 320x480 px for default.png and 640x960 px for default#2x.png etc.)
this have been working great prior to iOS 7 and Xcode 5. Now when I look in the General tab for the corresponding target in Xcode 5 my launch image files get mixed up from other targets in my project, which worries me, even though I haven't seen wrong launch image files when actually running the target. Should I be worried? The chosen images isn't in the build target so I should be fine there, but is there a risk of getting a blank image instead?
My main question is, can I use my default setup in Info.plist (that help auto detected respective launch images) for iOS 7, and if so, what should I name the corresponding launch images (now that there's the "iOS 6.1 and Prior" options as well with different dimensions)? This especially applies for the iPad Portrait Retina (iOS 7) that has new dimensions. The auto detection on iPad Portrait Non-Retina (iOS 7) refers to an image, not in the build target, that has the right dimensions. Again, when running a simulator with iPad Retina and iOS 7.0 the correct launch image shows.
Anden, I ran into the same problem today while adding a new target to the half dozen I already had that were set up in the same way that you set up yours.
I decided to use that "Use Asset Catalog" button, which took some work to set up, but has simplified things greatly in the end:
1- (optional) Delete (remove references only) the icon and launch image files from your project. I don't think you need the files to be in the project navigator anymore.
2- Choose your primary target, go to "General" and "App Icons" (as you showed above).
3- Press the "Use Asset Catalog" button, with the "Migrate Launch Images" checked as well.
4- This creates a file called "Images.xcassets" in your project navigator. Go there, and find the App Icon and Launch Image catalogs corresponding with the particular target. You can drag and drop image files from the finder into the slots in the catalog, and rename the icon/default groups from the list on the left.
5- Once you've got the image slots filled up, go back to the "General" for each target, and press the "Use Asset Catalog" button again for each target. Instead of creating a new xcassets file for each, you can store all the launch images and icon files in the same xcassets file.
I think it is a bug in xcode 5. I filed a bug, perhaps you should too (bugreport.apple.com). Make Apple aware things like this are not working well, and are taking our time and nerves.

Resources