Jump to content

RokWeb

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. RokWeb

    iOS 17, Delphi 11.3, TidTCPClient, CP1251

    I can't check because I have an iPhone with iOS 15.6 and updating to iOS 17 is scary since Delphi 11.3 doesn't fully support iOS 17 (for example, as far as I know, debugging doesn't work) constructor TClientThread.Create(AHost: String; APort: Integer); begin inherited Create(True); FClient := TIdTCPClient.Create; FClient.ReadTimeout := 100; FClient.ConnectTimeout := 1000; FHost := AHost; FClient.Host := FHost; FClient.Port := APort; FClient.CreateIOHandler(); FClient.IOHandler.DefStringEncoding := IndyTextEncoding(1251); end; And the Execute method of the data flow: try try while not Terminated do begin Sleep(1); FClient.IOHandler.CheckForDisconnect(true,true); if FClient.IOHandler.InputBufferIsEmpty then begin if not FClient.IOHandler.CheckForDataOnSource(10) then begin CSForData.Enter; try if (Length(FSendData) > 0) then FClient.IOHandler.Write(FSendData, IndyTextEncoding(1251)); FSendData := ''; finally CSForData.Leave; end; Continue; end; end; {$IFDEF IOS} FData := FData + FClient.IOHandler.InputBufferAsString(IndyTextEncoding(1251)); {$ENDIF} if Length(FData) > 0 then begin Synchronize(nil,DoData); SetLength(FData, 0); end; CSForData.Enter; try if (Length(FSendData) > 0) then FClient.IOHandler.Write(FSendData, IndyTextEncoding(1251)); FSendData := ''; finally CSForData.Leave; end; end; except on E: Exception do DoError(E); end; finally FClient.Disconnect(False); if FClient.IOHandler <> nil then FClient.IOHandler.InputBuffer.Clear; Synchronize(DoDisconnected); end;
  2. Hello. Users of my application began to complain about an error in the application after updating to iOS 17 (screenshot attached). The server is written in Delphi 7 and sends data in CP1251 encoding (it is not possible to change this). Before the iOS 17 update, the application worked and no errors occurred. The exception occurs in the code section of the idGlobal.pas module: else FMaxCharSize := LocaleCharsFromUnicode(FCodePage, FWCharToMBFlags, @cValue[0], 2, nil, 0, nil, nil); //returns less than 1 and then throws an exception RSInvalidCodePage if FMaxCharSize < 1 then begin raise EIdException.CreateResFmt(@RSInvalidCodePage, [FCodePage]); end; From the information that I was able to find, a relatively similar problem was discussed here: https://youtrack.jetbrains.com/issue/KT-59124/kmm-production-sample-iOS-app-crashes-after-start-on-iOS17-Beta If I understand correctly, the problem was solved by updating XCode to 15 Beta 6 and using the current version of the iOS SDK. Tell me, please, has anyone encountered this problem? Are there any solutions (I can’t update to the latest versions of XCode and iOS SDK)?
×