-
Beta Was this translation helpful? Give feedback.
Answered by
lingol
Feb 11, 2025
Replies: 2 comments 12 replies
-
There's not much place for assigning g_rootDir. Can you set a breakpoint to see when & where exactly it's set with empty? |
Beta Was this translation helpful? Give feedback.
10 replies
-
Oh, I just noticed that you init mmkv by some - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// init MMKV in the main thread
[MMKV initializeMMKV:nil];
//...
return YES;
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
lingol
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh, I just noticed that you init mmkv by some
+load
method. Looks like it's invoked before the g_rootDir's own initialization function__cxx_global_var_init
.Never do that.
Move to the
didFinishLuanching
as we suggested in the doc/wiki.