Migrating from appStoreReceiptURL to AppTransaction

How to detect TestFlight builds now that appStoreReceiptURL is deprecated.