nicklockwood / iRate

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

Country Identification doesn't work for GB #188

Closed PlasmaSoftUK closed 9 years ago

PlasmaSoftUK commented 9 years ago

Hi, I've been using iRate for a while in my apps, great work! I'm currently re-writing one for IOS 8 and figured I would upgrade the version of iRate I was using. I Had two problems with this version with Xcode 6.1 ..

First the country identification doesn't work for me, my app is only available in the UK / GB app store. I simply commented out the get country stuff and put ... self.appStoreCountry = @"gb";

http://itunes.apple.com/gb/lookup?bundleId=uk.co.plasmasoft.BusTimes

The other issue was I got an error for 'Cocoa.h' from ..

if TARGET_OS_IPHONE

import <UIKit/UIKit.h>

else

import <Cocoa/Cocoa.h>

endif

Again it just removed all the other stuff and left import <UIKit/UIkit.h> and that fixed it for me.

Kind Regards Plasma

napolux commented 9 years ago

Same issue for me... Cocoa.h not found. Of course my project is iOS.... Working on XCODE 6 (last version) and compiling for iOS7/8

Fixed by removing check in iRate.h.

nicklockwood commented 9 years ago

These two issues are unrelated.

The Cocoa.h not found bug was due to the #import <TargetConditionals.h> being missing from iRate.h - I've fixed that for the next release.

The country detection is working correctly for me, but it is based on the locale of your system. If your device (or the simulator) is set to US locale then it will use that - I expect that's why it wasn't working correctly for you.

If you want to hard-code the locale however, you can do so by putting the following in your App Delegate - there's no need to modify the iRate library:

+ (void)initialize
{
    [iRate sharedInstance].appStoreCountry = @"gb";
}