iOS8 simulators error - simulator

Try to start my project on one iOS8 simulator and Xcode shows error:
An error was encountered while running (Domain = NSMachErrorDomain, Code = 5)
No one of iOS8 simulator can't be started. What to do?

"iOS Simulator" -> "Reset Content And Settings..."
^ this helps.

I ran into the same error just this morning, and I haven't completely figured it out, but I have observed something which might help you (or both of us, if anyone else stumbles across this and has more information). I was building a project which contained:
the app itself
a Today extension (widget)
a Framework to share code between the app and the widget
The widget comes with TodayViewController.h/m, and I wanted to share this view controller with the app. So I changed the target membership of TodayViewController.m to my framework rather than the widget. (Did this in the Target Membership in the right sidebar.) I also set the TodayViewController.h to be part of the framework as a public header. When I did this, and then did a clean, I got this error when trying to run the app in the simulator, and also an "unknown error (null)" when trying to run on device. If I set TodayViewController.m's target membership to both the framework and the widget, I'm able to run the app in the simulator just fine.
Now, I don't know why this would be the case. I've declared my widget to depend on the framework, so it seems like it should work without my setting the target membership of TodayViewController.m to both widget and framework. If anyone else knows why this is the case, I'm all ears. But this is what I've found so far.

I had the same problem tonight too. I was not able to get my app to run if my resource directory was a "folder reference" (aka blue folder). Once I re-added my resource directory as a "folder group" (normal folder) instead my app ran fine. Not sure if this is the case for you, but it solved my problem. GL.

I ran into the same problem today using DP3.
When I tried to delete the Derived Data folder from Organizer, it showed me some kind of permission error. I then manually deleted the folder from Finder, rebuilt, and voila! It worked!

If you ever get and error like this, where xcode doesn't say much, just a error code, try first to check the actual problem on the system console.
Applications -> Utilities -> Console
On my case I was able to see that xcode was trying to copy the widget's binary and it was not able to find it. I was able to find out that without at least one compiled file on the extension's target, xcode is not going to create the binary for the extension.

Related

How to solve this error? - 'Resource.Layout' does not contain a definition for axml file

Am new to Xamarin and is currently building a very simple app using the tutorial from Youtube. Am just in a middle of the video when I got this error even tho I carefully followed all instructions. And even the instructor in the video was able to run his app successfully
Here's the code where I'm getting the error:
var view = inflater.Inflate(Resource.Layout.SignUp, container, false);
For me it is caused by namespace changes. After I corrected the namespace in project properties, then I can build again
I just deleted my newly created axml file, rebuild, add it again, and this time, clean and rebuild.
Everytime I added a new axml file, I clean and rebuild. That's all, thank you :).
Actually this problem occurs when your ResourceDesigner.cs file has not yet mapped the file that you added to your resource directory.
The easiest way i would suggest to handle this situation is you comment the code you are trying to write and clean build your project and it will work like a charm.
Good luck!
In my Resource.Layout.toolbar, Resource was ambiguous between Android.Resource and Xamarin.Forms.Platform.Android.Resource. Instead the one that works for me is [Project name].Droid.Resource. Clean, deleted bin/debug and now it's fine
Resource.designer.cs was excluded from project. Solved by including back.
In Xamarin.Android this problem can be resolved by saving other axml/xml file. Many times cleaning solution, deleting bins/obj doesn't working for me.
In my case my Main file was configured in the Build Action as AndroidResourceAnalysisConfig and then change property to AndroidResource then Build my project and it works.
I had a lot of "XXX" does not contain "XXX" errors like this after a git reverse operation. Very annoying.
I tried all the solutions I could find, all without luck. Finally I magically fixed it by going to the Android project properties, Android Options, then unchecked "Use Fast Deployment (debug mode only)". I then built the project and it worked. Then I went back and checked that option so it was back to normal, and everything is fine.

Cannot Build Xamarin.Forms From Source Code

I have downloaded the Xamarin.Forms solution from GitHub and I am trying to build the solution. Visual Studio does not build, generating more than 70 errors, as simple as the one below:
"The type or namespace name 'IOnClickListener' could not be found (are
you missing a using directive or an assembly reference?"in
Xamarin.Forms.Platform.Android\AppCompat\ButtonRenderer.cs
When I investigate the code, I see that there is really no reference to Android.Views.View in the using statements, so it seems fair.
Am I making a mistake somewhere?
It's not easy to get to the answer without digging into the logs but here are some steps that have helped me in the past.
Android Specific Steps:
Check the logs for any problems that stand out, look at the top most error first and work your way down. Output window -> Show output from Xamarin Diagnostic
If you find unzipping problems you might have to visit the Xamarin folders to delete the zip causing problems and Xamarin will download a new one.
C:\Users{USER}\AppData\Local\Xamarin
If you get loads of Xaml and Resource errors you might have to delete the contents of the file.
Resources\Resource.Designer.cs
After deleting the content(not the file), clean the solution, rebuild the project.
If you still have problems try to either downgrade Xamarin.Forms or upgrade it.
Change Api level to a higher one on the project properties.
Hope one of these helps.

