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.
Related
I'm developing a new application for Iphone, using Xcode (Version 4.6 (4H127)) and the iPhone 6.1 simulator (Versión 6.0 (369.2)).
At the beginning everything was great: every time I pressed the "run" button, the application was loaded into the simulator and I was able to test it. But sometimes it is not working: when I press the run button, I only get the message "Finished running on iPhone 6.1 Simulator". The code successfully compiles (only minor warnings).
The main problem is that when I get this message, the only way I can use the simulator again (in this project, the rest of the xcode projects seems to work properly) is by starting a new project and adding every file to it.
I've tried to delete de derived data, restart de simulator, restart de computer, etc. Even I made a snapshot when the simulator was working, but when I go back to the snapshot state, the simulator still don't work.
What can I do? Any idea?
1.Manually launch the iOS Simulator.
2.From the "iOS Simulator" menu, click "Reset content and settings",
3.Close and rebuild your app.
This problem may arise when you have problems with your project's plist's target membership. Select your info plist file from project navigator folder structure's Supporting Files, go to interface builder pane(Utilities Section under View in Top Bar), then look for Target Membership in File Inspector pane, if it is checked, uncheck it. Clean & Build, Hope it helps.
Library > Application Support > iPhone Simulator > 6.1 (or whichever you're using) > Applications > Your Application and delete it.
Rebuild your app and relaunch.
I had the same problem, with the same "failed to attach to process ID 0" (I actually didn't notice that error until I saw that you said you had that error). In one of my projects the 6.0 simulator didn't work, but works in my other projects. Also my 5.1 simulator worked.
What worked for me was based off this other answer for a similar question: https://stackoverflow.com/a/12423912/159758
Go to the Product menu and find the Edit Scheme menu there.
While in Edit Scheme window, select the "Run" option on the left hand side of the screen and then on the right hand side, change the debugger from LLDB to GDB.
Run the project, this worked in the simulator.
Then Go back to the Edit Scheme and set back to LLDB.
I noticed you've tried setting the debugger to GDB and not a debugger, but thought I'd mention what helped me, since you're question helped me get to the bottom of my problem (i.e. seeing the "failed to attach to process ID 0" message).
This problem may arise due to presence of more than one info.plist file.
I also faced a similar problem, and eventually found that while adding some resource file from another project I also added its info.plist file.
Once check your Build phases> Copy Bundle Resources, whether another info.plist file exist there or not. If exists then delete it, clean the project and rebuild it.
Hope it helps.....
I ran into the same issue and somehow was able to fix it and almost immediately it went back to being broken. I can tell what broke it though.
I added a couple of folders (folder references) with files in them to the copy bundle resources section. That broke it. If I recall right, I had removed both of those and was messing around with DeploymentTarget. I might have reset the simulator earlier. Regardless, it started working. So,
there is hope for a fix
this thing is caused by folder resources that need to be copied into the bundle
Updated:
I was able to get it working again. Here is what I did..
- Cleared out the derived data folder
- Shut down the simulator app
- Also cleared the deployment in the simulator folders (Users/XXXXXX/Library/Application Support/iPhone simulator/6.1/Applications)
Since last time adding the folders to the bundle caused it to lock up, I tried it step by step adding one folder to the bundle and trying. Turns out one of my folders was named Resources and it dawned on me that particular name could potentially be colliding with something else the app looks for. So I renamed that folder to Res and tried it. It works now.
So there you have it.. Follow the steps above to get out of the problem.
Avoid copying folders called Resources to your bundle.
I am getting old files in my documents directory and not sure why.
On the simulator it works as expected. I can update the files no problem. I just delete the app. from the springboard and rebuild. I can easily verify the files are the correct ones.
But, when running on the iPhone, old versions of the files show up. I do always delete the app of course. And if I go to the project and delete the files and verify in the build phase that they are not included, they still show up on the iphone.
I have rebooted the mac and the phone, no change.
I even found under organizer how I can download the files from the iPhone and they do show the old files, but I am not sure how they got there as I don't think I am asking for them to be copied...
thx for any suggestions!
After finding the compile output, I saw that xcode was copying from a directory called "DerivedData" and then I found posts about possible issues/bugs.
Here is a link to the fix
I have made a project in xcode 3.2 after some time i upgraded my xcode in 4.2 every thing works fine. now i want to set up my project on another mac laptop having same environment. but during build it give me an error ie
CpResource ../../Desktop/th_text-field.png error: /Users/gchauhan/Documents/project backup/30july/lisnxios_lisnxios/Lisnx/../../Desktop/th_text-field.png: No such file or directory
while this th_text-field.png is not present in my xcode project. i don't how it is happening please some one way out of me from this problem. i will highly thankful
In you 3.2 project you must have added a referece of this png but not copied.
Remove reference and then add again now make sure copy item into destination ... is checked like below
Thats normal. That image does not exist on other computer, so program can't find it. Always add images to your project bundle, so that it could work normally at other computers. I think even if you would add sandbox to your app it couldn't access image if he is in other directory, such as desktop or something like that. Music, Movies, Pictures and Downloads folders are easily accessable easy after sandboxing. To access other directories is alot of work to deal with sandbox. And you will need it if you are going to submit your app to appstore. And now, if that file doesnt shows up in xcode project's files list, then just add image (drag and drop) to your project files list and in window witch pops up, put tick on "Copy items...." and be sure that in "Add to targets" your app is ticked.
I got a little problem. I use some images in my app. Today I wanted to replace them with new ones. But when I build and run the project I still get the old ones. I tried to touch the project and the new images but nothing seems to work. I deleted all references and files and imported the new images, but I still see just the old ones.
Does anyone know how to handle that?
Try this: Build -> Clean Targets (i think or something like this)
Try cleaning your target and doing a fresh build. Xcode is probably not updating the files in the target properly (I've seen it do that a lot with the Copy Files build phase).
Try deleting the app from the simulator or your iOS device and reinstall it.
First of all I have to get this question out of the way.... did you make sure that the cases match?
For the answer:
Simulator: clean all targets, clean, Reset the simulator and then try again
Device: clean all targets, clean, delete the app, reinstall
In Xcode is it possible to build a clean version of my project and remove any saved property lists associated with it?
I'm refactoring my code constantly and the old property list that gets saved is causing my app to crash because the data has become old and rotten.
You can also go to the iPhone Simulator menu and select Reset Contents and Settings...
If you mean that you have an app installed in the simulator with data in its documents folder, then not that I know of. The easiest way I've found around this is to go into ~/Library/Application Support/iPhone Simulator/{SDK version}/Applications, find the folder for your app, and trash it.