I'm trying to import a Default.png in my application but it's not getting imported and showing me a message that it's already there whereas there's no Default.png already present in my resources.
This might be because I by mistake had assigned my current working app Id and provisioning profile to an another application too since when it had started showing me that app's Default.png before loading my application. To remove that I had done restarting, cleaning and managed to remove the appearence of that Default.png, but because of this message I am feeling that it's still there and I want to remove it or the Default.png that's not there in my resources but is depicted to be there in my resources.
I have double-checked and there is no Default.png in my applications' resources.
Can anybody please help?
Thanx in advance.
When you delete something from the Xcode project, it will ask you if also you want to delete it from disk. You might have chosen to delete a reference only.
So herhaps it's still in the project folder on your harddrive. Check that and remove any Default.png files before adding the new one in Xcode.
Related
I had made a settings.bundle file in my project with some attributes in it. It was working fine and I could find all attributes in device's "Settings" app until I moved the file from one folder to another in my project hierarchy. Now, "Settings" app does show my app name in it, but there are no attributes in it.
Edit:
I have cleaned, build my project several times. Also deleted app from device, reinstalled it but the problem is still there.
I need to know the problem and reason why it has happened.
Thanks in advance.
You can't put the Settings bundle wherever you want. It needs to be in the top level diretory of your app's bundle.
from the manual:
A Settings bundle has the name Settings.bundle and resides in the
top-level directory of your app’s bundle.
really simple question. tried googling
I just got a new iPhone 4S and restored from backup. A development app doesn't show up but now that am deploying app to device, the old one shows up (for example, an old display.png is shown). Is there a way to fully delete this from the iPhone? Similar to just rm -rf in the simulator? If I go into the Organizer, I can see that I can 'delete' the application but it clearly lives on with the wrong default.png (and probably wrong sqlite db). How can I fully remove this?
thx
If you are deleting the app from the device only, then you just delete it like any other app, either as you already know through the organizer, or by long pressing and clicking the 'x' on the icon.
If you have an issue with resources persisting after they have been replaced and you are building directly to the device, you may need to remove transient directories from your disk.
Transient directories for building are located in your home directory:
~/Library/Developer/Xcode/DerivedData.
Remove the transient directory for your application and this will guarantee that all old resources are removed from the new build.
Well, you have tried all the way and other answer describe you how to delete the app from device, *and still if you are getting the same issue*, then i would suggest you to use following alternate way :
1 ) Connect your device to your iTunes
2 ) Click on Apps in your LIBRARY section
3 ) Delete your app by right click
It will surely help you. :)
Press-and-hold on the app icon on the device, then click the X button and select delete.
Then in XCode, navigate to the Product menu and select Clean.
Rebuild the app onto your device, and everything should work just fine (provided you perform the steps in this order). :)
Hope this helps!
I am trying to clean up my app before I submit it for apple approval, but I have an issue. I have delete some unwanted background images but the app seems to think they are still there. I have delete the app completely from the phone but when I build it is still there. The image has been completely remove from the Mac it doesn't exist anywhere not even in the simulator folder
/Users/******/Library/Application Support/iPhone Simulator/5.0/*********/appname.app
I can't seem to figure out whats going wrong.
I have had a look at a few questions like
Xcode- Deleted images appear in simulator
but this doesn't work, I have also tried
Attempting to delete an image from Xcode 4
when it builds it just adds it back in.
Can anyone help? or advice where I can find some help?
Delete it and then, from Xcode, perform that:
Press Shift+Cmd+K
Alt+Shift+Cmd+K
It will empty your cache and clean your build folder.
Product -> Clean or ⌘-Shift-K.
In the project tree click the name of the project name, select targets and build phases tab. There will be a section named "copy bundle resources", if you can see the name of your file, delete it from there. Then follow others' solution to clear the cache and make a clean build.
Edit: Also check Xcode- Deleted images appear in simulator, I guess your question is answered there.
Have you tried cleaning your project and then building it again ? (It might still used the already built .app file when you uploaded it again to your phone)
i think thats happens because of you are deleting the reference of images so that images are still in the folder of your project so do these 3 things.
1. go to your project folder where it is saved and search those images and if you found those images in that folder than delete them.
2. clean your project. from product->clean
3. delete app from simulator
after that try again i think your problem is resolved.
I think this is very basic, but still, I didn't understand what I should do here:
In my app there are many JPG and MP3 files stored in the app bundle; they are triggered and displayed upon user actions. When I change a certain file (for example, I had a photo and I wanted to change it to a new photo with the same file name instead of the one I had), I delete it from the bundle (selecting "Also Move to Trash") and then insert the new file.
In some cases (not always) the old file is simply not disappearing (!?!); If I look in the bundle I see the new photo, but when I run the the Simulator I still see the old photo (same goes with mp3 files).
anyone?
When Installing app in simulator, Xcode doesn't delete old files, which can lead some troubles like this. Just make sure to :
delete app from simulator
OR reset simulator
OR (the one I prefer) delete app directly from ~/Library/Application Support/iPhone Simulator/_version_/Applications
maybe you should delete the app in simulator and re-install it to simulator by Xcode.
Build>>Clean & Build>>Clean all targets will solve your issue.
Do these two things and then compile and run the app and you'll see the changes.
I have an unlocalized shipping app which has foo.xib in the main project directory. In preparation for localization, I moved this to en.lproj/foo.xib. Now, when I build my app and install on my test device, it ends up using the stale old foo.nib which must be there from before (the installation process must not remove old files in the app's bundle). Deleting the app from the test device and re-installing fixes it -- but I don't want my existing customers to have to do that.
Some of these are coming from calls to UIViewController's -initWithNibName:bundle method (to which I'm currently passing nil for the nibBundle). I can probably create an NSBundle instance here which points at the correct localized directory. The others are specified in Info.plist or in the "NIB Name" section in interface builder and I don't see a way to specify a bundle for those.
It might just be easier to rename all my xibs to (e.g.) en.lproj/newfoo.xib, then I presume it will find the correct nib at runtime. (And I'll have to remember to never again use the old "foo.xib" name in a new version.) Is there a more clever solution here though? (Other than going back in time and starting with en.lproj directories from the beginning ;-)
Thanks!
-Mike
Answering my own question in case anyone else runs into this issue. It appears that this is an artifact of the Xcode build-publish cycle, and it isn't a problem when user's upgrade via the App Store. I went ahead and published my update and no one has noticed problems that would result from stale resources.
As a speedup to development, it appears that Xcode only copies over resources that it detects have changed when you build and install to the simulator or a test device. (To prevent a game with 500MB of resources from having to be re-copied each and every time you build and test.) When you (re)move a resource from a project though, it does not detect this and (re)move the old copy. I will file a bug with Apple about it.
However, the App store does appear to do a clean install with each upgrade (copying over the user's documents directory) so this is not a problem from the App Store. I'm not sure if it is a problem when emailing beta testers an .ipa file or not.
I'm having the same issue. The problem is that the phone keeps a cache of the nibs. Somehow thus cache needs to be cleared for you to see the new localized nibs. I also don't want my users to have to delete the app since it stores data.
I just had the same issue but found a solution which works, even with Xcode's deployment quirkiness: Prevent UIViewController loading stale XIB from app bundle