Ian S61845

Member since: Friday, 13 April 2018
Last login: 2 weeks ago
Profile viewed: 114 views

No Rank
Points: 0

Ian S61845 replied to the topic 'Sharing data between two Delphi Apps' in the forum. 2 weeks ago

The server sends packets to a single iPhone or iPad app at a rate of 30/second.

The packet is about 45 characters long, comma separated with start and end characters and an XOR checksum.

The iOS app shows a wireless graphical display. The update speed must be real time.

I appreciate the criticism however but an example of a lower CPU utilisation implementation of IDTCPServer would be more helpful. I have not had any formal Delphi training as such and have had to learn new features by researching on an as needed basis, mostly from stackoverflow and other online sources.

Read More...

Ian S61845 replied to the topic 'Sharing data between two Delphi Apps' in the forum. 2 weeks ago

Thanks I'll look into that. I could move the clipboard read back into a thread with this approach.

I am using Clipboard.GetClipboard.IsEmpty at the moment, along with Clipboard.GetClipboard.ToString. As the cpu usage is basically zero, further optimisation is a mute point other than to write better structured code.

Read More...

Ian S61845 replied to the topic 'Sharing data between two Delphi Apps' in the forum. 2 weeks ago

I send the data packets using $ and * packet delimiters and append an XOR CRC check byte sent as hex, and the packet is validated before decoding is attempted.

I want to keep all this checking code in place, as it is our hope to augment our hardware with a wireless TCP module once we get past our testing phases which for the moment are USB-RS232 based.

I also use a Try... Except function to capture and prevent any crashing issues.


The app is a touch screen interface

Read More...

Ian S61845 replied to the topic 'Sharing data between two Delphi Apps' in the forum. 2 weeks ago

This was my IDTCPServer1Execute code:

procedure TMainForm.IdTCPServer1Execute(AContext: TIdContext);
Var
Index: Byte;
List: TList;
begin
List := IdTCPServer1.Contexts.LockList;

Try
While (TXPacket.Count > 0) Do
Begin
for Index := 0 to List.Count-1 do
with TIdContext(List[Index]).Connection.IOHandler do
AContext.Connection.IOHandler.Write(TXPacket.Strings[0]);

TXPacket.Delete(0);
End;
Finally
IdTCPServer1.Contexts.UnlockList;
End;
End;

To test my code I just ran the IDTCPServer on port 23 and connected to it with a windows telnet session to watch the data stream. The moment the connection happened, the cpu usage jumps to 50%.

If there is a better way of doing this I'd like to know. I handle the client side TCP coms in threads, based on a thread based IDTCPClient example I found a while back.

Read More...

Ian S61845 replied to the topic 'Sharing data between two Delphi Apps' in the forum. 2 weeks ago

I tried looking for some decent examples "that worked" for shared memory, screen copy and also the MdMailSlot method but was unsuccessful.

However, I did have a WIN by doing the app to app data transfer via the clipboard. The result was Zero Cpu usage when transferring 30 x 113 characters / second as a continuous packet stream. My RS232 low level comms app that does the copy to clipboard whilst reading from RS232 and processing the data stream idles along at 8% peak which is a lot more acceptable than tcp sockets was doing.

Thanks for the advice though everyone. It helped me walk the path to get the result I needed.

Read More...

Ian S61845 replied to the topic 'Sharing data between two Delphi Apps' in the forum. 2 weeks ago

Thanks for the fast reply.

By "sockets" are you referring to using a TCP module and sharing the data internally hosted on 127.0.0.1 ? I have tried this already, and while it works and can easily cope with the data rate, it runs the poor little i5 processor at 50% when doing so. I'm using XE10.2.3 and IdTCPServer.

I'm looking at named pipe now and attempting to locate some examples code to trial. If you have any links to some example programs it would be a huge help.

Cheers,
Ian

Read More...

Ian S61845 created a new topic ' Sharing data between two Delphi Apps' in the forum. 2 weeks ago

What would be the best method of sharing data between two Delphi Apps? One app is VCL, the other is FMX, both on a Windows 10 platform.

I need to send a stream of data that is being read via USB from the VCL app over to the FMX App.

I was thinking of using two system environment variables, and writing to the variables from one app and reading from the other.

The data rate is upwards of 140 packets (45 characters) per second.

