omnivore/apple/OmnivoreKit/Sources/Utils/BundleExtensions.swift

22 lines
420 B
Swift
Raw Permalink Normal View History

2022-02-11 17:24:33 +00:00
import Foundation
public extension Bundle {
var isAppStoreBuild: Bool {
#if DEBUG
return false
#else
guard let path = appStoreReceiptURL?.path else {
return true
}
return !path.contains("sandboxReceipt")
#endif
}
}
// Convenience for locating package resources externally
public enum UtilsPackage {
public static var bundleURL: URL {
Bundle.module.bundleURL
}
}