可判断是testflight应用还是其他。

var isDebugConfiguration = false
#if DEBUG
isDebugConfiguration = true
#endif
print(Bundle.main.appStoreReceiptURL?.lastPathComponent ?? "")
if Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt" {
    isDebugConfiguration = true
}
print(isDebugConfiguration)