Website displayed in WebView - open in Safari without access to App Code???

Discussion in 'iOS Programming' started by gwelmarten, May 17, 2013.

  1. gwelmarten macrumors 6502

    Joined:
    Jan 17, 2011
    Location:
    England!
    #1
    Hi
    I am writing a web application that requires part of the code to be run in safari. Because of the environment it is going to be deployed in, it will mostly be running in web apps on peoples devices. In this situation I do not have access to the source code to make a change so that if a certain url is called it switches to safari. Is it possible to write my html/javascript hyperlink such that when the link is opened, it switches to safari to open it?
    Thanks!
    Sam
     
  2. waterskier2007 macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #2
    Why are you running it in a web view. If you need to run it in safari, why not do so by calling

    Code:
    [[UIApplication sharedApplication] openURL:URLtoOpen]
    
     
  3. gwelmarten, May 17, 2013
    Last edited by a moderator: May 17, 2013

    gwelmarten thread starter macrumors 6502

    Joined:
    Jan 17, 2011
    Location:
    England!
    #3
    I have already said I do not have access to source code (please, let's not discuss these other details - just the problem - I know what I am doing with the situation - it's purely technical help I need) and lots of the time I can not stop it been run in a webview. Please accept these as fixed.

    ----------



    Thanks for replying anyway :)
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Without access to the source code, there's not much you can do.
     
  5. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #5
    Two things:

    1 - I forgot this was iOS specific so I dug up this which is likely of limited use, as it involves using a shell: http://forums.asp.net/t/1652038.aspx

    2 - Since this is iOS specific, then look into if Mobile Safari accepts any specially formatted URLs. If I'm not mistaken, you can format URLs a special way to make Chrome for iOS open them. I can't recall what the official name of the special URLs are, but there's one for Maps and YouTube, and probably other apps that I can't think of right now.
     
  6. waterskier2007 macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #6
    What I am saying is that at some point you have to have the url to open in the webview so at that point you could just open said url the way I mentioned
     
  7. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #7
    ... he clearly stated he has no access to the source code, which means he clearly can't do what you suggested. He didn't say why - there's any number of reasons it could be. Maybe he's trying to make it so all apps that could display his webpage force it to open in Safari because it needs the faster JS engine to display smoothly?
     
  8. waterskier2007 macrumors 68000

    waterskier2007

    Joined:
    Jun 19, 2007
    Location:
    White Lake, MI
    #8
    Gotcha, guess I wasn't understanding but after re-reading I get it.
     

Share This Page