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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:30:06+00:00 2026-05-28T15:30:06+00:00

I am a new iOS developer. I got a very basic doubt. I read

  • 0

I am a new iOS developer. I got a very basic doubt. I read at many places that we need to ship our .h file along with a .a file for a static library.

And .a files are compiled libraries, having entire implementation, which developers cannot read themselves, just to safe-guard implementer code.

And we need .h file to know what public functions are available. but then why cannot Xcode just decode .a file and use it directly instead of shipping another .h file. Xcode doesn’t need to show the .a implementation to developers, but instead can suggest developers with publicly available methods.

I dont see any logical reason why Apple didnt do this way. I am sure there is definitely a strong reason for shipping .h files. I want to know what could be the reason?

  • 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-05-28T15:30:07+00:00Added an answer on May 28, 2026 at 3:30 pm

    An .a file is simply an archive of one or more .o (object) files. Object files contain the compiled machine code (for one specific operating system under a specific CPU architecture). The original source code is “lost”.

    The fact you probably didn’t know about: object files can contain binaries compiled from an arbitrary programming language. An .h file is C/C++/Objective C specific. It contains the data types and function prototypes you need to be able to use the functions/data types/… contained in binary form in an object file in C/C++/Objective C. You could e.g. write a Pascal library, compile it to a .a file and use that code in your Objective C program using an appropriate header (.h) file.

    You could also have only one header file (.h file) but e.g. 6 different .a files: One compiled for Mac OS X 64bit, one for Mac OS X 32bit, one for Linux 2.6 64bit, one for Linux 2.6 32bit, one for FreeBSD and the last for OpenBSD.

    And last but not least, it wasn’t Apple who decided to go that way, .a and .o files can be found on (at least) any Unix-like operating system and header files are the standard in C since the very first days.

    Usually if you port a library from Mac to Linux, you can use (most of) the code and the header file but have to compile a separate .a file containing the object files compiled for Linux.

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

Sidebar

Related Questions

First of all, I am a a very new Objective C/Cocoa iOS Developer but
We are new to iOS development and this is our first application for iPad
Hoping someone can help a new iOS developer out - I have a ready
guys I'm a new iOS developer, I'm having a problem when calling soap functions
http://developer.apple.com/library/ios/#samplecode/Touches/Introduction/Intro.html I'm new to IOS development, and have been playing around with the IOS
I already created my xcdatamodel file. Then I follow instruction in http://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/XcodeCoreDataTools/Articles/xcdCreatingUserInterface.html#//apple_ref/doc/uid/TP40006854-SW1 So I
Our customer has just joined the iOS Developer Enterprise Program. They have signed the
i am new to openGL. Iam using apple documentation as my major referens http://developer.apple.com/library/ios/#documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/TechniquesforWorkingwithVertexData/TechniquesforWorkingwithVertexData.html#//apple_ref/doc/uid/TP40008793-CH107-SW6
New to iOS development, I've been following the tutorials on developer.apple.com, and am now
I’m an experienced developer, but relatively new to iOS. I’m having some trouble with

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.