Blog

All Blog Posts  |  Next Post  |  Previous Post

Fixing the FMX TWebBrowser issue on iOS 9

Wednesday, September 23, 2015

Update: You now optionally add additional keys in the iOS9Fix_config.txt file

Linking against iOS 9 introduces the new Application Transport Security feature that enforces a secure network connection. This means that in a default RAD Studio 10 Seattle project, the default TWebBrowser but also our TTMSFMXWebBrowser, TTMSFMXWebGMaps,
TTMSFMXWebOSMaps components and the TMS Cloud Pack for FireMonkey cloud services can no longer make a connection to the web. A solution for this issue is to add the following key to the Info.plist file:

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

As the Info.plist is automatically generated based on the project options, there is no option to specify a boolean key in a dictionary. To make sure the Info.plist file contains the correct keys in order to link against iOS 9 we have created an iOS9Fix command line executable and a post-build command.

1) Copy the iOS9Fix.exe & iOS9Fix_config.txt files to the project directory.

TMS Software Delphi  Components

2) Add the following post-build command to your project options.

call "$(PROJECTDIR)\iOS9Fix.exe" "$(OUTPUTPATH).info.plist"

TMS Software Delphi  Components

If the above steps are executed correctly, your application should then be able to make a connection with one of the components mentioned in this blog post.

The solution with the above instructions can be downloaded at https://download.tmssoftware.com/download/iOS9Fix.zip



Pieter Scheldeman




This blog post has received 10 comments.


1. Wednesday, September 23, 2015 at 3:51:58 PM

Great post Pieter!

Thank you very much!!

Pederzolli Patrizia


2. Thursday, October 1, 2015 at 12:57:22 PM

Hi Pieter,

Woud it be possible to maybe expand on this "fix" of yours?

The reason I''m asking is because I frequently find myself adding these structured attributes to Info.plist:

<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>myApp</string>
</array>
<key>CFBundleURLName</key>
<string>com.myName.myApp</string>
</dict>
</array>

Thanks!

--Stefan.

Stefan


3. Friday, October 2, 2015 at 9:45:38 AM

Hi,

We have updated the iOS9Fix executable to extract the keys from an iOS9Fix_config.txt file, you can add your keys in this file and execute the same steps.

Kind Regards,
Pieter

Pieter Scheldeman


4. Thursday, October 15, 2015 at 5:48:55 PM

Work !!!
Perfect , thank you very much !!!


pedrini franck


5. Saturday, October 24, 2015 at 5:10:55 AM

hi!
Can you tell me , how to get the $(OUTPUTPATH) path in delphi xe

thank you

jason


6. Monday, October 26, 2015 at 5:26:10 PM

Not sure I understand your question. This blog article refers to newer versions of Delphi and is not really related to $(OUTPUTPATH)?

Bruno Fierens


7. Saturday, October 24, 2015 at 5:33:19 AM

I can't work because I need the TCMS.info.plist is utf-8 format , ansi can't work for me, so I write a new ios9fix , but I can't get compiler on 32 bit or 64 bit, can you help me? thank you

jason


8. Wednesday, January 13, 2016 at 11:28:52 AM

Great tool, however I''d like it to be able to replace the value(s) if the key already exists (eg DTPlatformBuild, DTXcodeBuild etc), because at present, your tool inserts a new value regardless..

or can it do that already, and it''s something I''ve missed?

Dave Nottage


9. Wednesday, January 13, 2016 at 12:05:47 PM

Hi,

The tool always adds the keys at the end of the plist, we will investigate if we can expand this tool to modify existing keys.

Kind Regards,
Pieter

Pieter Scheldeman


10. Friday, March 18, 2016 at 3:16:06 PM

Great tool Thank you.

Pierce James




Add a new comment

You will receive a confirmation mail with a link to validate your comment, please use a valid email address.
All fields are required.



All Blog Posts  |  Next Post  |  Previous Post