radstudio logo

Error Incompatible type TWideStringList under XCode

If your trying to use a TStringList in your IOS Xe2 Firemonkey application you will probably encounter the following errors when compiling under Xcode.

Show Plain Text
Text code
  1. Error: Incompatible types: got "TStringList" expected "TWideStringList"
  2.  
Show Plain Text
Text code
  1. Error: Incompatible type for arg no. 4: Got "TWideStringList", expected "TStrings"

The problem relates to the TStringList defaulting to a TWideStringList rather that the IOS compatible version, to fix this use the Classes class as follows :-

Show Plain Text
Delphi code
  1. var
  2.    lines: Classes.TStringList;
  3. ...
  4.    lines := Classes.TStringList.Create();
  5. ...

0 Responses to “Error Incompatible type TWideStringList under XCode”

Sorry, comments have been closed for this post.