Utility functions for iOS