Custom URL configuration?

With system.openURL() you are able to open and switch to other apps thru the uri-schema used in the url.

According to the comment here (http://developer.anscamobile.com/content/configuring-projects#comment-32522), I was hoping to do the same thing the other way around: by configuring my app such that it registers a uri-schema in the config.build plist, I could start myapp from within a webpage/email/tweet/etc.

Unfortunately, I cannot make it work... The config.build file that I use is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
settings =      {
        orientation =   {
                default ="portrait",
                content = "portrait",
                supported =     {
                        "portrait"
                },
        },
 
        iphone =        {
                plist = {
                        UIApplicationExitsOnSuspend = false,
                        CFBundleURLTypes = {
                                CFBundleURLName = "com.creativeapptitude.swimtimer",
                                CFBundleURLSchemes = {
                                        "swimtimer",
                                },
                        },
                },
        }
}

Sorry - got it to work already - needed one more level of nesting in the plist - correct build.settings is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
settings =      {
        orientation =   {
                default ="portrait",
                content = "portrait",
                supported =     {
                        "portrait"
                },
        },
 
        iphone =        {
                plist = {
                        UIApplicationExitsOnSuspend = false,
                        CFBundleURLTypes = {
                                {
                                        CFBundleURLName = "com.creativeapptitude.swimtimer",
                                        CFBundleURLSchemes = {
                                                "swimtimer",
                                        },
                                },
                        },
                },
        }
}
views:1642 update:2011/10/2 9:44:12
corona forums © 2003-2011