ios6), and I am finding that data being owned by a singleton is working
correctly on 64-bit platforms, but incorrectly on 32-bit... I am wondering if
there's something wrong with my implementation?
Basically.. My app delegate does:
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// stuff
[I18n loadTranslations];
}
...
I18n does:
@interface I18n ()
@property (nonatomic, copy) NSDictionary *translations;
@end
@implementation I18n
+(instancetype)sharedInstance {
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{
return [[self alloc] init];
});
}
+(void)loadTranslations {
TranslationsDataStorage *translationDataStorage = [[TranslationsDataStorage alloc] init]; // fetch translations from CoreData
I18n *i18n = [self sharedInstance];
i18n.translations = [translationDataStorage translationsForLocale:[self locale]];
}
+(BOOL)hasTranslations {
return [[self sharedInstance] hasTranslations];
}
// stuff...
...
In the app, on 64-bit devices, when hasTranslations is called, it's always true
on application boot..
on 32-bit devices, it's always false on application boot.......
I debugged and found that the translations are properly returned from core data
on the 32-bit device, so it seems like for some reason, the I18n translations
property is not being retained or something?
Patrick J. Collins
http://collinatorstudios.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list (Objc-language@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/objc-language/anirudha.k.cpp1%40blogger.com
This email sent to anirudha.k.cpp1@blogger.com
No comments:
Post a Comment