Jump to content

ertank

Members
  • Content Count

    233
  • Joined

  • Last visited

Everything posted by ertank

  1. ertank

    Publishing iOS apps

    There is such a menu item. Nothing is listed when I click on it. Seems I don't have any expired certificate at all. that makes sense as initially that app distributed by some other developer using some other development tool. However, I finally found reason. I go to Preferences under XCode menu item. Under accounts, I click Manage Certificates and below is what I see. Even if I have found reason, I still do not know how to fix that.
  2. ertank

    Publishing iOS apps

    Actually, I already have a certificate linked to it. That same certificate is already loaded on MacOS, too. I see it in KeyChain. I am confused. Here is a screen shot:
  3. ertank

    Publishing iOS apps

    Here is a screen shot from options page And here is error I receive when I click on "Deploy" button: No certificate found in provisioning profile "12021c75-fa17-4838-9834-39593ec234eb" Thanks.
  4. ertank

    Publishing iOS apps

    App was distributed at least once (maybe more, I do not know) before. It is not developed and distributed using Delphi, before. There is a distribution certificate as far as I can tell on the MacOS. I will read linked steps and advise if they are of any help.
  5. ertank

    Publishing iOS apps

    I see one "iPhone Distribution: <Company name>" in Keychain (under login, and My Certificates) and its expiration date is 16th of June 2020.
  6. Hello, There is that custom build old DataSnap application. It works with Firebird database and only provides 3 methods; GetData, ExecuteQuery, SwitchDatabase. Their use is as their names indicate. All of the methods are called in a single long URL such as datasnapserver/GetData/SELECT * FROM EMPLOYEE That returns SQL result as JSON string. Other 2 methods simply return True/False and error message if False. As the nature of the GetData method, it sometimes gets quite long and complicated URL including all that JOINs, WHERE and conditions added. I wonder if similar can be done using MARS, and have it handle returned data to be filled in a memory table. This maybe a long shot, but I also would like to put all these SQLs in body of the GET request, if such a thing is possible. Thanks.
  7. ertank

    Datasnap -> MARS conversion

    I knew that there has to be an easier way. That did work nicely. I have one question standing in my mind. As I know current code in mobile app, I may need to make synchronous calls to server, just because to let user know there is something going on at the moment (screen wait text is changing with each SQL command run). I appreciate an example on a synchronous call, please. I am starting to implement my UPDATE/INSERT/DELETE handling now. I believe that will be easier having all these SELECT working. They will reply as a simple True/False after all. Thank you.
  8. ertank

    Datasnap -> MARS conversion

    It will be easier for me to use any preferred http component on client side. I am going to have one dataset per request, always. Now, I have some JSON received at client like following: [ { "EMP_NO": 2, "FIRST_NAME": "Robert", "LAST_NAME": "Nelson", "PHONE_EXT": "250", "HIRE_DATE": "1988-12-28T00:00:00.000+02:00", "DEPT_NO": "600", "JOB_CODE": "VP", "JOB_GRADE": 2, "JOB_COUNTRY": "USA", "SALARY": 105900, "FULL_NAME": "Nelson, Robert" }, { "EMP_NO": 4, "FIRST_NAME": "Bruce", "LAST_NAME": "Young", "PHONE_EXT": "233", "HIRE_DATE": "1988-12-28T00:00:00.000+02:00", "DEPT_NO": "621", "JOB_CODE": "Eng", "JOB_GRADE": 2, "JOB_COUNTRY": "USA", "SALARY": 97500, "FULL_NAME": "Young, Bruce" } ] In brief, I am getting what I want. Now, I would like to make life much easier on client side to manipulate that data and decrease lines of code. That is if such a thing is possible... As this is a simple JSON string, there is no datatype information like TDateTime, Integer, Double, etc. Is it possible to receive raw memory table data which contains all necessary information to build back easily TDataSet or TFDMemTable at client side? My current server code is as following: unit Server.Resources; interface uses SysUtils, Classes, MARS.Core.Attributes, MARS.Core.MediaType, MARS.Core.JSON, MARS.Core.Response, MARS.Core.URL, MARS.Core.Token.Resource, Data.DB, MARS.Data.FireDAC, FireDAC.Phys.FB; type TStatement = record SQL: string; Name: string; end; [Path('helloworld')] THelloWorldResource = class protected [Context] FD: TMARSFireDAC; public [POST, Produces(TMediaType.APPLICATION_JSON)] function GetData([BodyParam] AStatement: TStatement): TDataSet; end; [Path('token')] TTokenResource = class(TMARSTokenResource) end; implementation uses MARS.Core.Registry; { THelloWorldResource } function THelloWorldResource.GetData(AStatement: TStatement): TDataSet; begin Result := FD.SetName<TDataSet>(FD.Query(AStatement.SQL), AStatement.Name); end; initialization TMARSResourceRegistry.Instance.RegisterResource<THelloWorldResource>; TMARSResourceRegistry.Instance.RegisterResource<TTokenResource>; end. I already tried and failed to convert [POST, Produces(TMediaType.APPLICATION_JSON)] to [POST, Produces(TMediaType.APPLICATION_JSON_FireDAC)] which I suppose is what I need to achieve above. I solved one error and that lead to another one. Just could not solve them all. Again, this is a Delphi to Delphi solution. Client here is FMX mobile. Data is for reporting purposes and it is read-only on client. Thanks for all your help. Regards, Ertan
  9. ertank

    Datasnap -> MARS conversion

    Hello, Thanks for step by step instructions. I am informed that I do not need multiple SQL results to be returned at once. So I choose not to use an array here. That will be a "Delphi to Delphi" solution. I would like to use MARS Client for requests. I have following setup in DataModule: MARSApplication -> MARSClient1 -> MARSFDResource1 One question here: How should I set POST BODY (TStatement) before I call MARSFDResource1.POST() or MARSClient1.Post()? I am not even sure which component to use for doing post request here. I would like MARSFDResource1 to fill up TFDMemTable right after receiving response. Sorry for all these newbie questions. I hope some other new starters will benefit in the future 🙂 Thanks & regards, Ertan
  10. ertank

    How to log raw data on Android?

    Hello, I am asked for some raw data including header and body between a rest server and android mobile app. My search on internet lead me to use TIdLogEvent (I am not sure that is the right component for job. Since I do communication in a thread, I select to create everything using code at run-time. I have following procedures to be assigned at run-time procedure TfrmMain.IdLogEvent1Received(ASender: TComponent; const AText, AData: string); var Filename: string; begin Filename := TPath.Combine(TPath.GetSharedDocumentsPath(), 'response_'); Filename := Filename + FormatDateTime('yyyy-mm-dd_hh.nn.ss', Now()) + '.log'; TFile.WriteAllText(Filename, AData); end; procedure TfrmMain.IdLogEvent1Sent(ASender: TComponent; const AText, AData: string); var Filename: string; begin Filename := TPath.Combine(TPath.GetSharedDocumentsPath(), 'request_'); Filename := Filename + FormatDateTime('yyyy-mm-dd_hh.nn.ss', Now()) + '.log'; TFile.WriteAllText(Filename, AData); end; I am trying to create TIdHTTP and others in a thread as following: var NewsRec: TGetNewsRequest; Json: string; SS: TStringStream; Http: TIdHTTP; IOHandler: TIdIOHandlerStack; LogEvent: TIdLogEvent; Response: string; ResponseRec: TGetNewsResponse; begin // some non-relevant code for json preperation, etc. deleted Http := nil; IOHandler := nil; SS := nil; LogEvent := nil; try SS := TStringStream.Create(Json); LogEvent := TIdLogEvent.Create(nil); LogEvent.OnSent := frmMain.IdLogEvent1Sent; LogEvent.OnReceived := frmMain.IdLogEvent1Received; Http := TIdHTTP.Create(nil); IOHandler := TIdIOHandlerStack.Create(Http); Http.IOHandler := IOHandler; Http.IOHandler.Intercept := LogEvent; Http.Request.ContentType := 'application/x-www-form-urlencoded'; Response := Http.Post(GetNewsURL, SS); // try..except removed to simplify code finally LogEvent.Free(); Http.Free(); SS.Free(); end; // some non-relevant code to deal with result deleted end; Communication is not secured. It is plain "http". I could not figure what I am doing wrong as I always get Abstract error. That stands true no matter I assign to TIdHTTP.IOHandler be it TIdIOHandler, TIdIOHandlerSocket, TIdIOHandlerStack. I cannot get past to that error and save raw communication dumped in log files. Any help is appreciated. Thank & regards, Ertan
  11. ertank

    How to log raw data on Android?

    Yes. It is clear now. Converted to TFile.AppendText and changed filename not to include seconds. I most of the time do not change stock Indy version if there is a reason to. I am using Delphi 10.3.1 installed Indy on my system and there is no version mixing or similar. That was missing. Now logging is working fine. Thanks.
  12. ertank

    How to log raw data on Android?

    That is the first time I am dealing with raw logging using Indy. I will have a look at it if they are to stay in the app for long. All this I am trying to log is only for checking some headers for web service developers. Thanks for the warning. There are not many calls to web service done. Logs needed after something like button click or similar. I received that abstract error maybe because I tried to use TIdHTTP.IOHandler.Intercept and not TIdHTTP.Intercept? This is something I read in one of the Indy 10.0.0.50 version or similar post that I found. I did not understand why abstract error received and so I wrote in here thinking there maybe changes from the time of that posts to Indy 10.6.2.xxxx Now, project compile and run fine using your sample code. There is no abstract error. However, unseen part of the code is that I am always receiving "Connection closed gracefully" exception on debug run in thread. There are no files saved, too. When debugging execution does not come in assigned TIdLogEvent.OnSent() or TIdLogEvent.Received() functions. I could not understand why there is such an exception. Web service is built with PHP. Laravel v5.8 or something used as I am told. I do not know PHP and web service developers cannot answer most of my questions, unfortunately. That ContentType is also enforced by that PHP developers to me. I started using that TStrings overloaded function at the beginning. That did not work with that web services. Framework exception or no communication happens. Above code could communicate. But, it does not log raw communication data.
  13. Hello, When I check GitHub there are several version tags in it, and there is trunk. I wonder if it is safer to use these version tags? Thought they seem to be replaced in time, do they receive patches? For the record, I am using Delphi 10.3.1. Thanks & regards, Ertan
  14. Hello, I have a WSDL file (attached) that I need to use with WSDL Importer of Delphi 10.3. Using all defaults there is a remark in generated pascal file // ************************************************************************ // // The following types, referred to in the WSDL document are not being represented // in this file. They are either aliases[@] of other types represented or were referred // to but never[!] declared in the document. The types from the latter category // typically map to predefined/known XML or Embarcadero types; however, they could also // indicate incorrect WSDL documents that failed to declare or import a schema type. // ************************************************************************ // // !:getInvoiceViewRequest - "http:/fitcons.com/eInvoice/"[Lit][] // !:getEnvelopeStatusResponse - "http:/fitcons.com/eInvoice/"[Lit][] // !:getEnvelopeStatusRequest - "http:/fitcons.com/eInvoice/"[Lit][] // !:getUserListResponse - "http:/fitcons.com/eInvoice/"[Lit][] // !:getUserListRequest - "http:/fitcons.com/eInvoice/"[Lit][] // !:getInvoiceViewResponse - "http:/fitcons.com/eInvoice/"[Lit][] // !:getUBLResponse - "http:/fitcons.com/eInvoice/"[Lit][] // !:ProcessingFault - "http:/fitcons.com/eInvoice/"[Flt][] // !:sendUBLResponse - "http:/fitcons.com/eInvoice/"[Lit][] // !:sendUBLRequest - "http:/fitcons.com/eInvoice/"[Lit][] // !:getUBLRequest - "http:/fitcons.com/eInvoice/"[Lit][] // !:getUBLListResponse - "http:/fitcons.com/eInvoice/"[Lit][] // !:getUBLListRequest - "http:/fitcons.com/eInvoice/"[Lit][] As expected, generated file is not compiled under Delphi. Unfortunately, I am not provided any Internet link instead of that WSDL file. I wonder if it is possible to have a working service interface for Delphi using only attached WSDL file. Thanks & regards, Ertan ClientEInvoiceServices-2.0.wsdl
  15. As a matter of fact. I found these files in ZIP file and it all worked out after I place all of them under same directory. Thanks a lot.
  16. ertank

    is FGX native still around?

    FGX as I know provides native "wait cursor" for Android and iOS. Are there other solutions for FMX platform by FGX?
  17. Hello, I am using Delphi 10.3.1 I cannot install and run iOS 12.2 apps on a physcal iPhone 7. I can run them on iOS 10.0 Simulator though. I would like to use the phone for testing apps. I connect the iPhone to Mac. It is recognized just fine by both iTunes and XCode 10.2.1. I can see that phone under "Target platform iOSDEvice64->Target" in Delphi, too. However, when I try to run any iOS app (even blank project) on the iPhone I get below error: [DCC Error] E2597 ld: file not found: /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration [DCC Fatal Error] F2588 Linker error code: 1 ($00000001) - I used Tools->Options->Deployment->SDK Manager->iPhoneOS 64 12.2->"Update Local File Cache" button. It run and finish. No errors. - I have iOS Development certificate manually installed on that MacOS. I am not sure if these are required. I am a newbie on iOS side. What else should I do to be able to install and run a test app on a physical iPhone? Thanks & regards, Ertan
  18. ertank

    How to run iOS app on physical iPhone

    I should have mentioned that I am trying to run FCMRevisited demo project from latest KastriFree repository against iPhoneOS12.2 64Bits as is (without making necessary adjustments). I just now tried a very simple project and that worked just fine. App installed on the iPhone and run OK. After that I realize that I am trying to deploy a project that needs some adjustments before even trying to compile. Doing what's necessary I could deploy my app on the iPhone. Thank you.
  19. ertank

    How to run iOS app on physical iPhone

    I am not sure If I follow instructions right. Below highlighted line is what I added manually (yellow marker color is barely visible). I confirm that none of the options is selected in Edit Remote Path Item form. Clicking Update Local File Cache did not raise any errors. But, that did not solve my problem. Then as a second try, I manually deleted all local file cache in my PC disc and clicked "Update Local File Cache" button while having my above added line in there. All files downloaded, no errors. Unfortunately, When I try to run the app from Delphi it still gives same error in my initial post. Any other thoughts that I can try? Thanks.
  20. Hello, I am using Delphi 10.3.1 Rio and I am very new to iOS part of FMX platform. I have macOS 10.14 Mojave and XCode 10.2. I am not sure if that is a correct setup. My trials convinced me that it is simply impossible to install any older version of XCode on macOS 10.14 Mojave. When I try to run a blank project on iOS Simulator targeting iPhone 5s and iOS SDK 11.0 or, iOS SDK 12.1 or, iOS SDK 12.2 (I am yet to try iOS SDK 9.0): I see splash screen right after running newly installed app and then it closes instantly without any message being displayed. I could not see empty form just once. I believe application is crashing, but I do not see any log messages or anything about that. I cannot understand reason why. As to documentation iOS 12, iOS 11, iOS 10 is supported by Delphi Rio ( http://docwiki.embarcadero.com/RADStudio/Rio/en/Supported_Target_Platforms ). There are no details as to XCode version or macOS version that I should be using for testing or deploying iOS apps. On the other hand it is indicated in the URL that macOS Mojave is supported and same application indeed runs fine when I target to macOS Mojave 32Bits. 1- Is there anything that I am doing wrong? 2- Is there a way I can test an iOS application using that setup? Thanks & regards, Ertan
  21. ertank

    Problem running blank iOS app on iOS Simulator

    Yes, iOS 10.x simulators are working. I was so tired downloading and testing those simulators that I feel the need to ask in here. Thanks.
  22. Hello, Using Delphi Rio 10.3.1 and I have found following thread exactly same as my problem https://forums.embarcadero.com/thread.jspa?threadID=229924 There is no relevant bug report that I could find. So, I did add one: https://quality.embarcadero.com/browse/RSP-24168 Your support is welcome. Thanks & Regards, Ertan
  23. ertank

    HELP: Decoding of data stored in array of char - RFID tag's

    Hello, Are you building for Windows? If yes, most of the readers today are PCSC capable. If that is the case with your reader, you are better using APDU commands to communicate with reader and cards. Check out http://www.infintuary.org/stpcsc.php
  24. ertank

    Best site/source for SQL Server questions?

    To be an answer to topic subject. I find https://forums.sqlteam.com to be a good SQL Server specific question forum.
×