8 Replies Latest reply on Apr 20, 2017 2:46 PM by jormond

    Opening URL in Safari NOT FM Webviewer

    edward.hung

      Title

      Opening URL in Safari NOT FM Webviewer

      Post

      Situation: I would like to open a URL link via my solution in FM GO 13. The link returns "failed to open: [URL]". The link works fine in Safari (and presumably other browsers).

      Desired outcome: Open the URL in Safari (not google chrome, as I cannot request my clients to install another app. If I could I would just amend the URL with google chromes URL scheme googlechrome//[URL])

      Attempted actions:

      1) FM documents indicate if the URL is "http://[URL]" it will open in the user's default browser. It does not

      2) openURL using UIApplication. But I have no idea what I am doing and I believe this is not the solution

      3) x-web-search://?[query] ...But this only returns a search in safari and does not open the URL.

      If anyone could give me a hint/advice or tell me this is impossible, I would greatly appreciate it. 

      Regards,

      Edward

        • 1. Re: Opening URL in Safari NOT FM Webviewer
          schamblee

          Your title and question are not the same.  Do you want to open in the Webviewer or not?  OpenURL does not open in the webviewer, OpenURL open in the users default browser.  If you use a webviewer then you have to set the URL in the webviewer, which this can be a set by variable or field.  The webviewer is not a browser so not all website are compatible with the webviewer.

          • 2. Re: Opening URL in Safari NOT FM Webviewer
            edward.hung

            Hi S Chamblee,

            My mistake on mixing up terminology. 

            I am attempting to run a script to open a URL in the user's default web browser in their iPad (which presumably is Safari). The script is something as follows:

            Allow User Abort [Off]

            Set Error Capture [On]

            Show Custom Dialog ["Open URL?"]

            if [Get (LastMessageChoice) = 1]

            Open URL [No dialog: GetAsText (Fieldname)]

            Set Variable [$ERROR; Value: Get(LastError)]

            Show Custom Dialog [$ERROR]

            End If

            Exit Script

             

            The get error part is for me as I'm developing and testing.,This is literally the script attached to the button I am using to go to the URL.When I run the script and FM GO opens the link, the window has at the top right hand corner 'Open in Safari' and 'Done'. I assume this is the FM web browser. 

            I would like to open the URL in Safari DIRECTLY without the need for the client to click 'Open in Safari'.

            Hope this clarifies my issue. 

            Regards.

            Edward

            • 3. Re: Opening URL in Safari NOT FM Webviewer
              schamblee

              There is a webviewer which is not a browser.  I'm not sure FM reason for this, I assume it is some kind of security issue and FM must confirm that you want to open in Safari.  I haven't found a work around for this, I found old post where other users were asking about this issue but no fixes. 

              • 4. Re: Opening URL in Safari NOT FM Webviewer
                edward.hung

                Thanks for that S Chamblee. I haven't found a solution either, which is why I am hoping the FM community and experts might have a solution. I will keep searching/trying and regularly checkup on this post for a solution. If there is a button to 'Open in Safari', there must be a way to trigger this action and bypass this 'security' that FM has in place.  

                • 5. Re: Opening URL in Safari NOT FM Webviewer
                  TimAcri

                  I have a specific website that I would like to access using the open URL script step.  The page needs to be open directly in Safari because it uses info from cookies stored within safari.  It won't open in whatever viewer filemaker go currently trys to open in. Help

                  • 7. Re: Opening URL in Safari NOT FM Webviewer
                    TimAcri

                    Yes it is a script step and I was using it to open my URL.  However instead of opening the URL in safari, it try's to open in some other web browser.  It fails to load in the "other " browser.  It does give an option in the lower left hand corner of the screen to "open in safari".  However it does nothing when I press that button. 

                     

                    So back to my original question, is there a way to open a URL directly in safari?

                    • 8. Re: Opening URL in Safari NOT FM Webviewer
                      jormond

                      I believe this is left over from previous days of iOS where apps were sandboxed, and not allowed to open another app. I may be wrong about that, it's been a long while since I tried it.

                       

                      If your users have Chrome installed you could change the url to something like: googlechrome://www.website.com

                       

                      Otherwise, you are looking at trying to redirect it by calling another app, and having that app open Safari.

                      1 of 1 people found this helpful