Skip to content

Instantly share code, notes, and snippets.

@tomassliz
Created February 8, 2019 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomassliz/0f130eeb9a5773dbdbfc669a763bdda6 to your computer and use it in GitHub Desktop.
Save tomassliz/0f130eeb9a5773dbdbfc669a763bdda6 to your computer and use it in GitHub Desktop.
Check if the app is installed from TestFlight
// 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