Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8038283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:11:10+00:00 2026-06-05T03:11:10+00:00

In X code, If I create a new project with automatic reference counting (ARC),

  • 0

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.enter image description here. OfflineSpotty is the ARC file I created. MapView.xcodeproj is the non-ARC project I added in. Hopefully the image clarifies things a bit.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T03:11:12+00:00Added an answer on June 5, 2026 at 3:11 am

    According to comments below the question is : “How to add mapbox ios sdk to my project ?”

    You can follow these instructions to include a static lib from an open source project to your own project : http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/

    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?

    The static library is already compiled so you don’t need to worry about it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a new log file every hour with the following code
Lets say that I'm trying to create a new process with the following code:
How can I create a new project that only uses the Symfony2 Console component?
Background - I am using automatic reference counting on a project. The root view
I have a model (Project), in the 'new' action I have this code <h1>Create
I have a model (Project), in the 'new' action I have this code <h1>Create
I have a TabBar that I've created through IB, I chose create new project
I try use jira soap api on c#: create new project in VS2010 add
I created a new project with the following code segment: char* strange = (Strange??);
I am using following code to create new wifi access point and to connect

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.