arashpayan/appirater — pull request #129 by eager (2013-08-21 15:14:22+00:00)
Title: Move lproj directories to Appirater.bundle when using CocoaPods

### Issues

When using Appirater via CocoaPods, the `lproj` directories are copied to the root of the main bundle. This causes two issues:

1. They conflict with any localization in the main app.
2. The App Store detects these localized bundles and assumes the app is fully localized into all 25+ languages Appirater supports. [These Google results][goog] suggest this affects more than 1000 apps.

### Solution

CocoaPods [recommends][doc] setting `spec.resource_bundles` instead of `spec.resources` to avoid the collision from issue 1. To support this use case, the code checks if `Appirater.bundle` exists. If it does, it uses the string table from that bundle. If it doesn’t exist, which will be the case if the developer is using Appirater via a submodule or other method, then the main bundle will be used, as it is today.

### Caveat

This is *not* backwards-compatible for users who have provided custom strings via their own `AppiraterLocalizable.strings`. These users must call the new method `[Appirater setAlwaysUseMainBundle:YES]`. To maintain [semantic versioning][semver], Appirater’s major version number should be incremented (e.g., it should become 2.0) after this is merged.

### Note for those wishing to work around the second issue before this is merged.

You can use the `Podspec` from this pull request locally:
```ruby
pod 'Appirater', :podspec => 'Vendor/Appirater.podspec'
```

You’ll need to manually create/copy `AppiraterLocalizable.strings` to any localized bundle(s) you have.

[doc]: http://docs.cocoapods.org/specification.html#resource_bundles
[semver]: http://semver.org
[goog]: https://www.google.com/search?q=site:itunes.apple.com+Languages:+English,+Bokm%C3%A5l,+Norwegian,+Catalan,+Czech,+Danish,+Dutch,+Finnish,+French,+German,+Greek,+Hebrew,+Hungarian,+Indonesian,+Italian,+Japanese,+Korean,+Polish,+Portuguese,+Romanian,+Russian,+Simplified+Chinese,+Slovak,+Spanish,+Swedish,+Traditional+Chinese,+Turkish&ie=UTF-8&oe=UTF-8