Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue that appirater get wrong localized string when integrated by framework #276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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