Delphi 10 Andriod/iOS開發小筆記(常常更新)

System.IOUtils.TPath.GetHomePath

Platform Sample path Path ID
Windows XP C:\Documents and Settings\<username>\Application Data CSIDL_APPDATA
Windows Vista or later C:\Users\<username>\AppData\Roaming FOLDERID_RoamingAppData
Mac OS X /Users/<username> NSUserDirectory
iOS Device /private/var/mobile/Containers/Data/Application/<application ID>
iOS Simulator /Users/<username>/Library/Developer/CoreSimulator/Devices/<Device ID>/data/Containers/Data/Application/<application ID>
Android /data/data/<application ID>/files Context.getFilesDir

For Android, set the Remote Path to assets\internal

For iOS, set the Remote Path to StartUp\Documents

// XE3 : DBJSON
// Seattle: System.JSON
var
  LJsonArr   : TJSONArray;
  LJsonValue : TJSONValue;
  LItem     : TJSONValue;
begin
   memo1.Lines.Clear;
   LJsonArr    := TJSONObject.ParseJSONValue(TEncoding.utf8.GetBytes(memo2.Lines.Text),0) as TJSONArray;
   for LJsonValue in LJsonArr do
   begin
      for LItem in TJSONArray(LJsonValue) do
        memo1.lines.add(Format('%s : %s',[TJSONPair(LItem).JsonString.Value, TJSONPair(LItem).JsonValue.Value]));
     memo1.Lines.Add('');
   end;
end;

參考: http://blogs.embarcadero.com/davidi/2013/11/23/43005/

作者: 林壽山

目前任職於軟體公司研究開發部門,擔任專業處長,專注於.NET C# 開發,並具備豐富的POS 收銀系統與金流整合開發經驗。我精通各類支付系統的設計與開發,包含第三方支付(如綠界、藍新、歐付寶、速買配、馬來西亞 ePay/HappyPay、台新 One 碼)、行動支付(悠遊卡、一卡通、支付寶、微信支付、街口支付)、以及信用卡支付(聯合信用卡)。 熟悉多種開發技術,擅長PHP 網頁開發(CodeIgniter、Laravel 框架)、Delphi 程式設計、資料庫設計、C# WinForm/WebForm 應用開發、ASP.NET MVC、API 串接設計,並具備LINE 串接開發的豐富經驗。 除了技術開發之外,我也熱衷於技術分享,曾擔任台中學校產業學院講師 5 年,培育新一代的軟體開發人才,致力於推動軟體技術的應用與創新。 我對技術充滿熱忱,始終保持學習與探索的心態,期望透過軟體開發為企業與社會創造更大的價值。