User Tag List

  1. HotStuff2's Avatar
    I asked this in another thread, but it got buried, so I thought I'd create it's own thread...

    Here's something I'm trying to figure out: is there a way to name the window that's opened in Safari, so that if, say, you launch BeeJive, log in, then go back to the Springboard, and click the icon again (which would launch another instance of BeeJive in a new Safari window), it simply pulls up the window already open?

    If you don't do that, the web app launches in a new window, and in my BeeJive example, you wouldn't see any messages you'd received unless you close the new window and go back to the one previously launched.

    No one?
    Last edited by HotStuff2; 2007-12-10 at 12:25 PM. Reason: Automerged Doublepost
    2007-12-10 12:25 PM
  2. HotStuff2's Avatar
    Anyone? Someone? NO ONE has any ideas, thoughts, comments, or suggestions on this?
    2007-12-22 03:29 PM
  3. lh99's Avatar
    I've just slapped together a site-specific browser that could become exactly what you're looking for (probably isn't now, though).
    2007-12-23 06:10 PM
  4. HotStuff2's Avatar
    Yeah, that's not what I'm looking for. I'm trying to find a way when you use an icon on the Springboard to launch a website.
    2007-12-23 07:51 PM
  5. Broomhead's Avatar
    2007-12-23 07:54 PM
  6. HotStuff2's Avatar

    Please READ my original first post.

    My question is NOT "how do I add a link to a website on the Springboard". THAT is easy, THAT I've done.

    My question is: is it possible to NAME the window that's opened, so if someone starts a webpage, then goes back to the Springboard and launches it again, it will open in the window ALREADY opened, instead of opening ANOTHER window in Safari.
    2007-12-25 03:00 PM
  7. Broomhead's Avatar
    OK Then You wait here and I'll go look for you
    Last edited by Broomhead; 2007-12-25 at 04:42 PM.
    2007-12-25 03:59 PM
  8. HotStuff2's Avatar
    Dude, I *have* looked everywhere. That's why I finally posted here asking if anyone has any ideas. AFAIK and can tell, there's no setting to name a window in the PLIST.
    2007-12-25 05:32 PM
  9. lh99's Avatar
    You're right, I don't think there is a way to do exactly what you want, not without modifying MobileSafari, at least. There's a remote possibility, check this out. But even if you could tell MobileSafari to go to a specific tab, you'd need some way to tell which tab holds the page you want, keeping in mind that some tabs may have been closed since the last time the page was launched from SpringBoard.

    Did you take a close look at my SignalClient solution? It's just a one-window web browser that opens a pre-defined site directly from SpringBoard without using MobileSafari. So, using my app, you could create a separate browser for each of your frequently used sites and put each one on SpringBoard in place of the iPhone Apper-style Safari "links" you have now. It could even be programmed to automatically log-in for you as well so you never have to type a password.

    Obviously, the app needs work (getting the keyboard working, a preferences page would be nice, and some kind of page caching would be needed so that the site doesn't need to be reloaded every time you tap the icon on SpringBoard), but all of this is totally doable. I may give it a shot if some better programmer than me doesn't run with this idea.
    2007-12-25 06:37 PM
  10. HotStuff2's Avatar
    I suspect that once the SDK is released, we'll have a lot more info about MobileSafari, as well as the iPhone in general. Might have to wait until that happens. Naming windows is a basic HTML command; Safari supports it, and respects the standards "_self", et. al, and custom-named windows. I created a few test pages and named them different things, then opened them in MobileSafari, and it does correctly remember which one is which and opened the links appropriately, without creating a new window.

    Now, I want to figure out is what command needs to be in the PLIST to name a window, so that if MobileSafari is called from the Springboard, it always opens in the same window.

    I tried looking at the info.plist for MobileSafari, but it's not readable (probably needs to be converted), and there's a Developer.plist that's the same way. I've tried the online converter that's supposed to do that, but it never seems to work for me. And I can't rememer the URL anyway. I found an already-converted info.plist file; nothing in it to suggest a naming convention for windows, so perhaps it's in the developer.plist, or completely absent...
    2007-12-26 01:31 AM
  11. lh99's Avatar
    The PLIST files are readable, you just need the right editor. I wouldn't bother though, there isn't anything useful in there. Developer.plist just provides some controls for MobileSafari's debug window as far as I could tell.

    The method (currently) used to open a website in MobileSafari from Springboard is [self openURL:baseurl], which inherits from the UIApplication class. OpenURL/Apper are just applications that open, execute this command, then terminate. Despite the lack of an SDK, the application framework is fairly well documented, and I have searched for alternative methods of opening a page in Safari with no results. openURL does not take arguments other than the boolean asPanel, which does not appear to be useful. So as I said, without modifying MobileSafari in some way (maybe a plugin?), I don't think this is possible. There is not a way to specify a target for the link from an outside application.

    What you need to do is get your target information into MobileSafari first, then open the link in the appropriate window. A locally-hosted webpage running PHP could do this. Basically, I'm thinking of a tab manager site that you could send messages from Springboard using POST or GET that include the URL you want to open and the target window name. The PHP site would create and open the appropriate HTML link with the specified target, then close itself. Not ideal, I can't think of another option given the current toolset.
    2007-12-27 01:12 PM
  12. HotStuff2's Avatar
    Well, crap....that's sorta what I thought. Perhaps the SDK will shed some light on it, but I'm not holding my breath on it.
    2007-12-27 04:37 PM
  13. lh99's Avatar
    Looks like this may be solved for us in 1.1.3. In the Gear Live video I just watched, it appears that the new bookmark on home screen feature does not open a new window if the bookmark is already open, but just displays the previously loaded page. Guess we'll see!
    2007-12-31 03:50 PM