Jump to content
Shano

iOS Simulator Problem connecting to Rest Server

Recommended Posts

Hi have a mobile app currently built using Delphi 12.

 

My apple is a Mac Mini, Apple M1, Sonoma 14.2

 

The app can connect with the Rest server using HTTP, using Indy with no problems.

 

When I run the iOS simulator, It failed to connect to the server.

 

Are there any settings that I am unaware of that give the iOS Simulator access to HTTP connections?

 

Thanks Shane

Share this post


Link to post
25 minutes ago, Shano said:

Are there any settings that I am unaware of that give the iOS Simulator access to HTTP connections?

It's possible that you will need to add this to info.plist.TemplateiOS.xml inside of the <dict> tag:

   <key>NSAppTransportSecurity</key>  
   <dict>  
     <key>NSAllowsArbitraryLoads</key>  
     <true/>  
   </dict> 

 

Share this post


Link to post

@Dave NottageLooking into it further and I think it is because I do not include the required libraries: libcrypto and libssl when deploying the app.

 

Is there any easy way to do this? Can I just put the files on the mac in the scratch-dir?

 

Can I download the compiled versions of the files from anywhere or do I have to go through the process of compiling them myself? 

 

When you follow Embarcadero's link to get the files, the first thing I read is "I urge you to not use this project" 🙂

 

Thanks

Share this post


Link to post
3 minutes ago, Shano said:

Can I download the compiled versions of the files from anywhere or do I have to go through the process of compiling them myself? 

I did this quite some time ago, however it's for x86 simulator (as opposed to arm64, which is the only simulator architecture now supported by Delphi). See also this linkThis answer from SO might be useful.

 

If it's just for http(s), I strongly recommend using the native HTTP client, because it makes development/deployment much, much easier.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×