This commit is contained in:
2026-07-15 16:19:07 +08:00
parent 64bad7c077
commit 544f4b2d01
7963 changed files with 447731 additions and 972637 deletions
@@ -0,0 +1,12 @@
#import <Foundation/Foundation.h>
extern "C" {
__attribute__((visibility("default")))
const char* _GetDeviceCountryCode() {
@autoreleasepool {
NSLocale *currentLocale = [NSLocale currentLocale];
NSString *countryCode = [currentLocale objectForKey:NSLocaleCountryCode];
return strdup([countryCode UTF8String]); // 使用strdup确保内存安全
}
}
}