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 TextText code
- Error: Incompatible types: got "TStringList" expected "TWideStringList"
Text code
- 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 TextDelphi code
- var
- lines: Classes.TStringList;
- ...
- lines := Classes.TStringList.Create();
- ...