Uwes Blog

Projects, thoughts and more

Example project for Swift C Interop

I started to learn Swift 2.0, an how to integrate with C. Therefore i have created a small Swift-C Interoperabilty project, which can be found on github.

As soon as i will start to wrap some C/C++ Libs, more examples will be added.

There was also a nice Swift compiler crash, which you can test with your environment too, just clone my github project, uncomment the line leading to the compiler crash and comment the correct line.

Sending Apple Push Notifications with Erlang

First of all you have to be sure you have installed Erlang together with SSL. On Mac OS X that can be done with MacPorts:

sudo port install erlang +ssl

Create Certificate and Key for SSL

First export cert and key as p12 (apns-cert.p12, apns-key.p12) with the “Keychain Access” Tool.

After that you can convert the p12 files to pem files:

openssl pkcs12 -clcerts -nokeys -out apns-cert.pem -in apns-cert.p12
openssl pkcs12 -nocerts -out apns-tmp-key.pem -in apns-key.p12 -nodes
openssl rsa -in apns-tmp-key.pem -out apns-key.pem

boost 1.45 for iOS 4.3

Create an user-config.jam in your home directory (with your actual compiler path)

using darwin : 4.2.1~iphone
   : /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2
      -arch armv7 -mthumb -fvisibility=hidden -fvisibility-inlines-hidden
   : <striper>
   : <architecture>arm <target-os>iphone
   ;

using darwin : 4.2.1~iphonesim
   : /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
      -arch i386 -fvisibility=hidden -fvisibility-inlines-hidden
   : <striper>
   : <architecture>x86 <target-os>iphone
   ;]]>

boost 1.39 for iPhone 3.0

TinyJSON and boost 1.38

Today i compiled (link no longer available) TinyJSON on my Mac with boost 1.38. Because many of the used headers inside boost.Spirit have been moved into new files and namespaces Changelog, you need to make some changes in tinyjson.hpp.