There are a few parts to this.
You need to output map links that include the addresses from your address custom field as query parameters in the correct format, but you need to output different links depending on whether your users are visiting on Apple devices or Android devices.
I looked at the stackoverlow article you shared, and it appears that much of the information is probably out of date. I'm taking an example from there, but you will need to perform your own research as to what the current requirements are.
Here's an example of the alternate formats required (not tested):
<a href='<em><u>hidden link</u></em>;
Open in google maps
</a>
<a href='<em><u>hidden link</u></em>;
Open in apple maps
</a>
Note how the address is URL encoded (e.g. spaces are converted to %20).
That's the only part I can help you with, really.
You could register a custom shortcode to urlencode any content inside the shortcode, e.g.
add_shortcode('urlencode', function ($atts = [], $content = null) {
$return = urlencode( $content );
return $return;
});
Then, when generating a link such as those above where the address comes from some custom field, you could use the urlencode shortcode like so:
<a href='<em><u>hidden link</u></em> field='my-address'][/types][/urlencode]'>
But that leaves
1. displaying different links according to which device is being used, and
2. confirming the required format of the links to open the apps in question
You will need to do some research for 2.
For 1, you will need to perform some browser sniffing to detect the device and use the results to hide one of the links.
So, you could add classes to the links, e.g. "ios" and "android", then write some JavaScript the checked the navigation object to determine the device and then hide links which have the class of the other device.
It's outside of support to write such code for you, but if you try yourself and get stuck let me know and I'll see if I can help.