I developed an Apple app that I am testing on a Mac Mini. When I set the Delphi configuration to "Normal" then build and run the app on the Mac, the program starts up and connects to the internet without problems. Once the program has been built and run on the Mac, I can go into the scratch-dir
folder on the Mac (created by Delphi's PSServer) and run the "app" file without problems also.
However, when I change the configuration to "Application Store", rebuild, then use the Deploy button to create the "app" and "pkg" files on the Mac, the app will no longer work when trying to access the internet. Any internet access attempt fails. This happens with both the rebuilt "app" file in the scratch-dir
folder, and when I install the "pkg" file and try to run the program.
Note: this app uses the Indy components TIdFTP
and TIdSMTP
to access an FTP server and to send emails. Both of these work with the "Normal" app, and both fail with the "Application Store" app. The fact that both components fail with the "Application Store" build probably indicates that this is not an Indy problem. But just in case, for the FTP connection, I just get an "Unable to connect to FTP" message that is from my program, I have not added additional error handling to see what fails with the FTP. For the email failure, Indy raises an "Error resolving Address smtp.office365.com: nodename nor servname provided, or not known (8)" exception.
Any suggestions on how to determine why my "Application Store" build isn't working?
Additional info on 2023-01-03. Just simply changing from Normal configuration to Store Application and doing a deploy causes the problem. I checked the messages given out by Delphi during the builds and the Normal and Store build messages match. For the deploy, only difference in messages is the Normal configuration does a quick compile (not build) and the Store configuration adds the "Apple Distribution" and "3rd Party Mac Developer Installer" info to the deployment.
CodePudding user response:
As mentioned by both Remy Lebeau and Dave Nottage, the problem with the Application Store compile was not having Outgoing network socket for connecting
checked in the Entitlement List for the Mac. Checking that option allows the Application Store compile to access the internet.
Note: not sure why compiling the project when set to Normal configuration does not require Outgoing network socket for connecting
but the Application Store compile does. Makes things confusing and causes a lot of head scratching.