Encode & Decode string for iOS