ParseKit framework in Xcode is red, won't build

I'm trying to add ParseKit to a new command line project in Xcode, but the framework shows as red in the Project Navigator. When I try to build, I get this error
error: /Users/acdlite/Xcode/Chemistry Parser/../parsekit-trunk/build/Debug/ParseKit.framework: No such file or directory
I've followed the directions given by the developer in this answer: How to embed ParseKit as a private framework in a Mac App bundle.
To my knowledge, red indicates that the file is not at the specified location. The file inspector says it should be located at /parsekit-trunk/build/Debug/ParseKit.framework, which actually doesn't exist if I try to navigate there in the Finder. So then where is it located? I have no idea.
I've followed all the steps from scratch like a dozen times now, including checking out the code via SVN. It's driving me crazy, and I feel like an idiot. I wish I could be more specific but I am truly lost as to where to go from here.
Alright, after at least 20 attempts I eventually got it working. Mostly, I followed the steps given by the developer in this answer: How to embed ParseKit as a private framework in a Mac App bundle
However, following the steps exactly didn't work. For the life of me, I couldn't get the ParseKit framework to show up as an option when I attempted to add it as a dependency of my Target. Xcode would just say "No filter results found." So I skipped that step. I also did not add a "Copy Files" build phase. Doing so resulted in a dependency error.
This was way harder than it should have been, and I don't know if that's because I'm stupid or Xcode is poorly designed. Probably a combination of both.
By the way, I'm using Xcode version 4.6.1 (4H512).

Xcode 4 stuck on "Scanning for working copies"

I just archived and submitted a project. When I go back to open the project it hangs on "scanning for working copies." I can navigate around but am unable to view the project files.
It is really just a linking problem.
Select your project and make sure you have 'Identity and Type' open. This is in the right side Editor bar(toggle open and closed with 'View' button).
You can change your Location and Full Path there. You just need to check that your project is linked to the correct directories.
Hope this helps anyone.
Copy and delete the whole file and paste it in some other directory (or I guess you can put in same directory). Now open it again. I also had same problem. Actually my project was in SVN, so I deleted the directory and again checked out the entire file and opened it again. Now at least that error message is gone.
I am also new to xcode(4.3) .. sorry if my english is not good ...
Open up a more trusted Source Control App, like SourceTree, and refresh all of your working copies, then Xcode, will behave.
The problem seems to result from incorrect linking or damage to the version control repository. Other answers suggested deleting the repository or removing it from xcode under the Window -> Organise menu. I suggest you try these options and the suggestions in the other answers. However none of these worked for me and my xcode was still displaying the "scanning for working copies" message and intermittently locking up.
Deleting xcode from the Applications folder and reinstalling it from the app store then importing my project fixed the issue for me. I also suggest you dont use version control for your project unless you really need it.

Can't submit app with CorePlot using Xcode4

I created an application in XCode 4 that uses Core Plot.
I installed Core plot as an aditional SDK following the instructions from here:http://code.google.com/p/core-plot/wiki/UsingCorePlotInApplications (Install SDK)
The instructions for "static Library" haven't been updated yet fro XCode 4.
I can run the app in the simulator, install it on my iPhone and everything works just ok. I was even able to send it to beta testers using several services like TestFlight. For this, I had to generate an archive and then "share" by generating the .ipa file. No single problem here.
Now, when I try to validate/submit the app I got this error:
I'm selecting the "distribution" configuration, then product -> archive, then in the Organizer I try "validate" or "submit", but I always get this same result.
I also made sure that the "skip install" is set to NO. This part is confusion, Apple says it should be YES and many posts here say it should be NO. If I set it to YES, the app is not even archived.
At this point I'm not even sure if the issue is the "skip install" flag or core plot. I found this question: http://code.google.com/p/core-plot/issues/detail?id=280, so I think my issue may be related.
If I open the archive file, this is what is inside:
Any ideas/suggestions will be truly appreciated.
I had the same issue for both TestFlight and App Store.
The solution for me was to archive the app, and in the organizer select "Don't sign" when you try to validate/submit or share (in the case of TestFlight).
Hope this helps.

Resources