Iphone Splash Screen never goes away - ios

I inserted a splash screen using default.png - set to one of the pictures on the desktop and now i am trying to use a view and open it that way however the last splash screen keeps appearing. Ive deleted all the code written for it and even the image. Not just removed reference but also deleted. I dont know where xcode finds the image to display it but the old image keeps appearing so i need to change it. I restarted xcode cleaned built no change. Let me know if im missing something.

In the project navigator, click on the application target. Click on the application target under Targets. Click on the Summary tab and look at the section "iPhone / iPod Deployment Info." There you can see the launch image. You can right-click to see the file being used in the Finder or you can delete it.
Update: Using XCode 4.1, I was seeing problem even after deleting it using above approach. I had to both clean the build and delete the app from device/simulator before rerunning it.

Related

Xcode storyboard changes not showing on device or simulator

This is driving me nuts.
My app was running normally and then I don't know what I did but any changes I now make in the storyboard/ IB/ Xibs etc are not updating when I run the app either on real device or simulator. For instance, I changed the textColor of UILabel but when I run the app, the old color still shows both on device or simulator. I am using Xcode Version 7.3.1.
Please help. Thanks
This solution had worked for me:
Just delete that storyboard in which changes are not reflecting and take new storyboard instead it will start reflecting changes.
When you have the simulator open.
Click and hold down your app icon
When you seen the icons shaking and "X" in their Top Left, Click to delete it
Do the same for any other App Icons you may have showing in the Simulator Home screen
In Simulator menu at top - Click "HardWare" -- "Home" to stop icons shaking
In same menu Click "HardWare" -- "Reboot" (Wait for this to complete)
Quit Simulator from its menu "Quit Simulator"
(nb: when using device to run app, I would delete it from app as well)
Then Go back to Xcode
click in to menu "Product" -- "Clean"
Quit Xcode and open up again
Run Simulator on the iPhone Simulator Size you just cleaned out (above)
I've tried to simulate the issue you're having but unable to, however, when I have any issues on running my apps, the above seems to work.
[ Sometimes Xcode can be a bit slow, so I tend to wait a few seconds to confirm it / Xcode has actioned it, as I sometimes used the keyboard too fast for it to keep up.]
Hope this helps!
Hopefully to save someone some frustration, I had this same problem and figured out that I must have accidentally hit Command+d while trying to copy something and duplicated the scene. The duplicate was laid perfectly over the original so I couldn't tell I was editing the duplicate instead of the actual scene linked to my navigation controller. I was so focused on the problem I didn't notice the new warning for an unreachable scene in my storyboard.
When my Main.storyboard was not saving (its file icon remained grey after clean+build), I found that running git add -u and git commit -m "//your comment" in my terminal would change the Main.storyboard file icon to yellow again (not grey)
Try removing all constraints from the changes you made and then reapply them. That is what worked for me.

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.

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.

App Icon not showing up, although I have added in Xcode 5

