Modified pubnub example to fix the random crashes on iOS