gpt4 book ai didi

ios - Delphi XE4 iOS 应用程序可在模拟器上运行,但不能在调试设备上运行

转载 作者:可可西里 更新时间:2023-11-01 04:44:16 25 4
gpt4 key购买 nike

我让应用程序在加载时显示其指定的背景图像。然后在启动时运行此代码时崩溃:

  // unzip own resources like images, data files ettc. 
FAppDataDirPath := GetHomePath + PathDelim + Application.Title + '.app' + PathDelim;
P := FAppDataDirPath + 'assets.zip';
if FileExists(P) then
begin
Z := TZipFile.Create;
try
Z.Open(P, zmRead);
Z.ExtractAll(FAppDataDirPath + 'Library');
finally
Z.Free;
end;
end
;

这是我得到的错误:

enter image description here

最佳答案

问题是您使用了错误的方法来获取位置。

切换到使用 System.IOUtils.TPath , 使用 TPath.GetHomePath获取主文件夹,TPath.GetDocumentsPath对于 Documents 文件夹,和 TPath.GetLibraryPath获取 Library 文件夹位置。

关于ios - Delphi XE4 iOS 应用程序可在模拟器上运行,但不能在调试设备上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17659477/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com