Launch/Spash image does not change with Upgrade - ios

In the next version of my iOS application, I modified the Default.png image. The new image (now localized) is featured prominently throughout the application.
To test the upgrade process on my device, initiate the installation from Xcode on a device that has previous version of the application. My problem is that during this mock upgrade, the splash image appears as the old Default.png. Additionally, when displaying Default.png elsewhere in the application, it also continues to be the old one.
However, if I first remove the application from the device, and afterwards install (rather than upgrade), the new splash image does appear properly.
How do I fix this, or is this to be expected when mock upgrading via Xcode? Can/Should I rely on the upgrade process executing properly when it happens through the app store?
The closest question seems to be this:
Updated splash / launch not working
The answer, though sounding great, seems speculative.
Thanks in advance.

I contacted Apple and they sent me the following:
https://developer.apple.com/library/ios/#technotes/tn2285/_index.html
It explains:
How to properly test for updates
That during an 'Xcode update' not all assets get refreshed
When properly testing the upgrade, assets do get replaced as they should
Long story short, test upgrades properly and things will appear as they should.

Here are a few things to try (not guarantees but worth a shot):
Delete the Derived Data for your project. Go to the Window menu at the top, click organizer, click the projects tab at the top, select your project and click the "Delete" button next to "Derived Data".
Clean your project. Product menu then "Clean" option.
Make sure that the old default image has been deleted from it's location in the file system (sometimes Xcode says it deleted something, but in actuality the file is still there on the file system).

Related

Xcode 6 does not create a new project or playground. It just stalls in the process

