I am working with the creation of static library file.In that i added aggregate and i did the following steps
1.Clicked on the Project Navigator 2.Next clicked on the UniversalLib(Name of the Aggreagte which i have given) 3.Build settings 4.Add build Phase 5.Add Run Script and I expanded the Run Script Module and i wrote the following code
# define output folder environment variable
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# Step 1. Build Device and Simulator versions
xcodebuild -target ImageFilters ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
xcodebuild -target ImageFilters -configuration ${CONFIGURATION} -sdk iphonesimulator -arch i386 BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}"
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 2. Create universal binary file using lipo
lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/lib${PROJECT_NAME}.a" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/lib${PROJECT_NAME}.a"
# Last touch. copy the header files. Just for convenience
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/include" "${UNIVERSAL_OUTPUTFOLDER}/"
6.Then I selected the aggregate target in the Scheme Selection drop down.
7.I am getting the following errors…
fatal error: lipo: can't open input file: /Users/admin/Library/Developer/Xcode/DerivedData/StaticLibrary-frasjhywfplfpoetbcefljbwhqcd/Build/Products/Debug-iphoneos/libStaticLibrary.a (No such file or directory)
cp: /Users/admin/Library/Developer/Xcode/DerivedData/StaticLibrary-frasjhywfplfpoetbcefljbwhqcd/Build/Products/Debug-iphoneos/include: No such file or directory
can anyone please help me to solve out.I searched in so many sites but no use.
I am doing this example by following this tutorial.... http://www.raywenderlich.com/41377/creating-a-static-library-in-ios-tutorial
0 comments:
Post a Comment