The numbers Swiftenalready have built-in support for creating an iOS device or simulator. I was able to build it, but did not check.
I assume that you are z Xcode 4.4 (or something quite modern) and the target iOS 5.1 works on iPhone> 3GS . Also, I assume that you want to build swiften-1.0. (if for an earlier iPhone, change armv7to armv6below)
It takes several steps to create it.
Fix paths and SDK version
swift-1.0/BuildTools/SCons/SConstruct :
232
env["XCODE_PLATFORM_DEVELOPER_BIN_DIR"] = "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin"
to
env["XCODE_PLATFORM_DEVELOPER_BIN_DIR"] = "/Applications/Xcode.app/Contents" + "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin"
234 armv6 armv7
- 239 "4.0" "5.1"
240
env["XCODE_SDKROOT"] = "/Developer/Platforms/" + sdkPart + ".platform/Developer/SDKs/" + sdkPart + sdkVer + ".sdk"
to
env["XCODE_SDKROOT"] = "/Applications/Xcode.app/Contents" + "/Developer/Platforms/" + sdkPart + ".platform/Developer/SDKs/" + sdkPart + sdkVer + ".sdk"
crt_externs.h swift-1.0/
( Matt Galloway Boost iPhone)
crt_externs.h swift; swift-1.0/ :
cp /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/usr/include/crt_externs.h .
openssl
Swiften openssl, iOS , . :
cd <swift-directory>/3rdParty/OpenSSL
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
soruce of openssl; script GitHub. <swift-directory>/swift-1.0/3rdParty/OpenSSL, ,
wget --no-check-certificate https://raw.github.com/st3fan/ios-openssl/master/build.sh
build.sh - 10 1.0.1b 1.0.1c.
chmod +x build.sh , , ./build.sh. , openssl.
Swiften
- swift
./scons Swiften allow_warnings=yes target=iphone-device openssl="<swift-directory>/3rdParty/OpenSSL"
, ; , target=iphone-device target-iphone-simulator . libSwiften.a <swift-directory>/Swiften.