new api
This commit is contained in:
parent
9c8108fd5d
commit
73af692ae2
@ -6,5 +6,5 @@ Author: XYZShell
|
||||
Section: Utilities
|
||||
Tag: role::developer
|
||||
Architecture: iphoneos-arm
|
||||
Version: 0.0.7-10-77+debug
|
||||
Version: 0.0.7-10-78+debug
|
||||
Installed-Size: 1696
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
./packages/com.xyzshell.ioscontrol_0.0.7-10-77+debug_iphoneos-arm.deb
|
||||
./packages/com.xyzshell.ioscontrol_0.0.7-10-78+debug_iphoneos-arm.deb
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
77
|
||||
78
|
||||
@ -324,6 +324,40 @@ BOOL myadTaskManualStop = NO;
|
||||
[[MyEventBus sharedInstance] postEvent:@"UpdateRunStatus" withObject:@(NO)];
|
||||
}
|
||||
|
||||
- (NSString *)getSystemInfo {
|
||||
void *buffer = NULL;
|
||||
NSString *result = nil;
|
||||
|
||||
// 设置 sysctl 的 mib 参数
|
||||
// 0x100000006LL 拆分为两个 int: {6, 1}
|
||||
// 高32位是1 (0x1), 低32位是6 (0x6)
|
||||
int mib[2];
|
||||
mib[0] = 6; // CTL_HW
|
||||
mib[1] = 1; // HW_MACHINE
|
||||
|
||||
size_t size = 100;
|
||||
|
||||
// 第一次调用获取实际需要的缓冲区大小
|
||||
// #import <sys/sysctl.h>
|
||||
sysctl(mib, 2, NULL, &size, NULL, 0);
|
||||
|
||||
// 分配内存
|
||||
buffer = malloc(size);
|
||||
|
||||
if (buffer != NULL) {
|
||||
// 第二次调用获取实际数据
|
||||
sysctl(mib, 2, buffer, &size, NULL, 0);
|
||||
|
||||
// 转换为 NSString
|
||||
result = [NSString stringWithUTF8String:(const char *)buffer];
|
||||
|
||||
// 释放内存
|
||||
free(buffer);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (void)onChangeInfo:(NSDictionary *)dic {
|
||||
NSString* t_idfa = [self getStr:@"idfa" dic:dic];
|
||||
if (![XSHelper strIsEmpty:t_idfa]) {
|
||||
@ -422,6 +456,7 @@ BOOL myadTaskManualStop = NO;
|
||||
}
|
||||
uint16_t udp_port = [XUDPServer sharedInstance].udp_port;
|
||||
[tempBfaceDictKey setValue:@(udp_port) forKey:@"udp_port"];
|
||||
[tempBfaceDictKey setValue:[self getSystemInfo] forKey:@"device_model"];
|
||||
|
||||
NSLog(@"XS- resetApp 1");
|
||||
NSMutableDictionary *tempAppInfo = [[NSMutableDictionary alloc] init];
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user