arashpayan / appirater

A utility that reminds your iPhone app's users to review the app.

Home Page:http://arashpayan.com/blog/2009/09/07/presenting-appirater/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Localizable files not available when installing from cocoapods

MartinMoizard opened this issue · comments

Hello,

I installed appirater with cocoapods (pod 'Appirater', '~> 1.0.1') but the localizable files are not present. Am I missing something?

Thanks

I'm not familiar with how cocoapods works, so someone else will have to comment on that.

The issue is that the Appirater pod includes a lot of *.lproj resources, ergo localizable.strings which is overwriting your project's default Localization setup. One solution is adding this to your main.m

int main(int argc, char *argv[]) {
    @autoreleasepool {
        [[NSUserDefaults standardUserDefaults] setObject:@[ @"en" ] forKey:@"AppleLanguages"];
        [[NSUserDefaults standardUserDefaults] synchronize];

        int retVal = UIApplicationMain(argc, argv, nil, nil);
        return retVal;
    }
}

An alternative is to overwrite the podspec, removing the s.resources line and store it somewhere like gist then modify your Podfile to point to your custom spec:

pod 'Appirater', :podspec => YOUR_CUSTOM_PODSPEC_URL

@nerdsRob is there a generic fix that can be applied to the repo's podspec that will properly address this for all CocoaPods users? If so, would you mind sending a pull request with it?

Oh god, this issue has caused me to waste about 4 hours. The developers should really take a look at the Cocoapods integration here, as that was the main reason for the problems. This issue combined with the recent issue of the symlinked files while submitting to the App Store is too much. Appirater was nice while it lasted, but the amount of trouble this caused is simply not worth it. Good bye.

Also, @arashpayan: You could take a look at other CocoaPod distributed libs and their podspec to get an idea what you might have to change to fix the issues.