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 8130147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:36:04+00:00 2026-06-06T08:36:04+00:00

I’m about to start writing a static library for an iOS application and got

  • 0

I’m about to start writing a static library for an iOS application and got couple of questions

  1. Is it ok to use pure C++ inside the library and expose public classes that do have methods accepting std::vector and such?
    1. I’m coming from a strong typed programming world such as C++ and C# and is much more easy for me to use C++ for this library.
    2. In general, are pure iOS developers ok to use C++ code and change their .m files into .mm?
  2. In xCode can I have both static library and a demo project both loaded into same application so it would be easier to debug?
  3. How do I make a post-build step for the static library project so it copies the .a file to needed location?
  4. How do I debug the static library?
  5. In general, are static libraries a common stuff for iOS project, or everyone prefers source code to be embedded into their application?

Any articles or books about this are very welcome.

Thx

  • 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-06T08:36:05+00:00Added an answer on June 6, 2026 at 8:36 am

    This is a lot of questions, but I have partial answers.

    1) Not sure on this, as I don’t generally use Objective-C++, but the second part yes you can use C++ (the 1998 standard as of LLVM v3) and changing your extension to .mm will automatically let the compiler know that you want to compile it using Objective-C++.

    2) The best way to do this is to create a project reference. Make a project out of your static library, then drag that project as a subproject of your other project.

    3) See step 2, then add the .a file in your Link With Library section in Build Phases.

    4) Since the source code will show up in your project, I assume you can simply place breakpoints but I’m not sure.

    5) Yes, making libraries is very common. In fact it would be silly not to if you need to use the same code in more than one project.

    I urge you to make a cross project reference, because otherwise I’m sure you will forget that you need to compile the static library for every build type (debug/release and simulator/device). Cross project referencing will take care of this for you.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
Specifically, suppose I start with the string string =hello \'i am \' me And
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
public static bool CheckLogin(string Username, string Password, bool AutoLogin) { bool LoginSuccessful; // Trim
i got an object with contents of html markup in it, for example: string

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.