Problematic Workflow:
Start Xcode,
New ->Project,
Pick Single View Application ->next,
Enter app name etc ->next,
"Choose Options for your project:" page opens which does not let me
do anything.
It just stalls there. There is "Add to" combo box in this page which is not responsive. SinceI can`t do any changes on this page I cannot click on "next" either, i.e., it is disabled.I can click on "previous" which turns back to project name etc page.
This started to happen all of a sudden yesterday. There is no crash or anything, just unresponsive screen. But I cannot do any development at all since I cannot create a project in the first place.
Finally the problem was solved. Steps were below:
1 - Update the system to Yosemite,
2 - Completely clean the system off of the Xcode (I did it using AppCleaner, freely available on the internet),
3 - Make sure no trace of Xcode exist in the system,
4 - Go to App Store and install Xcode from scratch.

Storyboard won't update in simulator

I have a working app in Xcode, however when I try to build and run it the simulator displays an older version of the storyboard I was working on. I had changed some of the design on the storyboard but this does not reflect in the simulator, nothing is updated.
Does anyone have any ideas?
Delete the App on the simulator.
Clean
List item
Build & Run
Use NSLog(#"") in your controller to check code execution.
I just spent at least 6 hours on this. I have a solution, but I also submitted a technical support ticket to apple to try to get more info on the cause and proper solution.
Simply remove the references to your storyboard files and add them back in the same file group.
This seems to include the storyboard files back into the app bundle generated during build(which can be seen in the
DerivedData/APPNAME/Build/Products/Debug-iphonesimultator/APPNAME.app
From here I can see my changes reflected from the storyboards as expected.
PS - Are you using localization at all? I was.
I lost 2 hours to this.
Solution was braindead simple: delete app, turn OFF the iPhone 5S (iOS 7.1.1), and turn it bavk on.
When you turn on localization,
xcode moves storyboard file in localization folder (ex. Base.lproj/name.storyboard). When you build and run project on simulator, xcode copy name.storyboard into "derivedData"/Base.lproj/name.storyboard, but previous, created before localization "derivedData"/name.storyboard still exists. In this case simulator uses the file which can be found easier, i.e simulator uses old file "derivedData"/name.storyboard to operate.
Solution: Just rename the storyboard file, in navigator and in targets/general.
This error happened to me for the first time when I had multiple copies of a project on my computer. For whatever reason, the fact that there were multiple copies were making it look as if the storyboard had not been updated between copies and in some cases the code was not updated. I thought I had forgotten to throw the right copy on my flash drive before going home, but it turned out it's an XCode error.
Delete any multiple copies using the same name, restart XCode and open your most recent copy. Extremely bizarre, but I will probably use BitBucket or GitHub from now on instead of throwing it on a flash drive.
Deleting
~/Library/Developer/Xcode/derivedData/
worked for me!
I just have the same problem after localizationMy solution is clicking Product, Clean build folder. Then it will be fine
The storyboard on the simulator was what it should have been. The storyboard on the device would not update. I had to delete the application from the iPhone and then re-run it on the device in order to get the Storyboard to update on the device. Fortunately for me it was only test data, but I was using Auto-Layout on one view and went back to manual. I think that's what caused the issue for me.
I find that removing and adding storyboard file back doesn't work in my case, also it has side effects like it will automatically add a main nib entry into App's plist file (which subsequently makes the App fails to launch in iPhone simulator).
I don't want to try to delete the application from the simulator since I have many files under the Document directory of the App.
At last I find another way that works well: simply delete the "/Users/$username/Library/Application Support/iPhone Simulator/7.1/Applications/$app/$yourapp.app" file. The files under Documents directory are untouched.
(I have localized my storyboard as well.)
I found this same thing happened with Xcode 6.1.1 if I happened to have copied a project; the new project run in the simulator was actually still reflecting the old, original project.
In my case the problem was with how the default area was set up for derived data (essentially the location where the binary files go for a build). Mine was set to legacy and the simulator was using the wrong project, even after a clean. The solution was to go to Preferences->Locations, press Advanced, and change the location from Legacy to Unique.
I get this too when using localized storyboards - Run in Xcode just refuses to install the latest version of the compiled storyboard. I think it is something to do with the way Run copies changed resources across to the device - it does it differently than other forms of on device app installation.
The quickest way to get past this without deleting the app and losing any data is to:
Generate an Archive build in Xcode
Export this for Adhoc deployment
Double-click on the generated IPA to add it to iTunes
From the device page in iTunes force an update to that app
In order for iTunes to see that you have a new version your app build number will need to be incremented (if you don't do that already), before generating the archive.
I find this method means you don't have to delete an app off the device, you're just forcing it to install the entire install package rather than a diff which is what I think Run is doing.
I'm not sure what causes this, if it is a localized resources bug or what, but this is still a problem in Xcode 7 for me.

How to restore my project wisely

So, it started as a simple test, where I had to delete my app from my iPhone (iOS4.3) just to check how the app behaves on a first run. (I am developing to support down to iOS4.3).
After the deletion, I wasn't able to run the app on my iPhone for some reason. The "Active Scheme" would show iOS Device, although I could manually select my own device from the list, the project wouldn't set my device by default. XCode would drop a message from the top saying:
Could not launch “project1” No such file or directory
(/Users/portal/Library/Developer/Xcode/DerivedData/project1-
cfjhjgezzcapwoadaivpptyywptu/Build/Products/Debug-iphoneos/project1.app/project
I went through this SO post (EDIT: Therefore, restarting XCode, iPhone doing clean project, hard resetting my iPhone) but this didn't change anything, except I can now delete the Derived data in Organizer.
I have a working backup at hand though. Thing is it is a bit outdated as I made many changes to the project. I can run the backed up project, and it seems sane as good.
Now my question is how can I merge the files back into the sane project? The XCode project itself has changed a bit, frameworks were put in as well as some settings.
I tried to simply copy the changed files into the old project, but all I get is a SIGABRT upon the first run. I did a FileMerge look, and saw that for some reason my projectAppDelegate.m is non existant in the PBXBuild section of the .xcodeproj file. which I didn't touch. seems like a mess here.
How can I merge the new project to the old one correctly?

Xcode Build and Archive for Enterprise Distribution builds old archive

I'm working on creating an app for in house distribution enterprise level. I've created the app and tested hosting it on my own server and even getting the click to install working. Now though I have some updates to the app, I make the edits and I even see them in the simulator. When I build and archive the app things seem fine, then I go to the archived project in the organizer window, click the share button and distribute for enterprise, I enter details such as the ipa final url and the app title and then ok & save. Then I upload the app to my server and update any links to point to this new app. The click to install still works properly, but it installs the old version of the app. I've even tried this on a new device. Is there some step I'm mission that tells Xcode some version to build? If so, I don't get is how the simulator shows the update fine, but the archive that is built is not showing the latest code. The app I can find in the simulator dirs is 9.4MB in file size, but the one that is saved after build and archive is only 1.4MB (the update involves a lot of added images), so is the build for archive is not even getting the new files?
if a clean won't work, try completely removing the derived data folder.
the default location is in /Users/you/Library/Developer/Xcode/DerivedData . if you haven't played with the DerivedData location in preferences, this is likely where you'll find the sub-folder containing the cache.
when i encounter a situation similar to the original question (retaining items i've deleted, or similarly missing items i've added or holding onto project icons i've changed), i perform a clean on my project, close it, hit Delete… in the organizer, possibly even remove it from the organizer, possibly even remove from disk and then re-checkout from git if you have it under version control in this way, then re-open the project from scratch.
I figured it out and thought I should post it in case it helped someone else.
I cleaned the project.
Build > Clean - not 100% on what "Clean" is supposed to mean/do, but it allowed the project to build from the current files rather than the old files somehow.

Trouble with icon picture when uploading app to app store

I have trouble uploading my application to app store. When I try to archive my project for validation i get an error:
warning: iPhone/iPod Touch: BMELogo.png: icon dimensions (0 x 0) don't
meet the size requirements. The icon file must be 57x57 pixels, in
.png format (-19014) Unable to validate your application. - (null)
I have checked and re-checked my icon for both size and type. My icon is 57x57 and a PNG.
Do any of you know what to do?
in advance thanks :)
This is a weird error, but it could be similar to what happens when apps on the phone don't match what you see in the simulator. Here's a few things to try:
As Damo mentioned, this is most likely a capitalization issue. Make sure that the filename as specified in the plist matches the case of what's on disk. Devices (and the app store) are case-sensitive, but your Mac is not. If it works in the simulator but not on device, you probably have a capitalization problem.
You might need to Clean (from the Build menu) the project and rebuild. Sometimes XCode just gets confused, especially if you've been moving or renaming images. Quitting & restarting XCode might help, too.
Nuke the site from orbit -- manually delete all of the project's output files. Sometimes XCode keeps old versions of image files around packaged somewhere hidden that cleaning doesn't get rid of.
Start over from scratch. Choose a different name, one where you're sure there's no legacy object file lingering about.
Also, you might want to make sure that you are using the latest version of the Application Loader, you can download the latest by logging into iTunes Connect and clicking on Manage Your Applications, the download is at the bottom of the page.
After you download the installer, close down Xcode, then run the Application Loader installer, then relaunch Xcode, load your project, do a clean on the project, and then archive and try the validation.
I had this error too. You need to reinstall Application Loader which you can get from here https://itunesconnect.apple.com/apploader/ApplicationLoader_2.5.1.dmg

Resources