user1429322
user1429322

Reputation: 1286

Using static libraries in Xcode

I am a newbie to iOS development. I am trying to import and use a static library from a private vendor. I imported the library correctly as given in various tutorials ( I added the library in header search path, library search path, added in Linked frameworks and libraries ). But the issue is I do not know how to use them. The ".a" files do not have any headers. Can somebody say how to use them?

I tried importing them like this. But all of them gave file not found error.

import "abcdef.a"
import <abcdef.h>

Upvotes: 0

Views: 1475

Answers (1)

gran33
gran33

Reputation: 12951

  1. Remove the import .a file (never do so)
  2. Add the dependencies in Build Phases in the Link Binary With Libraries
  3. In your app, (not the static lib) u should use the classes from the static lib like them inside your project for example: #import "MyClass.h"

Upvotes: 2

Related Questions