Re-generate device support symbols in Xcode - iphone

I've accidentally deleted the different folders in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport, as a result, Xcode is giving me a lot of trouble.
How do I re-generate these folders?
As far as I know it should be something that Xcode generates automatically when you plug in your iPhone, but it doesn't. Any suggestions on what I can do?

How abou just redownloading Xcode? usually Xcode doesn't change stuff within the app.

Related

Iphone app not showing properly on the device

i have an app which works perfectly on the simulator but on the device in is not as expected.
Animations are misplaced and other bugs. But on the simulator it works fine.
My question is how to fix this bug.
Here is list of things I already tried:
Restart Mac.
Restart Xcode.
Clean Project.
Rename Project.
Delete app from iPhone.
Restart iPhone.
Shut down iPhone.
Clean and build in Xcode.
I really don't know where is the problem.
Thank you for your help.
Would be really appreciated.
Notice: App is correctly signed.
Make sure your files typed correctly and are case sensitive. The Simulator is not case sensitive but the iPhone is.
Did you ever move code/xib files into different groups or directories? Sometimes there is a old copy of the file in the original directory after the move. I've had scenarios in which those old files caused the old code to executed when switching between build settings.
If there are duplicate files, make sure you delete those copies at the old location, or those that you don't intend to be used. For instance, if your original directory as ~/Work/App/Resources and the new directory is ~/Work/App/Resources/xibs then delete the duplicated files from ~/Work/App/Resources
Make sense?
Now, after deletions, if files start to show up as red in XCode, that means XCode cannot find them anymore (maybe you deleted one too many, or who knows the state of your workspace). If this happens, use the "File Inspector" to confirm that the location and path XCode is using for the file is correct.

XCode error "The application bundle does not contain a valid identifier."

Recently, after upgrading to Lion and Xcode 4.2.1 I am getting this error when trying to run my app on my iPhone 4S:
"The application bundle does not contain a valid identifier."
My identifier is indeed valid, and I have been able to run my app with this identifier earlier.
The problem might appear when I change computers.
I have two computers that I am using to code my app, and I am using Dropbox to keep track of my files.
Restarting XCode, my mac and my iPhone does not work.
Cleaning the target and rebuilding does not work.
The only thing I have been able to do to fix it is to create a completely new project and moving my files. This made things work until I swapped computer. Now I am in the same trouble again.
Any idea? Anyone?
Three suggestions:
Check that your developer key is in both computers
Did you try to update the project? There is a strangly-named key in the middle bottom under the project's properties. Try this.
I had similar issues. I found that some things weren't updated when I updated osx and xcode. To get out of the situation, I would suggest creating a new project and copy paste code, files and build settings. This might seem stupid, but you know apple is not good at creating IDE's. You might just get your self lost in the undocumented settings.

Recover Xcode project from iphone?

My computer recently crashed and I lost my entire Xcode project. However, the project is till sitting on my iphone, is there any way i can recover it?
I'm sorry but I think this is no way to recover your project from iPhone, as it contains already compiled version.
Unfortunately this is a painful lesson about version control and backups
There is no way to get the Xcode project back from the compiled app.
if you can access your iPhone and could get to the folder where the app was installed then you will fnd couple of files you might be able to use. Esp *.png files. There are also some *nib files - but I don't know if/how they can be loaded back into xCode somehow.
You will also get the *strings files back. But possibly most important in this folder there are also *h files of your project.
So I guess that will save you already couple of hours - all you need is to get to your iPhones app folder. I use iPhone Explorer, but anything else should work too.
ps don't know how it can be done on a non-jailbroken phone though
good luck!
use TimeMachine in the future - its simple and doesn't burdon your MAC during development...

XIB actualization problem

I'm facing a weird problem dealing with Xcode. When I run my project using simulator I got the correct xib showing, but when I select my iPhone as target, it shows an older version of that xib... I'm going crazy with this, I have tried to clean targets, deleting and reinstalling the app on iphone, :^S
Please could anybody help me with this issue?
Thanks a lot and sorry for my english.
When Xcode installs development builds of iOS apps on the simulator and on the device, it copies all files from the .app bundle into the target directory for the app in the simulator or on the device. However, it does not remove old files. This can sometimes cause strange effects.
For example:
You have MyView~ipad.xib and MyView.xib for iPhone, you install the app and run it on the device, now you decide to delete the MyView~ipad.xib so that it will just use the MyView.xib same as iPhone, you test this in the simulator and it works fine but when you put it on the device again it still uses the old iPad xib file, but how when it's not even in the project any more? Well the old file still exists in the filesystem on the device until you actually delete the app off the device.
This can happen when you remove files from the project or rename them to something else, the old files will still be there and especially if you have fall-back beaviour or how iOS can look for other suffixes automatically like #2x or ~ipad - this can easily cause confusion. Check for this whenever you notice strange effects like old versions of files seem to resurrect themselves, or it works on one device but not the other.

iPhone App replace images

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