ertank
-
Content Count
234 -
Joined
-
Last visited
Posts posted by ertank
-
-
20 hours ago, Dave Nottage said:I should have also asked what you mean by this, i.e. is there an error thrown in the IDE? If so, please give all the details. If not, at what stage is it a problem? Using Application Loader?
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.
-
1 hour ago, Rollo62 said:From your explanation I'm unsure if the project already has been registered in the Apple Developer Membercenter at all.
Was the app distributed once before, or not, ?
Then you should have followed all these steps.
Have you checked if there is a provisioning certificate for distribution ?
The apps BundleID shall match the former settings 1:1.
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.
-
15 hours ago, Dave Nottage said:Please describe what gives you the impression that one is installed. One way is to use the Keychain application on the Mac, select login in the keychains list, and My Certificates in the category list. There should be at least one iPhone Distribution certificate. Check the expiry date that it has not expired.
I see one "iPhone Distribution: <Company name>" in Keychain (under login, and My Certificates) and its expiration date is 16th of June 2020.
-
Hello,
There is an app ready to be put on App Store. That app was previously deployed using another development tool that I do not know. This will be an update for that successor.
However, it cannot be deployed using Application Store configuration. As far as I can tell. MacOS already have deployment certificate installed. However, that cannot be seen in Delphi Project options->Deployment-Provisioning
There is no problem on deploying using development configuration on a physical iPhone at all. There is no problem on deploying on Simulator as well. None of the documentation that we read so far helped us. There is no problem viewing development certificate on same options page.
Any help is appreciated.
Thanks & regards,
Ertan
-
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.
-
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
-
Hello,
Thanks for step by step instructions.
4 hours ago, Andrea Magni said:TStatement = record SQL: string; name: string; end; TStatements = TArray<TStatement>;
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.
4 hours ago, Andrea Magni said:4) make the POST call from the client side (using MARS Client or whatever other http library available):
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
-
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 minutes ago, Remy Lebeau said:That is not what I was referring to. It takes multiple writes to the socket to send a web request, and multiple reads to receive a complete response. Those writes and reads get logged individually by Indy's Intercept components. They are not going to log a complete request in one go, or a complete response in one go.
Yes. It is clear now. Converted to TFile.AppendText and changed filename not to include seconds.
10 minutes ago, Remy Lebeau said:Make sure you DO NOT have multiple conflicting versions of Indy on your machine. If you do, then it is likely that the compiler is finding an old file that does not match the latest interface.
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.
8 minutes ago, Remy Lebeau said:Make sure you set the Active property of the TIdLog... component to True.
That was missing. Now logging is working fine.
Thanks.
-
12 minutes ago, Remy Lebeau said:Why not TIdLogFile instead? Especially since you are saving data to files. For debugging purposes, you DON'T want individual reads/writes to be logged to separate files. It makes more sense to keep them in a single file.
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.
14 minutes ago, Remy Lebeau said:Even if you use TIdLogEvent with separate files for input and output, you are creating filenames based on timestamps with seconds precision, so you are likely to end up with multiple files that contain smaller pieces of the overall data. At the very least, I would suggest either dropping the seconds from the filename, or use the timestamp at the very beginning of the initial request rather than the timestamps of the individual reads/writes.
Thanks for the warning. There are not many calls to web service done. Logs needed after something like button click or similar.
25 minutes ago, Remy Lebeau said:Even if it were secured with HTTPS, the TIdLog... components would be able to log the unencrypted HTTP data, as they log outgoing data before it is encrypted, and log incoming data after it is decrypted.
I see nothing in your code that would cause an Abstract error, as there are no abstract classes being used.
That being said, you don't need to instantiate an IOHandler manually in this case, since you are not using HTTPS. TIdHTTP has its own Intercept property, and will create an IOHandler internally for you:
On a side note, 'application/x-www-form-urlencoded' is the wrong ContentType to use for JSON data, use 'application/json' instead. If you really want to send an 'application/x-www-form-urlencoded' post, you need to use the overloaded version of TIdHTTP.Post() that takes a TStrings as input, not a TStream.
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.
-
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
-
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
-
Hello,
There is that WSDL here: http://messaging.yemeksepeti.com/messagingwebservice/integration.asmx?WSDL
I need to read data from method named "GetRestaurantList" actually that is my starting method. I hopefully will need to use other methods later.
I do not get exception on user level. But there is below error in Delphi while in debug run.
First chance exception at $767DC762. Exception class ESOAPDomConvertError with message 'Conversion from class TList<System.IInterface> to SOAP is not supported - SOAP classes must derive from TRemotable'. Process YemekSepeti_WebServis.exe (9024)
Here is the raw response from server:
<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soap:Body> <GetRestaurantListResponse xmlns="http://tempuri.org/"> <GetRestaurantListResult> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="RestaurantList"> <xs:element name="RestaurantList" msdata:IsDataSet="true" msdata:Locale=""> <xs:complexType> <xs:choice minOccurs="0" maxOccurs="unbounded"> <xs:element name="Restaurants"> <xs:complexType> <xs:sequence> <xs:element name="CatalogName" type="xs:string" minOccurs="0" /> <xs:element name="CategoryName" type="xs:string" minOccurs="0" /> <xs:element name="DisplayName" type="xs:string" minOccurs="0" /> <xs:element name="ServiceTime" type="xs:int" minOccurs="0" /> <xs:element name="Speed" type="xs:decimal" minOccurs="0" /> <xs:element name="Serving" type="xs:decimal" minOccurs="0" /> <xs:element name="Flavour" type="xs:decimal" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:schema> <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <RestaurantList xmlns=""> <Restaurants diffgr:id="Restaurants1" msdata:rowOrder="0"> <CatalogName>testname</CatalogName> <CategoryName>4f1cc1a8-bf2e-4eab-8dd5-34f37857911a</CategoryName> <DisplayName>Pizza, Test</DisplayName> <ServiceTime>45</ServiceTime> </Restaurants> </RestaurantList> </diffgr:diffgram> </GetRestaurantListResult> </GetRestaurantListResponse> </soap:Body> </soap:Envelope>
Honestly, this is the first time I am reading such a response myself.
Is there any way that I can consume that web service?
Any help is appreciated.
Thanks & regards,
Ertan
-
10 hours ago, TiGü said:Do you have the ClientEInvoiceServicesTypes-2.0.xsd and EInvoiceServicesCommonTypes-1.0.xsd files?
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.
-
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
-
FGX as I know provides native "wait cursor" for Android and iOS. Are there other solutions for FMX platform by FGX?
-
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.
- 1
-
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.
-
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
-
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.
-
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
-
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
-
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
-
To be an answer to topic subject. I find https://forums.sqlteam.com to be a good SQL Server specific question forum.
- 1
Publishing iOS apps
in FMX
Posted
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: