Created
February 8, 2019 21:03
-
-
Save tomassliz/0f130eeb9a5773dbdbfc669a763bdda6 to your computer and use it in GitHub Desktop.
Check if the app is installed from TestFlight
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Should be working for free apps too | |
func isTestFlight() -> Bool { | |
guard let appStoreReceiptURL = Bundle.main.appStoreReceiptURL else { | |
return false | |
} | |
return appStoreReceiptURL.lastPathComponent == "sandboxReceipt" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment