You have to make Cocoa Touch Static Library . This contains all the header and implementation files that you want to send, and then use the script as shown below:
#!/bin/bash
echo building for ARM architecture
xcodebuild -sdk iphoneos4.2 "ARCHS=armv6 armv7" build > /dev/null
echo building for the i386 architecture
xcodebuild -sdk iphonesimulator4.2 "ARCHS=i386 x86_64" "VALID_ARCHS=i386 x86_64" build > /dev/null
mkdir "Fat Binary"
echo lipo binaries together
lipo -output Fat\ Binary/libMyLib.a -create build/Release-iphoneos/libmyLib.a build/Release-iphonesimulator/libmyLib.a
echo lipo binary saved at $./Fat Binary/libmyLib.a
echo coping headers
cp -R build/Release-iphoneos/usr "Fat Binary"
echo [COMPLETE]
This, in a nutshell, creates a folder containing the library (libmyLib.a) and a headers folder (usr) to be added to the target project, the headers Add-> Existing Files and Library by Add-> Existing framework-> Add another.
, , , libmyLib.a
.
, , , iOS , .