How to install Application via Test Flight in IOS ?

I found something on how to install Application via Test Flight in IOS .

Here, appStoreReceiptURL is an instance property, which we can find from main bundle.

Screenshot 2019 03 26 at 3.12.47 PM

Here, I am adding snippet for both Objective-C and Swift.

Objective-C

- (BOOL)isTestFlight {
NSURL *appStoreReceiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
if (appStoreReceiptURL != NULL) {
return [appStoreReceiptURL.lastPathComponent isEqualToString:@"sandboxReceipt"];
}
return NO;
}
- (BOOL)isTestFlight {
NSURL *appStoreReceiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
if (appStoreReceiptURL != NULL) {
return [appStoreReceiptURL.lastPathComponent isEqualToString:@"sandboxReceipt"];
}
return NO;
}

Swift

func isTestFlight() -> Bool {
guard let appStoreReceiptURL = Bundle.main.appStoreReceiptURL else {
return false
}
return appStoreReceiptURL.lastPathComponent == "sandboxReceipt"
}
func isTestFlight() -> Bool {
guard let appStoreReceiptURL = Bundle.main.appStoreReceiptURL else {
return false
}
return appStoreReceiptURL.lastPathComponent == "sandboxReceipt"
}

tips & tricks

Join 7,719 other subscribers

interview questions


Algorithm Android Android Studio API APP Programming Apps blogging Browser CheatSheets Code Config CSS DATABASE dsa error Features HTML HTML5 IDE installation Interview Questions IOS iPhone javascript Mac objective-c OneDrive OS Placeholder Programming quicktips SDK SEO Settings SMO SQL swift swiftUI Teams Tips & Tricks Tools UI Web Wordpress Xcode


Archives

Discover more from CODE t!ps

Subscribe now to keep reading and get access to the full archive.

Continue reading