In X code, If I create a new project with automatic reference counting (ARC), and add an existing non-ARC project via File-->Add Files to (is that considered adding to workspace? Not sure about the workspace term), would that work? So the new code I write in this project can be ARC code?
When you add project this way, files are not listed in the "compiled sources"; therefore, I have nothing to set "-fno-objc-arc" on.
I notice that MapBox-ios-example seems to be doing this. Do you just add it in and not think about it?
A separate question is what if it's a non-ARC static library (.a) I'm linking to my ARC project? Do I have to do anything special with the classes in the non-ARC library?
EDIT: Hi sorry for the late response.
Almost all of you answered pretty well to my second question which I'm thank you all for it. Since nverinaud is the first to answer that question, I'm learning toward giving him the credit. (There seems to be a a time limit to awarding the bounty? If left the answers they are I would like to give nverinaud the credit.)
However I still have doubt to my first question. I'm adding a non-ARC "project file" itself into my current ARC project, according to the Mapbox examples and instructions). I must emphasize that I am NOT adding the source files (.m .c) into the project individually but adding the project file. The .m and .c seems to be in a separate project in a separate folder. And this Mapbox project has calls like [view release] and I don't NEED that special -fno-objc-arc flag to silence the warnings because the warnings aren't there.
I understand that usually when you add a non-ARC source files into your ARC project you WILL receive compiler warning which won't let you pass the compiler stages. However in my case I don't get any. My question in particular is not how to put the flag (which I know), it is whether or not I need the flag (I'm guessing I don't, I might even have compiler warning when I put it in? I didn't try.) Because, there is no warning whatsoever without the flag. And I am asking for some sort of explanation why there was no warning, and whether I am doing things right.
Here is a screen shot.. OfflineSpotty is the ARC file I created. MapView.xcodeproj is the non-ARC project I added in. Hopefully the image clarifies things a bit.