Ended up adding the following :
int main(int argc, char *argv[]) {
@autoreleasepool {
#if TARGET == TARGET_AR
NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:[NSArray arrayWithObject:@"ar-SA"] forKey:@"AppleLanguages"];
[defaults synchronize];
#endif
return UIApplicationMain(argc, argv, NSStringFromClass([SNFIdleDetectorApplication class]), NSStringFromClass([SNFAppDelegate class]));
}
}
Though I do find this kind of ugly.
Edit : It may be interesting to note that when set to Arabic, the device shows @"ar"
as the AppleLanguages first value, and not @"ar-SA"
. I guess flipping the view doesn't work with the @"ar"
locale, although I'm unsure whether that's a bug, or if some arabic countries write LTR, thus making sense not to systematically flip the view.