[add] first

This commit is contained in:
2023-10-08 10:24:48 +08:00
commit b1ae0510a9
1048 changed files with 3254361 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
#import <Foundation/Foundation.h>
#import <AVFoundation/AVAudioSession.h>
extern "C" {
float unity_services_analytics_get_device_volume() {
return [AVAudioSession sharedInstance].outputVolume;
}
}

View File

@@ -0,0 +1,20 @@
#include <stdlib.h>
#include <string.h>
extern "C" {
const char *unity_services_current_language_code() {
NSLocale *locale = [NSLocale currentLocale];
unsigned long len = locale.languageCode.length;
char *locale_str = 0;
locale_str = (char *)malloc(len + 1);
for (unsigned long i = 0; i < len; ++i) {
char c = [locale.languageCode characterAtIndex:i];
locale_str[i] = c;
}
locale_str[len] = 0;
return locale_str;
}
}