Foreign URL strings

Discussion in 'iOS Development' started by spoonforknife, Feb 19, 2009.

  1. spoonforknife

    spoonforknife Retired Moderator

    Joined:
    Nov 15, 2007
    Messages:
    6,896
    Likes Received:
    317
    Is it possible to use foreign URL strings in openURL (i.e. apptapp://, twinkle://, etc.) like the below code?

    Code:
     (void)openInForeign:(id)sender {
    	NSString *foreignString = [NSString stringWithFormat:@"apptapp://package/%@", string.otherID];
    	[[UIApplication sharedApplication] openURL:[NSURL URLWithString:foreignString]];
    }
  2. spoonforknife

    spoonforknife Retired Moderator

    Joined:
    Nov 15, 2007
    Messages:
    6,896
    Likes Received:
    317
    I've found the solution to this:

    apptapp:// is kept in Cydia as a backup/Installer 3 compatibility.
    cydia:// also works, so cydia://package/cycorder works, while apptapp://package/cycorder doesn't.

    Other Foreign URL strings work accordingly.
  3. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    yeah this is a really cool thing in 2.0. you can create your own custom url type by just modifying the info.plist (see the launchme apple example)

    you can then parse the url string and have your app do things accordingly.
  4. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
  5. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55

Share This Page