I have added the icon as shown in the pic below but I am still not seeing the icon in my device or simulator.
This might be an XCode 5 bug that the added icons are not actually included in the app bundle, but you can work around it by going to Build Phases, expand Copy Bundle Resources, then press the "+" sign in the bottom to manually add the icon files to this category.
In addition iOS 5/6 seems to have a bug that the screen doesn't update the app icon even if the icon files are included in the bundle. To work around it (as suggested by josema.vitaminew at App Icon not changing when app version is updated in iOS 5 simulator) you can drag the app icon into a folder, then iOS will update the appearance of it.
If using the Asset Catalog, it might be worth also checking whether Images.xcassets holds all your targets as shown in the below image.
Expanding on adp's answer, if anyone has switched to asset catalogs but they stopped working, and still can't find a solution for Asset Catalog, Images.xcassets, AppIcon or LaunchImage not working, here is a reproduction of the same problem I encountered, and the solution:
I had upgraded to Xcode 6 and opened a project created by an earlier version (4 or 5, not sure) and no matter what I did, AppIcons and LaunchImages absolutely would show up when I ran the app in either iOS Simulator or the device.
I tried Xcode->Product->Clean, Xcode->Window->Organizer->Projects->Derived Data->Delete..., relaunching Xcode and the iOS Simulator, then rebuilding and relaunching the app (failed).
I tried "Reset Contents and Settings..." in iOS Simulator and even deleting ~/Library/Developer/Xcode/DerivedData//Build/Products/Debug-iphoneos and relaunching the app (failed).
I tried archiving the project, hoping that it was just an issue with the iOS Simulator, but the icon in the Organizer-Archives window was still shown as the default white square with lines, confirming that the icon would also not show on a device (a helpful trick to have when no device is handy). (failed).
I tried choosing "Don't use asset catalogs" in Target Settings and creating a new AppIcon-2 and LaunchImage-2 (failed). -this is what cost me at least 2 more hours, because this should have worked and the fact that it didn't revealed the bug in Xcode but I just couldn't see it-
I tried creating a new project from the single view template and compared all of the Info.plist settings (failed).
I tried comparing the new project's Contents.json with mine in Images.xcassets (failed).
I tried dragging the images from the left sidebar Navigator into the AppIcon image wells, hoping that they were just not being copied in a build phase for some reason (failed).
Finally in exasperation at the thought of having to create a new project just to fix the icons, I tried deleting Images.xcassets in the left sidebar Navigator and choosing "Move to Trash", then quitting Xcode and relaunching in case it cached anything. Then when I went to click the App Icons Source popup menu, it only showed "Don't use asset catalogs". I had to select it in order to bring back the "Use Asset Catalog" button. Then I was able to create new AppIcons and LaunchImages, drag images to the wells, build and launch the app in iOS Simulator and finally see icons appear properly.
So the problem appears to be with how Xcode stores Images.xcassets inside the project, and not with target membership, derived data, or anything in Images.xcassets itself. You must remove your assets file and create a fresh one, then drag images to wells by hand again.
It took me 3 hours of research to solve something that should have "just worked" and the entire process of having to manually create individually sized art assets has been so tedious over the years that it has personally cost me countless hours of busywork.
Hopefully this bug workaround helps someone avoid the frustration I went through. I can't help with the friction of manually sizing art assets, but I highly recommend the Icon Slayer website to automate that (of which I have no affiliation).
I have encountered the same problem when the project is switching from xcode5 to xcode6 . The solution is just click on the icon in the image asset,open the right panel , just tick the iOS version option in the panel,add the icons that are blank run it again ... It worked for me
I want to add my solution, where the problem is only isolated to the iPad, my app icon will not show only for iPads. After trying all the solution above, and I looked in the info.plist and found this flag that was not there before the problem with iPads. A new key/value has been added called "CFBundleIcons~ipad" without my knowledge and had nothing as it's value. Removing the key helped resolve my issue.
According to Apple Docs, the icons must be placed on the root level of the app files.
IOS/Xcode will not go under directories to search your image.
Solution is to move the images onto the root of your application i.e. where your source files are, or you can create references in the same way.
Regards
Heider
In my case, I just needed to clean and rebuild my project.
I had the same problem and after a couple of hours finally I could resolved it, copying an old -info.plist from one of my backups project and replace it, this works fine for me.
Regards
My issue ended up being I had used jpg images, rather than pngs.
For me, it was a much simpler solution than the others listed here. I had simply got the assets the wrong size. I had not paid attention to the multipliers that are necessary (e.g. 2x or 3x) and therefore the build was generating a warning for the incorrect asset sizes (which I had ignored). In my case, I corrected the image sizes and voila they appeared in the simulator.
For a macOS/OSX application, you also need to always add a 128 pixel size (and 2x), you can not only use a 512 pixel size and expect it to size down.
If your app icon has any transparency then it won't work. Check it!
I had all the images in the relevant folders and when I right clicked on the empty icon image in Images.xcassets/AppIcon and chose show in finder it would find the image correctly and show it, but for whatever reason it wasn't adding correctly to the project.
After trying a lot of different things above I simply dragged the images from finder into the AppIcon area and it worked.
If you are using cocoapods be sure to check this answer from a related question. After many lost hours, this is what fixed it for me.
https://stackoverflow.com/a/46349476/1343140
Xcode 9.3:
Open your project and add AppIcon images.
Click on general, go to "App Icon and Launch Image"
Click "App Icon resource" and add AppIcon (In my case it added AppIcon-1, so you can use that on rename that and do above step again).
In my case, I updated Build Rules > Using > to "Asset Catalog Compiler"
instead of any custom script and it worked for me.
I had this issue. Following the steps everyone provided did not help. However, it was because of my own ignorance. I had an issue with duplicate resources being created and one of the suggestions was to remove items from copy bundle resources. Well, it never mentioned that the asset folder was required to be in there so I deleted it. After fighting with this issue for 5 hours and recalling that it use to be in copy bundle resources I added it back and the app Icons worked.
Xcode copy bundle with appropriate file included.
make sure you create your appicons with an image 1024x1024
make sure you set 'app icon source' (project > general > App Icons and launch images) to the appropriate icon folder.
make sure you have not deleted the copy bundle resource for said app icon folder like i did.
cocoapods has a forum for a specific issue if all else fails.
Hope this helps.

Ios Launch Image wont delete

Hi I have created an App but changed the Default.png image halfway through now it only loads the old one but in the summary page in xcode it shows the new image as being the default but in the simulator it loads the old image and on my iphone it doesnt load anything. it also wont let me delete it and re add it it still uses the old image or no image.
I have tried
cleaning the project
deleting it off the phone and simulator
its still the same
Make sure that you have deleted any other images titled "default.png" in the Project Navigator. To do so just right-click on the image and hit delete. If it isn't allowing you to delete it, rename it to something else besides "default.png". Hope you can solve your problem!
Have you tried renaming the image to be something other that Default.png? You can see details on how to do that here: http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/App-RelatedResources/App-RelatedResources.html
Have you tried checking the plist in xcode under icons? With me it happened to have 6 icons listed.
It also helps to do a reset contents and settings on the simulator.

Resources