Add logging function for iOS.