const res = uni.getSystemInfoSync();
let model = res.model,
isiPhone = false;
let iphoneArr = ["iPhone X", "iPhone 11", "iPhone 12", "iPhone 13", "iPhoneX", "iPhone11", "iPhone12",
"iPhone13","iPhone 14","iPhone14"
];
iphoneArr.forEach((item) => {
if (model.search(item) != -1) {
isiPhone = true;
}
});
2 个回复
FullStack - 【插件开发】【专治疑难杂症】【ios上架、马甲包、白包、过审、已成功上架过几百个】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=22130】【非诚勿扰】QQ:543610866
是 deviceModel,相关文档:https://uniapp.dcloud.net.cn/api/system/info.html#getsysteminfosync
风云21
遇到同样的问题,iphone14的机型获取不到。貌似推送也不行