Compiling swiften library for iPhone sdk

Library Short Description: Library Link

I want to compile a quick library (i.e. http://swift.im/git/swift/tag/?id=swift-2.0beta1 ) for iPhone sdk. I checked my document folder and compilation method, but they only mentioned compilation steps for Windows and Unix (i.e. this page contains a link for compilation files http://swift.im/download/#apt ). But I'm not going to compile it for iPhone sdk. The steps they mentioned do not work. So can anyone explain to me? After checking one of the files, I found out that it can be compiled for the iPhone.

Another question that they mentioned is that it is licensed under GNU General v3, so can I use it in commercial applications, especially an apple, to approve it?

Any help would be greatly appreciated. Thanks

+5
source share
2 answers

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.

+3

All Articles