When I try to run my IOS app on the simulator, I get an error saying Apple mach -0 linker error. It won't let me run it. When I try to run it on a device, It works fine. Does anyone know how to fix this?
Asked
Active
Viewed 479 times
0
-
which simulator iphone 4,5 ,6 or ipad – ShujatAli May 17 '15 at 16:15
-
Are you using any libraries that are build for ARM processors but not i386 (the simulator's processor)? – JAL May 24 '15 at 04:32
-
I am pretty sure the error has to do with the corefoundation.famework. I have tried to remove and reinstall the framework but then it gives me even more errors. The strange thing is, I can archive and build the project perfectly on my device, but it won't run on the simulator. The corefoundation.framework has never given me any trouble, so I don't know why it is now. In response to Stephen Darlington's answer, I have done everyone you suggested miltiple times. I had all of the same original thoughs, but none of them worked. In response to @shujatAli's answer, I get the error in all of them. – May 25 '15 at 12:45
1 Answers
0
Unless you give a more specific error message, we'll just have to give the generic advice which is:
- Clean your build
- Clean your build folder (hold down option when you select the "Product" menu in Xcode
- Restart Xcode

Stephen Darlington
- 51,577
- 12
- 107
- 152
-
I have tried all of this and none of them worked. I did all of these long before I decided to post my question on stackoverflow. My app is on the App Store, but I can't get the necessary screen shots because the simulator won't run. I am only 13, and I really can't figure this on out. I am 99% sure the error has to do with the corefoundation.framework. If you look at my comment above, it will provide more details about why I think that's the problem. Do you have any other suggestions? – May 25 '15 at 12:51
-
It also won't run on the simulator in both the beta version and public release version of Xcode, so I know the problem is NOT with Xcode, but with my app. My app is on the App Store, but without the simulator, I can't get all of the screenshots I need. You can check out my app here: https://appsto.re/us/fevW5.i. I want to have a third screenshot, but I can't get it because the simulator won't run. – May 25 '15 at 13:06
-
Does it happen with other projects or just this one? It might help if you show the linker error rather than just tell us the number. – Stephen Darlington May 25 '15 at 13:30
-
-
Copy your project files over to the new project. Or show us the full error message. There's not much to go in without it. – Stephen Darlington May 25 '15 at 14:52
-
I can't copy my files into a knew project because there is much more than just the code. The error says failed with linker code 1. The problem is with the corefoundation framework. I think that is the heart of the issue. How can I fix it? It's he typical Mach error. I've had this before, but not like this. I tried deleting the framework from my project, and it gave me 201 linker error. I'm sorry but I don't have my laptop with me so I can't give you the exact error right now. – May 25 '15 at 15:07
-
Without the error message there's nothing more that I can suggest. – Stephen Darlington May 25 '15 at 16:40
-