Does anyone have any suggestions or sample code?

Read More...

Ian S61845 replied to the topic 'iOS 11.4 on C++ Builder 10.2.3' in the forum. 3 months ago

I've only successfully used IOS 11.3 / Xcode 9.3 with 10.2.3.

As far as I could understand it, the 10.2.3 platform documentation only seems to indicate compatibility with 9.3, and maybe 9.3.1.

Try rolling back to 9.3 xcode for starters. Compiled code in version 9.3/IOS11.3 should still execute on 11.4 IOS devices.

Read More...

Ian S61845 created a new topic ' Apple TV / tvOS support' in the forum. 4 months ago

What's the latest on support for the Apple TV platform?

Can 10.2.3 with the latest patches and Xcode 9.3 / IOS 11.3 SDK do it or is there any other combination that will?

Read More...

Ian S61845 replied to the topic 'Rad Studio 10.2.3 and Ios 11.3 not working' in the forum. 4 months ago

After spending 1/2 a day yesterday trying to resolve the compile time dreaded Linker error 1 issue.


My environment is as follows:
Windows 10 Pro with Delphi 10.2.3
MacBook Air with High Sierra 10.13.4
Ipad Pro with IOS 11.3.

Embarcadero release two updates to add iOS 11.3 capability to Delphi 10.2.3. These were:

RAD Studio 10.2.3 iOS 11.3 and CodeInsight Patch Released 26/6/2018.

and

RAD Studio 10.2.3 iOS 11.3 Patch, Released the 8/6/2018.


For me, neither worked despite following the update instructions precisely.

Before downgrading to XCode 9.2 (again), I thought I would try and manually extract the SDK from the Mac and see if manually adding the missing components to the SDK on the windows platform would provide a workable solution.

Clearly Embarcadero had added 9.3 support to the IDE, it just seems their process for downloading the SDK to the IDE via the PA server is flawed. As such it misses a stack of files that are required to compile of IOS.

So here's my solution.

1. The Delphi IDE on the Windows platform, and the PA server on the OSX machine were patched as per the RAD Studio 10.2.3 iOS 11.3 and CodeInsight Patch.

2. Instructions to delete previously downloaded SDK's were completed in the IDE.

3. Additionally I browsed to %Userprofile%\Documents\Embarcadero\Studio\SDKs and delete the SDK folder.

4. Start your PAserver and IDE.

5. Open your IOS project and go into tools, options. Locate the SDK Manager. Add the 32 and 64 bit SDK's. The download of the mostly complete SDK to your Windows PC will complete.

6. On the MAC, open the finder and go to Applications. Control + Click, and show contents on the XCode App.

7. In the search box, type "libcache.dylib" and locate the first of the missing SDK files.

8. Control and click the file, and Show enclosing Folder. Select all the files in the folder shown and Control + Click and Copy 35 items.

9. Connect a USB thumb drive to your MAC and make a folder called "system" on it. Paste your missing system folder to the USB system folder.

10. In the finder on the Mac, go back to Applications, and Show Contents on Xcode again.

11. Search for iPhoneOS. An iPhoneOS11.2.sdk and iPhoneOS11.3.sdk will be shown Copy the iPhoneOS11.2.sdk folder to your USB drive. The 11.3 folder is empty.

12. Eject your USB and connect it to your PC.

13. Browse to your SDK. %Userprofile%\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.3.sdk

14. Copy the contents of the iPhoneOS11.2.sdk from the USB drive to the iPhoneOS11.3.sdk folder.

15. Copy the contents of the system folder from the USB drive to :
%Userprofile%\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.3.sdk\usr\lib

This worked for me, and allowed me to compile and deploy 11.3 SDK code using Xcode to an IPA file.

I was then able to install the IOS application to my device by using XCode, Window, Devices and simulators. And then manually adding the app using +, and browsing to the compiled code folder "iOSDevice64\Release" and manually adding the IPA file.

I hope someone finds this useful.

And here's my 2 cents for Embarcadero.

I wonder if you are spending all your development time on Delphi XE11, adding support for XCode 10/IOS12, and this is why you don't develop patches or update instructions that work properly.

No doubt we will have to pay for yet another full release update to be able to use Xcode 10 as well, instead of supporting the existing IDE properly and just adding the support with a patch that works properly.

Read More...

