I'm creatic a static library to distribute to other projects (they don't see the library source code), and I wonder some questions:
-I follow this guide:
http://developer.apple.com/library/ios/#technotes/iOSStaticLibraries/Articles/creating.html
I create a .a file, several .h files and another .bundle file. The question is that my project library uses includes ResstKit (and uses it). In the product directory I see my library .a and the RestKit .a file. Do I have to distribute that restkit .a file? or is it already included inside my own .a file?
-The Apple guide doesn't say anything about fat or universal libraries. How can I create my library for the device and simulator at the same time? I see some scripts on the net, but I guess there must be some option there. What do you think? (BTW, do fat and universal have the same meaning?)
-Is there anyway to tell the target zip everything or create a DMG package? I guess using a Python script is possible, but I mean using any Xcode option.
Thanks in advance.
Related
I have some thirdparty code I want to add to my nativescript (iOS) project. The code consists of a .framework file and a .bundle file which contains a .momd file. I was thinking of adding this via a custom plugin, the docs are pretty clear on how to add the .framework file, but am not sure how I add and reference the bundle and underlying .momd file. Does anyone have any experience of this that they can share please?
I spent a lot of time poring over the iOS interop documentation while working on my nativescript-midi plugin, but I don't recall seeing anything specifically on adding bundles or .momd files. If possible, I suggest you create a new "container" iOS framework project in which you can import your desired framework, bundle, and .momd file, and then import that combined framework project into your plugin via a Podfile. That's essentially the approach I took to import a C library in my project (the cocoa-midi-message-parser repo referenced by the Podfile in my plugin).
In case anyone else needs to do this. I ended up using cocoapods xcodeproj gem to inject my file into my workspace file. A gist of the working code is here.
I've downloaded the SoundTouch folder from their website and now I don't know what to do with it. I'm trying to integrate the pitch-manipulation feature into an iOS app that allows the user to select a song from their library and change the pitch.
What do I need to include in the Xcode project from the SoundTouch folder, and where do I go from there? Any help is appreciated.
If you still need it to use SoundTouch in your iOS project, I have share a GitHub repository with that libraries compiled for armv7, armv7s, arm64, i386 and x86_64
https://github.com/enrimr/soundtouch-ios-library
To implement that compiled library in your project, you have to add SoundTouch directory (which includes libSoundTouch.a and the directory with headers) in your Xcode project and then include
#include "SoundTouch.h"
in your controller file.
I found this question googling "building soundtouch in Xcode"
It seems there is a project on github that has completed this successfully, https://github.com/mwhagedorn/SoundTouch
I was able to clone the repository, build the project, and include the libSoundTouch.a file in my project.
So you will need to include the soundtouch.h in the objective c file you want to access it from. From there create an instance of soundtouch, i.e. SoundTouch audioEngine = SoundTouch.createInstance();, and go from there.
I'm trying to build and run some of the example apps included in the Windows Azure Toolkit here, but it can't seem to find libwatoolkitios.a which is a required file for build. I have not modified the project in any way and I would assume that this file should be included automatically, so how do I get it? How have you guys been able to compile the apps successfully? Thanks.
The library libwatoolkitios.a is not provided as download instead you would need to build it first, described in the doc as below:
Open the watoolkit-lib Xcode project.
Compile the project for release.
Place the .a file and the header files somewhere that you can reference from your project (for this example lets say lib).
I want to know what's the best practice to use when integrating external SDK to my project, specifically how to handle the *.a file and the *.xcodeproj file.
Examples of external SDK packages: PhoneGap, Facebook, Google-Analytic.
Is there a reason to copy the *.xcodeproj to my existing project or is it enough to just use the *.a file?
Are there pros and cons for having more than one *.xcodeproj file in a single project?
You would never copy the .xcodeproj into your app.
Typically you would add the library (./a) or any headers and implementation files required (.h & .m).
Often you would compile the 3rd party SDK xcode project to a library file and include that compiled library file.
I would like to know what a .a file is used for?
I had downloaded a SDK and what I got was a set of .h files and a .a file , may I know for what is the function of .a file ?
an .a file is generally a precompiled library file.
The .h files will have the definition of all the classes inside the .a file.
You program using the interfaces defined in the .h files, and then configure xcode to link the library in when building your project.
To actually use it in your project, add all of your downloaded files to xcode as you normally would, but there is an additional step with the library.
If you navigate to the project (using xcode 4) then select the 'Build Phases' tab you will see a number of phases. You need to select the 'Link Binary with libraries' phase and add the .a file there.
A .a file is a statically linked library. You link to this binary during the compilation of any programs you write using it and the code of the SDK will be included in the final binary of your program. It differs from dynamically linked library where your binary only references the external code.
The .h files include declarations of the functions implemented within the .a file.