This question already has answers here:
Xcode - OSX error: -fobjc-arc is not supported on platforms using the legacy runtime
(3 answers)
Closed 8 years ago.
So I am trying to run the code that I have written up from a tutorial however I have come across this problem. Could anyone help me out?
http://imgur.com/dPpUeBD
first off, the error you are getting is -fobjc-arc is not supported on platforms using the legacy runtime. clang is exiting with a return code of 1, which just means it failed (not sure where else you are getting the "1" from).
the reason you would get that error is because you are trying to build for some old system that doesnt support ARC. you dont even specify if this is iOS or Mac OS so giving you more of an answer is difficult.
Related
I've been trying to enable 64-bit in my project as this is now a requirement for submitting app to the App Store. What I've done so far to convert my app to support 64-bit is actually following others' questions/answers I've searched on StackOverflow and what I've found came down to
Set Architectures to "Standard architectures (armv7, arm64)"
Set Valid Architectures to "arm64 armv7 armv7s"
Set Build Active Architectures Only to "No" (some mentioned this, so I just tried it out)
Those above create errors of Apple Mach-O Linker Error. I totally got 13 errors of them. They're shown in details as pictures below:
It looks to me like a Parse framework issue but I'm too new to know that for sure. Even so, I've tried to to replace my current Parse.framework with a new one I downloaded from its website. It created even more issues that might be caused by my bad on how I replaced that new framework. I've searched on Parse website what the best way to update framework but answers I found seem there's no certain way to do it. Anyway I followed this https://parse.com/questions/what-is-the-best-way-to-rollout-new-parse-changes but it's not working.
So I decided to drop my question here hoping someone tapping in to guide me the right path to go before I fall into the long wrong one. Thanks very much in advance.
I solved this question by successfully upgrading Parse.framework (also thanks to #Raptor) to the latest downloaded from Parse website.
This question already has answers here:
presentModalViewController:Animated is deprecated in ios6
(5 answers)
Closed 8 years ago.
I'm trying to edit my source code on Xcode, but I keep getting an error.
Code:
// Present the mail composition interface.
[self presentModalViewController:picker animated:YES];
ERROR: 'presentModalViewController:animated:' is deprecated: first deprecated in iOS 6.0
Is there any way to fix this?
Typically, using deprecated features in any programming language may not work or may result in malfunctioning software.
Wikipedia defines deprecated as:
Deprecation is an attribute applied to a computer software feature,
characteristic, or practice to indicate that it should be avoided
(often because it is being superseded).
In short, you shouldn't be using presentModalViewController:animated:, and that's why you're getting the error.
http://en.wikipedia.org/wiki/Deprecation
I'm running some code that does a [NSDictionary objectForKeyedSubscript:] and it's crashing on iOS 5, but not iOS 6. I am using xcode 4.5.2 and compiling against the iOS 6.0 SDK.
I assumed that this would work on iOS 5 since it's just a compiler feature? Am I wrong about that? I can just write my own versions of those functions, but I'm worried that something else is wrong since I would expect it to work.
NSDictionary reference for IOS in Apple developer
Available in iOS 6.0 and later.
OK, I'm going to answer my own questions, although I don't completely understand why it was failing.
Using objectForKeyedSubscript: and the like works fine running in iOS 5 (as long as it was compiled against the iOS 6 SDK).
The problem was I named a function +(void)load and making objectForKeyedSubscript: calls in this function causes an assert due to the method not being found.
This was an naming error on my part because the load method is called before the App is fully running. I have changed the name of my function and all is well.
I assume +load is being called before something with NSDictionary is fully inited. Odd that it works under iOS 6 and just not iOS 5.
Maybe that's not odd.
There is a workaround for pre-iOS6 SDKs
Checkout question here: Is there any way to get the neat Objective-C literal indexing feature in Xcode 4.4?
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Game programming on Objective-C and linux
Hi i am new to objective C and i dont have mac machine to run objective C program. I googled alot for the commands and solutions to run but i didnt get any thing. Can any suggest me any solution to run objective C program on fedora along with commands.
Any help is appricated.
Thanks
Programming in Objective-C by Stephen Kochan Has a couple of chapters at the start of the book that show how to compile Objective-C programs from the command line using GCC.
The updated edition may have been updated to replace GCC with LLVM, but I haven't read those yet.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Xcode 4 - The selected run destination is not valid for this action.
Hi everyone,
I'm currently learning Obj-C and I'm dealing with a book that provides a lot of sample xcode projects.
I've a problem when trying to run the code: it appears an alert saying "The selected run destination is not valid for this action".
This happen only in xcode 4+. In the old version all work fine.
Can you help me solving this? Thanks a lot.
I had this problem also.
You need to make sure the Base SDK is set correctly for the debug and release of you Application Target.
If its missing i.e 10.5 then you will get this message.
in my v4 of xcode it does not have a 10.5 sdk. But my Application Target was set to 10.5.
So I needed to change it to 10.6.
I did this by selecting the Targets Build settings of the Project.
and then changing the base SDK's there.