Ian S61845 replied to the topic 'Rad Studio 10.2.3 and Ios 11.3 not working' in the forum. 4 months ago

I've installed this patch to the macOS based paserver and Delphi IDE twice now (in case I missed something), and it still doesn't work.

[DCC Error] E2597 ld: warning: directory not found for option '-FC:\Users\Ian\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.3.sdk\System\Library\PrivateFrameworks'

Same error as before the alleged 11.3 support was added.

I've deleted my SDK's, checked and confirmed my provisioning profiles

Going to downgrade to xcode 9.2 again now.

Has anyone succeeded in compiling an IOS app with xcode 9.3 / 11.3 SDK?

Read More...

After spending 1/2 a day yesterday trying to resolve the compile time dreaded Linker error 1 issue.

My environment is as follows:
Windows 10 Pro with Delphi 10.2.3
MacBook Air with High Sierra 10.13.4
Ipad Pro with IOS 11.3.

Embarcadero release two updates to add iOS 11.3 capability to Delphi 10.2.3. These were:

RAD Studio 10.2.3 iOS 11.3 and CodeInsight Patch Released 26/6/2018.

and

RAD Studio 10.2.3 iOS 11.3 Patch, Released the 8/6/2018.


For me, neither worked despite following the update instructions precisely.

Before downgrading to XCode 9.2 (again), I thought I would try and manually extract the SDK from the Mac and see if manually adding the missing components to the SDK on the windows platform would provide a workable solution.

Clearly Embarcadero had added 9.3 support to the IDE, it just seems their process for downloading the SDK to the IDE via the PA server is flawed. As such it misses a stack of files that are required to compile of IOS.

So here's my solution.

1. The Delphi IDE on the Windows platform, and the PA server on the OSX machine were patched as per the RAD Studio 10.2.3 iOS 11.3 and CodeInsight Patch.

2. Instructions to delete previously downloaded SDK's were completed in the IDE.

3. Additionally I browsed to %Userprofile%\Documents\Embarcadero\Studio\SDKs and delete the SDK folder.

4. Start your PAserver and IDE.

5. Open your IOS project and go into tools, options. Locate the SDK Manager. Add the 32 and 64 bit SDK's. The download of the mostly complete SDK to your Windows PC will complete.

6. On the MAC, open the finder and go to Applications. Control + Click, and show contents on the XCode App.

7. In the search box, type "libcache.dylib" and locate the first of the missing SDK files.

8. Control and click the file, and Show enclosing Folder. Select all the files in the folder shown and Control + Click and Copy 35 items.

9. Connect a USB thumb drive to your MAC and make a folder called "system" on it. Paste your missing system folder to the USB system folder.

10. In the finder on the Mac, go back to Applications, and Show Contents on Xcode again.

11. Search for iPhoneOS. An iPhoneOS11.2.sdk and iPhoneOS11.3.sdk will be shown Copy the iPhoneOS11.2.sdk folder to your USB drive. The 11.3 folder is empty.

12. Eject your USB and connect it to your PC.

13. Browse to your SDK. %Userprofile%\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.3.sdk

14. Copy the contents of the iPhoneOS11.2.sdk from the USB drive to the iPhoneOS11.3.sdk folder.

15. Copy the contents of the system folder from the USB drive to :
%Userprofile%\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.3.sdk\usr\lib

This worked for me, and allowed me to compile and deploy 11.3 SDK code using Xcode to an IPA file.

I was then able to install the IOS application to my device by using XCode, Window, Devices and simulators. And then manually adding the app using +, and browsing to the compiled code folder "iOSDevice64\Release" and manually adding the IPA file.

I hope someone finds this useful.

And here's my 2 cents for Embarcadero.

I wonder if you are spending all your development time on Delphi XE11, adding support for XCode 10/IOS12, and this is why you don't develop patches or update instructions that work properly.

No doubt we will have to pay for yet another full release update to be able to use Xcode 10 as well, instead of supporting the existing IDE properly and just adding the support with a patch that works properly.

Read More...

Same issue here.

I've tried the both the 11.3 updates.

30835_rad_studio_10.2.3_ios_11.3_patch
30837_rad_studio_10.2.3_ios_11.3_and_codeinsight_patch

