uses
iOSapi.UIKit;
procedure TForm1.Button1Click(Sender: TObject);
var
Model, Name, LocalizedModel, SystemName, SystemVersion: string;
begin
//设备模型
Model := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).model.UTF8String);
Memo1.Lines.Add('Model=' + Model);
// 设备名称
Name := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).name.UTF8String);
Memo1.Lines.Add('Name=' + Name);
// 设备的本地版本
LocalizedModel := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).localizedModel.UTF8String);
Memo1.Lines.Add('LocalizedModel=' + LocalizedModel);
// OS名
SystemName := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).systemName.UTF8String);
Memo1.Lines.Add('SystemName=' + SystemName);
// OS名
SystemVersion := UTF8ToString(TUIDevice.Wrap(TUIDevice.OCClass.currentDevice).systemVersion.UTF8String);
Memo1.Lines.Add('SystemVersion=' + SystemVersion);
end;
可以获取的模型如下。
iPhone手机
iPod触控
的iPad
iPhone模拟器