Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Appirater.m
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ + (NSBundle *)bundle
bundle = [NSBundle mainBundle];
} else {
NSURL *appiraterBundleURL = [[NSBundle mainBundle] URLForResource:@"Appirater" withExtension:@"bundle"];

if (appiraterBundleURL) {
// Appirater.bundle will likely only exist when used via CocoaPods
bundle = [NSBundle bundleWithURL:appiraterBundleURL];
} else {
bundle = [NSBundle mainBundle];
NSError *err;
if (![appiraterBundleURL checkResourceIsReachableAndReturnError:&err]) {
// integrate appirater by framwork in swift project
appiraterBundleURL = [[NSBundle bundleForClass:[Appirater class]] URLForResource:@"Appirater" withExtension:@"bundle"];
}
// Appirater.bundle will likely only exist when used via CocoaPods
bundle = [NSBundle bundleWithURL:appiraterBundleURL];
}

return bundle;
Expand Down