Why Xcode runs the older version of my project both on iOS Simulator and the Device? - iphone

When running Xcode shows older version of the project both on iOS simulator and iOS Device! It never shows the new background picture I have added although it's there in the storyboard and saved!
I tried cleaning the project even with the option key pressed but still!
I have localizations and it was working well!
What could it be? Where is the problem?
I tried searching but I ran out of terms and still no effective results.

Sometimes apps get "stuck" in the simulator. Try deleting it (long press, then click the "x") and then check ~/Library/Application Support/iPhone Simulator/[ios version]/Applications to see if it still exists. If it does, just delete it.
You can also try iOS Simulator > Reset Content and Settings....

I had a similar issue where an old storyboard were used on device instead of the most updated one I was working on.
The problem was due to the localization, I had my storyboard localized in 2 different languages and the device were using the storyboard localized in an other language than the default one which was somehow outdated.
Hope it helps.

Related

ios11 iphone app icon is missing on iPad

I have an iPhone only app but it works in compatibility mode in the iPad too(no surprises).
but after I updated the app for the ios11, app icon on the iPad is missing.
here is what I've tried;
- launch on the iPhone simulator, icon appears
- launch on the iPad simulator, icon is missing
change the device options from "iphone" to "universal", run the iPad simulator, icon appears but app needs a new iPad ui.
change back to "iPhone" and the app icon is missing again in iPad. really confusing.
I tried to create a new project and make the same changes but never able to make the icon missing again.
I'm using cocoa pods if that makes any sense.
I think I'm missing a settings or something else, I'm really trying to find it, any advice would be greatly appreciated.
I've found the problem.
In info.plist, there was an extra or problematic entry.
- CFBundleIcons~ipad
Remove this line and iPad icons appear normally.
This problem has been reported by many users over the past 6 months (including desperate pleas to Apple to fix this bug), yet no one's reported the following solution.
I'm using Xcode 9.2, and I noticed today that my iPad/iPhone's application will run fine on my iPad (iOS v11.2.1) but the icon is missing.
This is a legacy app, about 2-3 years old, and the cause seems to be my Appicon file. When I view this file, I see this:
Previously, this resource was sufficient to provide the app icon for both the iPad and iPhone, but apparently, not anymore.
I went into my Images.xcassets file, right-clicked, and selected "App Icons & Launch Images\New IOS App Icon" and now have a look at the extra icon possibilities:
Notice the extra icons for iPads.
Sure enough, I created yet more .png files, with resolutions matching the desired iPad resolutions settings, and now, when I build my app and run it on the iPad, it does show the correct icon.
Oh, and I also needed to go into my project's build settings, select the "General" tab, and change the "App Icons Source" to the name of my new image set, "AppIconNew".
Et voila. No messing around with Cocoapods, no need to change the .plist file (mine didn't have that "CFBundleIcons~ipad" entry anyway), I just needed to create a new image set.
Okay, time to go back to my modern, cosy world of using Visual Studio again now.
(Happy sigh..)
I've had a few legacy apps that did have the CFBundleIcons~ipad in the Info.plist, so I check that first. However, I've also had instances where it was just missing the asset as #Mike Gledhill mentioned. If this is the case, you don't have to go through adding a new AppIcon set. Just check the iPad box in the Attributes Inspector for the current AppIcon assets and the iPad sizes will show in the current set. Then just add the correct assets for each size requirement.
I didn't have CFBundleIcons~ipad entry in my Info.plist file as per "karpat"s answer. So I moved to "Mike Gledhill"s answer, then after observing my all the icons from Image assests, I found that for particular icon which was invisible only on iPad, the device type set was iPhone.
I just changed device type by right cling on image set to Universal :
This did work for me.

Application crashed in iOS7 after reset Simulator

At the time of star coding in xcode 5, one thing that i struggle with is, with out any coding error or other reason my all applications got crash whenever i try to reset my "Simulator"!!! Not all the time, but most of the time it crashed. Some times it crashed at the time of quit. No matter with which version of simulator i using (iPhone Retina 3.5 Inch, iPhone Retina 4 Inch with iOS6 or iOS7). It always happen when a complete project (with no error, nothing) built on xcode 4.6 trying to quit after running in xcode 5. Though i keep the "Simulator version" as like in xcode 4.6.
If any one similar with this problem and have solution, please share it with me.
- Thanks a lot in advanced.
The error i am facing is : "Thread 1:signal SIGTERM"
Once you open your project with Xcode5 then all the settings for the views are changed to open with Xcode5, in order to make your project views to open with previous versions of xcode, you need to change the property of the views in file inspector to open with earlier versions default, by doing that your project would open in previous as well as current xcode version.
You could fix it in file inspector to open the views with the previous versions of Xcode if it is selected as Xcode5(Default(5.0)), by following image you could fix your views to open with the earlier versions of the xcode.

App Icon not changing when app version is updated in iOS 5 simulator

I recently started using Xcode 4.2 and the iOS 5 simulator. When I update an older version of my app pre-installed in the simulator, it updates the app just fine but the app icon is not updated. Even with cleaning and building the app ahead of time (sometimes a couple of times) this seems to be the case. Is this a bug or am I doing something wrong?
EDIT: Still the same problem, but when I quit the simulator and start it again (NOT deleting the app), the icon is updated. That's a little encouraging at least. Has anyone else experienced this?
I've had this problem for a while and cleaning the project didn't work either. I finally found a trick to do this. It works at least in iOS 6, I'm not sure in previous versions. The trick is to simply move the app to a folder. The moment you move it there it should display the new icon, and then you can move it out again.
Despite others' answers, it would appear that your problem is a bug.
It would probably be wise to report this. Otherwise, try making a new project and trying again.
Hope all goes as planned.
Theres a new category in the plist file called Icons Files (iOS 5.0). Try adding those file names to your target info like so:
In this tab:
The names and size much also be exact. See this Apple Technical Q&A #1686:
57x57 - Icon.png
114x114 - Icon#2x.png
72x72 - Icon-72.png
50x50 - Icon-Small-50.png
29x29 - Icon-Small.png
58x58 - Icon-Small#2x.png
I ran into a similar problem after renaming the app and adding the Icon files category as described in one of the other answers. No icon would show up in either simulator or device. Tried a clean build as well as restarting simulator and Xcode, no success
The solution for me was to drag the icons from my Resources to the two empty wells under App Icons located under Targets -> Summary. After that my icons showed up in both simulator and device. I´m running Xcode 4.3.1
this works for me.
In iOS Simulator :
iOS Simulator -> Reset Content and Settings
Be aware that it removes all things from the simulator to the trash... but it does work.
Make sure of icons sizes are right at the Image Asset folder

Universal application has black iPad screen

I've just finished my app for iPhone and it is working fine. I now want to make the app universal but am getting a black screen when running it on the iPad simulator. Here is what I have done so far:
When electing to make universal, I allowed xCode to create my "-iPad" version of my main nib; Therefore, I have MainWindow.xib for iPhone and MainWindow-iPad.xib for iPad. I have checked my plist file and have confirmed that both entries are present
Have double checked each UI component in the new iPad version to make sure all connections are made identically to the iPhone version. I also double check that the classes are correct
I have made sure that the "visible at launch" and "full screen at launch" options are selected
I read somewhere that removing the "-" worked for someone and have tried renaming my nib and plist entries
I am assuming that my app would then load the proper nib. Obviously I'm either wrong or have some configuration not right
On the other hand, if I need to make some change in my didFinishLoadingWithOptions to force they selection between my nibs - well I must admit I don't know how to accomplish this either.
Thanks!
If the app doesn't crash, than it means it can find the black screen.
Truncating the cache is done in Product -> Clean and also what you could try is "Reset" on the iOS simulator.
Further more, what you could check is if the "view" is linked correctly in your nib. (see image).
OK, after much trial and error, I have gotten this to work; Although, I'm not quite sure which exact steps solved the problem, I have a sneaking feeling it was some of the settings I had for the versioning of the app.
I created a new test app for iPhone and then converted it to iPad. Of course this worked unlike my app. I then compared everything I could think of between the apps. I changed the supported version from 3.1 to 4.0 on the Target -> Summary tab. I then check my build settings and changed everything in there to 4.0 as well. Finally, for each .xib file I set the deployment to "Project SDK Version (iOS 4.3) and the Development to "Interface Builder 3.1" because that is what my test app was set to. To be honest, I don't even recall altering these or do I really even know if this has an impact all I know is that I did change them as described. Did a project clean, reset the simulator and now it is working. I'm wondering if it was the 3.1 was too early for the iPad...
Anyway thanks.

I modified the iOS app, but when I build and run it with xcode 4, it doesn't change

I made an app (already approved in the app store) with xcode 4 and it runs.
Now I would like to modify it for an update. My app has 2 localize (English and Italian) and before I modified it, I removed the second localize. My app is a tab bar app with 3 buttons.
My problem is that I added a new button to the tab bar in the mainWindow (everything is correct also name and nib) but it doesn't appear when I run it on my iphone nor on the simulator (iphone or ipad 3.2, 4.0 or 4.2). It works only on the 4.3 simulator (my iphone is 4.3.3).
If I remove the mainWindow (both), then it works on the iphone and 3.2, 4.0, 4.3 simulator as before I modified it.
What can i do?
Thanks!
When in doubt, try a full clean and rebuild. I've found xCode likes to hold onto old files if they're (mistakenly) marked as unmodified, doing a full clean and rebuild usually fixes this problem
Like #Dan F says, clean and rebuild is a must. Also I've found that putting out releases won't work unless you increase the app version number. If it's currently at 1.0 try changing it to 1.1 (or however you want to version your app) and see if that fixes it.
Otherwise you'll want to play around with your build settings and make sure the versions you're building for are correct. Just a few thoughts...