import Foundation

@objc public class TestFlightDetect: NSObject {
    @objc public func isFromTestFlight() -> Bool {
		return Bundle.main.appStoreReceiptURL?.lastPathComponent == "sandboxReceipt"
    }

    @objc public func isInSimulator() -> Bool {
		return Bundle.main.appStoreReceiptURL?.lastPathComponent == "CoreSimulator"
    }

    @objc public func isFromAppStore() -> Bool {
		  guard let path = Bundle.main.appStoreReceiptURL?.path else {
          return false
      }
      return !path.contains("CoreSimulator") || !path.contains("sandboxReceipt")
    }

    /*@objc public func bundleConfigType() -> String {
		return String(decoding: Bundle.main.object(forInfoDictionaryKey: "Config"), as: UTF8.self)
    }*/
}
