1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    4
    Vote Rating
    0
    mkessler is on a distinguished road

      0  

    Default Unanswered: Open link in Safari from iOS packaged App

    Unanswered: Open link in Safari from iOS packaged App


    Hi,
    I have a link on my mobile app with a target="_blank" attribute. The app is packaged as a native iOS app. The problem is, the link is not opening in Safari as expected, instead it opens inside the app. It is very important that the link opens in Safari in a new browser window. How can I achieve that?

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,169
    Vote Rating
    28
    Answers
    83
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    I think you're going to have to make a native call to open safari.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    4
    Vote Rating
    0
    mkessler is on a distinguished road

      0  

    Default


    How to do that? Can you point me to the documentation?

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    14
    Vote Rating
    0
    Answers
    1
    graemlourens is an unknown quantity at this point

      0  

    Default


    I would love to know that too.

    A part of our app is opening a PDF, and when opened (in webview obviously) there is no possible way of getting back than deleting app from memory.

    Has anybody found a hack?
    @sencha are you looking into this in any way already?

    Regards, Graem

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    4
    Vote Rating
    0
    mkessler is on a distinguished road

      0  

    Default Use Phonegap

    Use Phonegap


    I ended up using Phonegap (now Cordova) for packaging. You can modify the view controller to allow opening of links outside of the app.

  6. #6
    Sencha - Sales Team dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    738
    Vote Rating
    6
    Answers
    10
    dawesi will become famous soon enough

      0  

    Default


    just for those who might get confused, phoneGap is still phoneGap, Cordova is to phoneGap as webkit is to Chrome or Safari
    Check out SenchaWorld.com for articles, screencasts, conference videos and more.

    Sencha Technical Training : Asia Pacific Region

    Code Validation : JSLint | JSONLint | JSONPLint

  7. #7
    Touch Premium Member svenna's Avatar
    Join Date
    Jun 2007
    Location
    Oslo,Norway
    Posts
    338
    Vote Rating
    14
    Answers
    5
    svenna will become famous soon enough svenna will become famous soon enough

      1  

    Default


    Opening a PDF from a native package app is really important.

    There is many people asking about open links (external pages or pdf files) so Sencha, please recognize it's importance and look for a solution for 2.0.x

    I still have 3-5 weeks before production, but for now it looks like I should abandon the sencha packaging av look for PhoneGap/Cordova.

    I've looked at a few solutions, some people try the iframe support. Many get problems scrolling but it looks like making a really, really, large iframe that includes the PDF can be a "solution"

    Also, there is a ux for using target: _blank on a click event, but I can't see that this would be better than target="_blank" in the a tag. (read: not working)

    Refs:
    http://www.sencha.com/forum/archive/.../t-174759.html
    http://www.sencha.com/forum/archive/.../t-129038.html
    Sven Tore Iversen

  8. #8
    Sencha User
    Join Date
    Apr 2009
    Posts
    129
    Vote Rating
    3
    jhoweaa is on a distinguished road

      0  

    Default


    This is definitely something I'm very interested in. Displaying PDF's is critical to our application and if we can't do it from Touch we'll have to use a different solution.