Downloading 9.2 again now to roll back. Thanks Embarcadero. :(

Read More...

Ian S61845 created a new topic ' Delphi 10.2.3 and XCode 9.3 - Linker error fix. Manual SDK install.' in the forum. 4 months ago

Hi everyone,

After spending 1/2 a day yesterday trying to resolve the compile time dreaded Linker error 1 issue.

My environment is as follows:
Windows 10 Pro with Delphi 10.2.3
MacBook Air with High Sierra 10.13.4
Ipad Pro with IOS 11.3.

Embarcadero release two updates to add iOS 11.3 capability to Delphi 10.2.3. These were:

RAD Studio 10.2.3 iOS 11.3 and CodeInsight Patch Released 26/6/2018.

and

RAD Studio 10.2.3 iOS 11.3 Patch, Released the 8/6/2018.


For me, neither worked despite following the update instructions precisely.

Before downgrading to XCode 9.2 (again), I thought I would try and manually extract the SDK from the Mac and see if manually adding the missing components to the SDK on the windows platform would provide a workable solution.

Clearly Embarcadero had added 9.3 support to the IDE, it just seems their process for downloading the SDK to the IDE via the PA server is flawed. As such it misses a stack of files that are required to compile of IOS.

So here's my solution.

1. The Delphi IDE on the Windows platform, and the PA server on the OSX machine were patched as per the RAD Studio 10.2.3 iOS 11.3 and CodeInsight Patch.

2. Instructions to delete previously downloaded SDK's were completed in the IDE.

3. Additionally I browsed to %Userprofile%\Documents\Embarcadero\Studio\SDKs and delete the SDK folder.

4. Start your PAserver and IDE.

5. Open your IOS project and go into tools, options. Locate the SDK Manager. Add the 32 and 64 bit SDK's. The download of the mostly complete SDK to your Windows PC will complete.

6. On the MAC, open the finder and go to Applications. Control + Click, and show contents on the XCode App.

7. In the search box, type "libcache.dylib" and locate the first of the missing SDK files.

8. Control and click the file, and Show enclosing Folder. Select all the files in the folder shown and Control + Click and Copy 35 items.

9. Connect a USB thumb drive to your MAC and make a folder called "system" on it. Paste your missing system folder to the USB system folder.

10. In the finder on the Mac, go back to Applications, and Show Contents on Xcode again.

11. Search for iPhoneOS. An iPhoneOS11.2.sdk and iPhoneOS11.3.sdk will be shown Copy the iPhoneOS11.2.sdk folder to your USB drive. The 11.3 folder is empty.

12. Eject your USB and connect it to your PC.

13. Browse to your SDK. %Userprofile%\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.3.sdk

14. Copy the contents of the iPhoneOS11.2.sdk from the USB drive to the iPhoneOS11.3.sdk folder.

15. Copy the contents of the system folder from the USB drive to :
%Userprofile%\Documents\Embarcadero\Studio\SDKs\iPhoneOS11.3.sdk\usr\lib

This worked for me, and allowed me to compile and deploy 11.3 SDK code using Xcode to an IPA file.

I was then able to install the IOS application to my device by using XCode, Window, Devices and simulators. And then manually adding the app using +, and browsing to the compiled code folder "iOSDevice64\Release" and manually adding the IPA file.

I hope someone finds this useful.

And here's my 2 cents for Embarcadero.

I wonder if you are spending all your development time on Delphi XE11, adding support for XCode 10/IOS12, and this is why you don't develop patches or update instructions that work properly.

No doubt we will have to pay for yet another full release update to be able to use Xcode 10 as well, instead of supporting the existing IDE properly and just adding the support with a patch that works properly.

Read More...

Delete the SDK's you have in your Public\Embarcardero folder.

Then with xcode 9.2 and command line tools installed on your MAC, start the PA server and configure the connection for your IOS platform type. Either 32 or 64 bit etc. Test the connection, and the first time you compile, the SDK will transfer from the MAC.

I also had some trouble with my provisioning profiles. But I was able to get around these by making a basic app in Xcode. Xcode then generated a wildcard App, and the required provisioning profiles. Delphi was then able to access those profiles, visible in the Tools, Options, Provisioning section.

Read More...

Downgrading to 9.2 Xcode and command line tools does fix the issue. Available from the developer downloads area at developer.apple.com.

This also means you'll have to downgrade your test devices too.

Read More...