Question

I am from a Windows background and I am used to creating SDKs by creating (.dll)s and then distributing all the libraries and Documentation.

So, if a user wants to use it, he adds a reference to the library and uses it. However, in a Mac, I am working on a SDK and I want a way of creating and distributing Mac libraries.

(I want to create the library in Objective-C) Please help me :)

Était-ce utile?

La solution

If you're creating a Mac library, you have either the option of creating a dylib, which includes only the compiled binary for the library, or creating a framework, which includes the compiled binary as well as headers and other bundle resources used by the library, in a single package. Frameworks are the preferred method of library distribution for the Mac.

If you're creating an iOS library, iOS doesn't support dynamic libraries of any kind (no dylibs or frameworks) so you're stuck with creating static libraries to distribute your code.

Autres conseils

Both Mac and iOS have Dynamicly Linked Libraries. They just are not called that. They are generally just referred to as Shared Libraries and they typically are wrapped in Frameworks.

Unfortunately, iOS limits the use of Shared Libraries to System Libraries and does not allow installing shared libraries on non-jailbroken devices.

Both platforms also support Static Libraries.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top