Ultilities method for iOS and MacOS