Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't build the static library #182

Open
tbinnewies opened this issue Jul 13, 2012 · 1 comment
Open

can't build the static library #182

tbinnewies opened this issue Jul 13, 2012 · 1 comment

Comments

@tbinnewies
Copy link

hi,
i would like to build the static library for route-me but the script doesn't work.
i choose the target MapView-framework, zhe i've got the message. that
the script has started but immediatly(perhaps a half second) later i've
got the message build succeded, but no error messages and i can't find
any framework :(

any ideas?

thx
thorsten

@tbinnewies
Copy link
Author

hi,
i've solved the errors and got the build for the static framework. i had to modify the run-script to the following to build the framework in Xcode 4.3.3:

'# Script that builds a static framework with debug and release versions
'# The framework works in both the simulator and devices
'# This script does not consider the selected active build. It builds everything!
'#
'# You can just drop the resulting framework in your project and it'll work whatever your build type

echo "Starting build of ${PRODUCT_NAME} framework"

'# set version to svn version if it's not set
if [ -z "$VERSION" ]
then
VERSION=svnversion -n "${SRCROOT}"
fi
if [ -z "$VERSION" ]
then
echo "Can't find svn version"
else
export VERSION="r${VERSION}"
fi

echo "Build version is: $VERSION"

if [ -d "${SRCROOT}/build/${PRODUCT_NAME}.framework" ]
then
rm -rf "${SRCROOT}/build/${PRODUCT_NAME}.framework"
fi

echo "Building iphonesimulator5.1 Debug"
xcodebuild -target "${PRODUCT_NAME}" -configuration Debug -sdk iphonesimulator5.1
echo "Building iphoneos5.1 Debug"
xcodebuild -target "${PRODUCT_NAME}" -configuration Debug -sdk iphoneos5.1
echo "Building iphonesimulator5.1 Release"
xcodebuild -target "${PRODUCT_NAME}" -configuration Release -sdk iphonesimulator5.1
echo "Building iphoneos5.1 Release"
xcodebuild -target "${PRODUCT_NAME}" -configuration Release -sdk iphoneos5.1

echo "Creating skeleton framework"
tar xf "${SRCROOT}/Canonical.framework.tar" -C "${SRCROOT}/build/"

echo "Creating fat library for Debug"
lipo "${SRCROOT}/build/Debug-iphoneos/lib${PRODUCT_NAME}.a" "${SRCROOT}/build//Debug-iphonesimulator/lib${PRODUCT_NAME}.a" -output "${SRCROOT}/build/${PRODUCT_NAME}.framework/Versions/A/${PRODUCT_NAME}_debug" -create

echo "Creating fat library for Release"
lipo "${SRCROOT}/build/Release-iphoneos/lib${PRODUCT_NAME}.a" "${SRCROOT}/build/Release-iphonesimulator/lib${PRODUCT_NAME}.a" -output "${SRCROOT}/build/${PRODUCT_NAME}.framework/Versions/A/${PRODUCT_NAME}" -create

echo "Finishing packaging framework"
ln -s "Versions/A/${PRODUCT_NAME}" "${SRCROOT}/build/${PRODUCT_NAME}.framework/"
ln -s "Versions/A/${PRODUCT_NAME}debug" "${SRCROOT}/build/${PRODUCT_NAME}.framework/"
cp Map/
.h "${SRCROOT}/build/${PRODUCT_NAME}.framework/Versions/A/Headers/"
cp -R Map/Resources/_ "${SRCROOT}/build/${PRODUCT_NAME}.framework/Versions/A/Resources/"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${VERSION}" "${SRCROOT}/build/${PRODUCT_NAME}.framework/Versions/A/Resources/Info.plist"

echo "Completed build of ${PRODUCT_NAME} framework"

jklimke pushed a commit to jklimke/mapbox-ios-sdk that referenced this issue Feb 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant