I have an iOS XCode project that I have been working on under 10.6 for some time. Under 10.6.8, Xcode 4.2, it builds and runs perfectly, both in the simulator and on a device.
I then attempted to move it to a 10.7 machine running the Lion version of XCode 4.2 by zipping the entire project folder (including all the resources it uses), copying it to the 10.7 machine, and unzipping it. When I then run the project under 10.7 on a device, it also works. HOWEVER, if I attempt to run the project under the iOS simulator, it now crashes on the initial UIApplicationMain call with a SIGABRT. All I can see of the error (at least where I am looking) says "Application received SIGABRT", with no indication of why. This is in the main function before any code that I have written gets executed (verified with break points).
I have checked and double checked that all the files the Xcode project is looking for exist and have proper permissions. New projects created with identical settings (as far as I can tell) to my current project run in the simulator fine. As mentioned, even my project runs fine when run on an iOS device. It is just when I try to run my project in the iOS simulator that I have problems. Does anyone have any idea how I can fix this, short of creating a new project and copying all my code in?
I can think of two possibilities:
Xcode generates derived data (index files, intermediate build products, etc.). Normally that data is stored in the user's Library folder, but project settings can direct Xcode to store that data anywhere, including in the project directory. If you've moved this derived with your project, and it depended upon anything in your 10.6 system, it may be producing an executable that will not work on your Mac. Try deleting that derived data. You can use the projects tab in the Xcode Organizer to delete it, or just go digging for it with the Finder and trash the folders.
Another possibility is that the scheme created for this project may be trying to run the app on a version of the iOS simulator not installed on the new Mac. Try creating a new scheme on the new Mac. Xcode should create the new scheme with default settings that are appropriate for that configuration of Xcode.
Related
I've created a new version of my app using Xcode 7 and even renamed the project. Now, when I'm trying to archive, the process succeeds, but the archive doesn't show up in organizer. When I restore my previous version and then try to archive it (also with Xcode 7), everything works fine and the archive shows up in Organizer, so that I think that anything has changed in the new version that causes the error to occur - eventually the project rename.
When I look after the archive in Finder, it is shown, but when I'm trying to open it, I get the following error message:
The archive could not be installed. The archive may be corrupt or unreadable.
I've already followed this official Apple documentation, but none of the suggested solutions work for me.
Any idea, how I can successfully archive my app, so that it shows up in Organizer?
BTW: My app consists of an iOS app, a today extension and a watchOS 2 app.
I've finally fixed my problem by restoring the last version in which the project archived successfully (that was the last backup before renaming my project, so renaming probably caused the problem) and copied all my code from the new project to the old one.
Well, that isn't a nice and satisfactory solution, but at least it is working now.
I really advise you against renaming your project, the whole trouble
you're getting in isn't worth it.
How do you correctly use Application Data bundles in Xcode 6? I exported a .xcappdata file from a device, added it to my workspace, and selected it in the Run Options of a scheme.
Whenever I try to run the simulator with iOS 8.0, I get the following error, even on repeated launches, manual launches, etc:
Application data package not copied to the Simulator
It appears you are running 'REDACTED.app' on the iPad Air Simulator for
the first time, and therefore do not yet have a data folder created.
The application data package will be installed the next time you run
your app in the Simulator.
Trying to use the simulator with iOS 7.1 crashes Xcode.
Does this feature just not work anymore with the changes made to the filesystem?
Tried again on Xcode Version 6.1.1 (6A2008a) and it (sometimes) crashes Xcode now, hopefully that means it will be get fixed soon...
I'm using Xcode 8.1 and when I tried to add the .xcappdata file Xcode crashed.
I solved it by cleaning the app and then I tried to add it in another target and it worked. Afterwards I tried to put it again in the target I wanted it in and it worked as well.
Unfortunately I'm not sure about which of these steps fixed it but I hope it to be useful to someone!
You can try to clean the Derived Data which contains all the intermediate build information like debug- and release-built targets. And you probably can select the Simulator, choose the iOS Simulator from the menu. Then, choose Reset Content and Setting.
Sometimes, it's just some bugs in the XCode. And I think Apple is handling that when your issue is marked by duplicate by them.
When you create a fresh Cordova project it's called HelloCordova, which is also the app icon name. If I rename the project in XCode it will no longer run in the iPad simulator.
I am running Cordova 3 and Xcode 4.6.3 on OS X 10.8.4
Steps to reproduce
In terminal:
cordova create Survey com.domain.mysurveyap
cd Survey
cordova platform add ios
cordova build
This creates the XCode project in platforms/ios/. I then open it in XCode. The project is called HelloCordova. I hit run with the target set to iPad 6.0 Simulator.
Running HelloCordova on iPad 6.0 Simulator. No issues
Good. I get the Hello World app up.
Next I rename the project by changing the Project Name in the Identity panel. I'm doing this
a) because I don't want my project to be called 'HelloCordova'.
b) because the name here seems to dictate what the App Icon is labelled as on the device.
I rename it to 'Survey':
Xcode prompts me to rename related project content items for me. I click 'Rename'
After renaming, I go to run in the simulator again. Now it won't run. I see a 'Build succeeded' overlay for a moment. But in the status panel at the top it says:
Finished running Survey.app on iPad 6.0 Simulator. No issues.
I notice that it still shows 'HelloCordova' in the scheme selector. I have tried running 'Clean' and also restarting XCode.
This is a completely fresh PhoneGap project with no modifications. Any ideas where I'm going wrong?
I don't know why the renaming was failing, and I can't explain that "Finished running... No issues" problem. But: cordova create takes an extra argument that was missing.
This solves the problem:
cordova create Survey com.domain.mysurveyap "Survey"
The final "Survey" there sets the project name on creation, thus avoiding the need to rename the project in the first place.
i just upgraded my XCode to latest 4.6.3. My iPad is running on iOS 6.1.3 Build (10B329).
When i connect my iPad this Message is shown in the organizer Window and i'm not able to select the device in XCode Main Window.
I already tried to delete the device support directory for this version or set permissions.
But Nothing worked so far.
Unable to copy symbols from this device.
This device has a version of iOS different from that of this installation of Xcode.
In order to copy the information needed to work with this device, Xcode must be run by a user with read/write access to:
“/Users/USER/Library/Developer/Xcode/iOS DeviceSupport/6.1.3 (10B329)/Symbols//usr/lib/dyld”
Am i something missing?
Is the hard drive on your Mac full? When I got this same message, using iOS 7 and Xcode 5, that was my problem. I'd filled my hard drive so Xcode couldn't copy the large symbols file to said folder.
Once I made more space, the operation worked without error.
When I debug my Xamarin.iOS project from Visual Studio, it builds, installs on the simulator, and launches the app without issue. But on launching, I'm seeing a bunch of Debug tracing from a method that doesn't even exist in my C# code anymore. I can also set breakpoints on the class from which I removed the method at the same line numbers where this method used to be, and I will see the removed method in the call stack when the debugger stops.
I've closed and reopened Visual Studio, reset the connection to the Mac build server, cleaned and rebuilt my solution, and manually deleted the solution output. On the Mac, I've closed and reopened the simulator, and tried Reset Content and Settings, which does clear out the app. But the situation still persists, even after all that. Is there something else can I try on the Mac to make sure that all cached copies of old code have been deleted?
In your project folder delete the bin and obj folders. This works for me but is still annoying.
Check your Configuration Manager (the drop down with Debug, Release etc) and check that all the projects are being built. It usually unchecks all the projects you are working with for some unknown reason.
This means that it isn't rebuilding all the projects and it hence shows an old version.
As per your comment of rebuilding each project, this is a classic sign of the projects not being checked to be built on run and why you have to do it manually.
In the iOS Simulator (on the Mac) click the "Reset Contents and Settings" entry the main menu.
Well this worked with my Android project suffering from the same issue:
Right click on Android project then select "Properties".
Select "Android Options" then "Packaging".
Un-check the "Use Shared Runtime" options.
then it worked normally
I had a similar problem (though on an Android emulator).
What didn't work for me:
restarting the computer
restarting Visual Studio
deleting bin / obj folders
going into Configuration Manager (Debug / Release / Configuration Manager) and ticking everything there - everything was ticked
changing the version of the app in the manifest
What worked for me?
Uninstalling the app from the emulator and then running Debug again.
It was an Android emulator, so I uninstalled by clicking on the app icon and holidng for long, and then dragging it to "Uninstall App". On an iOS simulator it should be similar.
In my case I had to enable all architectures:
Android project properties
Andrid Oprions
Section Anvanced Tab
Select all architectures and rebuild
I still have this problem with iOS simulators. My solution:
Unload the iOS project
Reload the iOS project
Build as usual
I do the above when I change simulator device.