iPhone Simulator starts wrong project - xcode

I have an old iPhone application that copied to a new location in order to reuse it.
So I
- copied the project directory to a new folder
- created a new xCode project and linked all copied files to edit
- edited the frameworks and plist files to point to the new project name.
The project compiles and can be run, but when I click "Build & run" in xCode, xCode builds the new project and executes the original project.
Am running xCode3.2 with iOS4.2
Any ideas ???
cheers

When Xcode requests that the simulator launch something, it seems to do it by product name only. Something that has happened to me more than once is that I've changed the bundle identifier on my project, subsequent builds have led to two products with the same product name on the device, then I've become a bit confused when changes I'm making don't seem to take effect.
Solutions are either to delete the older product from the simulator (which works the same as on a real device; tap and hold) or to change your product name. I have to admit that I've not tested changing the product name and the bundle display name so that the app has the same visible name on the device but a different .app name.

Related

Xcode project with a certain Product name crashes at launch

After I finished my Xcode project (macOS app), I wanted to change its name, folder names and other stuff... Everything messed up and the project wouldn't build so I decided to save all the project files in a folder, create a new Xcode project and place the original files there.
So the new project builds completely fine, but it crashes at launch with this message
container_create_or_lookup_for_current_user(): 8
But the weirdest part is that even if I create an empty project but with the original product name/project name, Xcode won't run the app. Same error.
How can I solve this?
I cleaned the build folder, deleted Derived data, restarted pc.
UPD. When I edit scheme and set debug process as ROOT, app doesn't crash
Deleting old app folders in ~/Library/Containers fixed the issue.

After updating Xamarin and Xcode, failing to run app on iOS device

I recently updated Xcode and Xamarin and when I deploy my project to my simulator on iOS it works well. But when I however try to use my phone that has been working succesfully for many months now it does not work and I get this error in the log:
System.IO.FileNotFoundException: /Users/Carlos/Projects/Myproject/iOS/obj/iPhone/Debug/build-iphone8.1-9.3.2/ibtool-link/LaunchScreen.storyboardc/02J-Ip-oVM-view-Ze4-5b-2t2.nib does not exist
My bundle identifier matches my provisioning profile that I have made on apple.
I have tried to delete the obj and bin folders in the projectmap/mainmap (not the obj and bin-folders inside the iOS folder) but without any success. I have also rebuild the project and cleaned it but the problem still remains.
When I create a brand new project however it works. So it seems to be a problem with old projects only.
In the map on my old project I cannot even find "ibtool-link" and if I check the newly made project I just made i can see it there and other maps as well. Can I solve it by copying them over? Or is there a better solution?
Any ideas what it might be?
You might try the suggestions (I saw at least 2 different ones) in this post which are:
simply right click on the xib and open it in IB. I then turn around and close it in IB and that gets me past the error.
And
make sure 'Main Interface' empty in info.plist.
Remove Bin and Obj folder.
Also you might try deleting the build cache on your mac by going to /Users/<Your User Account Name>/Library/Caches/Xamarin/mtbs/ and then delete the folder that is the same name as your solution (there might be 2, one with iOS in the name, delete both). This will get recreated when you rebuild your solution.

XCode 4 accidentally deleted product file

I'm using XCode and Appcode for developing.
In Appcode, accidentally I deleted the .app file from the Products folder.
After that I can build the project successfully in both IDE, but can't run on simulator or device, when the build finished, nothing happening.
The .app file created on the derived data directory fine, like earlier so that's not the problem.
If I check the debug scheme in XCode, on the Executable list None is chosen, if I browse the generated app in the derived data directory and set that, then works fine, run on simulator and device too, but the app file not shown in the Products folder and after a restart, XCode set the Executables back to None, which is annoying.
How can I set back the .app file to show in the Products directory in XCode and work like earlier?
I was able to delete the "product" file in my own test project by going to the Project Settings and then clicking on the app under "Targets" and touching the "Delete" key.
To create a new Target, go back to Project Settings and click the "Add Target" button.
Normally, this means you need to reset all of your settings, but if you have the original target's Info.plist (settings) file around, you may be able to pick up some of your previous target's settings from there.
I also faced the same issue.
If we are building for the SIMULATOR - then the Target file still "not-included". Change from the top build actions for - ProjectName>iOS Device (instead of the ios Simulator) then the project target file gets generated and is included in the project folder hierarchy.
There is no need to run - just rebuild and that should do the trick

Generic archive created when updating an existing Mac app?

I've made an update to my existing Mac app and went to archive it.
In Organizer it came up as a new entry and not under the previous releases I had. This new entry appears generic, ie. no app icon, no version or identifier info, just the name of the app came through. What happened? How do I troubleshoot?
In the update I added a UTI and also copied a plug-in into my bundle. Could those things have something to do with it?
Got it. My problem was related to dependency targets. Here's the solution:
http://www.weston-fl.com/blog/?p=2429
(Excerpt added 2012-12-18; see blog post for screenshots and background info)
… Select dependent project(s) in the Project Navigator
Find “Skip Install” and set to YES.
If you have more dependent project, repeat these steps for all of them (i.e. at static library projects).
The app is expected to be deployed so do not change the Skip Install’s No to YES there. Change at the dependent projects only.

Image does not update when file name remains the same in XCode 3.1.2

I'm using XCode version 3.1.2 and am developing for iPhone using the Simulator with iOS 2.2.1 on Leopard. I had an image file named "img.jpg" in my project which I decided to switch for a different file. After adding the new file into the XCode Resources folder, I removed the first file and renamed the new file to the same name as the previous one, "img.jpg." When I run my program, however, the Simulator loads the old image instead of the new one, even though the old one has been deleted from disk (not just the reference). I tried changing the name of the file to "img2.jpg," and it worked like it should - loading the new image, but I want to keep the name "img.jpg." I ran a search with Spotlight for "img.jpg" to see if there was another copy stored somewhere that XCode was using, but it only returned my new image file. I have tried uninstalling the app from the Simulator and running the application again, but that also does not fix the problem.
What must I do for XCode to recognize that I want to use the new image file and not the old one?
Thanks for your help!!
You should clean build all your XCode Projects Targets by using "Build" -> "Clean all targets", and rebuild from scratch. This should fix your problem.
If you have a big project and don't want to wait that long, you can also remove and re-add the file reference from/to your project. That seems to always work.
You have to solve it by performing both routines:
Read the new images into Xcode
Product > Clean
Secondly update the simulator
You also have to force sending the updated images to the simulator.
You can do this by deleting the folders, or just removing the app from
the simulator (as you normally do on your phone).
I had this problem in Xcode 4. The problem was caused by a Default~iphone.png hanging around with the old image. I saved the screen shot over Default~iphone.png and chose that file as the launch image in the project summary page. You can tell if this is your problem when you select the Default~iphone.png file as the iphone launch image and xcode asks you if you want to overwrite Default.png.
An important addition - when working with Simulator, delete the folder in the Simulator
The folder must be named something like
/Users/username/Library/Application Support/iPhone Simulator/6.1/Applications/53630E9A-6E04-4D33-8600-AD29484C9FA8
and have YourAppName.app inside

Resources