nicklockwood / iRate

[DEPRECATED]
http://charcoaldesign.co.uk/source/cocoa#irate
Other
4.1k stars 733 forks source link

Localization bug when used as framework #226

Open ast opened 8 years ago

ast commented 8 years ago

There's a small bug in iRate.m when iRate is used with Cocoapods. iRate is looking for the localizations bundle in the main bundle but it's actually embedded in the iRate.framework bundle and is not found. This can be solved by this fix. I'm not sure about a general solution.

    //NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"iRate" ofType:@"bundle"];
    NSBundle *frameworkBundle = [NSBundle bundleForClass:[self class]];
    NSString *bundlePath  = [frameworkBundle pathForResource:@"iRate" ofType:@"bundle"];

Thanks for an awesome library!

ogezue commented 8 years ago

+1 The solution is working! (I'm using Swift and Cocoapods)

appsunited commented 8 years ago

+1 Thanks for solving this! Also using Swift with Cocoapods and version 1.11.4 is not translating. so it would be great to merge this solution.

weakfl commented 8 years ago

+1, please merge