Helper apps, itms protocol, and us Rev folk

Richard Gaskin ambassador at fourthworld.com
Tue Aug 4 16:47:57 EDT 2009


Follow-up:

Thanks to some links Trevor provided, this turns out to be fairly 
simple.  So simple, in fact, that it seems almost risky, but hey, what 
on the Internet isn't? :)

I just added this to one of my standalones' info.plist file:

<key>CFBundleURLTypes</key>
     <array>
         <dict>
             <key>CFBundleURLName</key>
             <string>com.fourthworld.fwrs</string>
             <key>CFBundleURLSchemes</key>
             <array>
                 <string>fwrs</string>
             </array>
         </dict>
     </array>

Then I used a URL to one of my Rev stacks, changing the protocol to 
"fwrs" (an arbitrary string for "Fourth World Rev Stack"):

<fwrs://www.fourthworld.net/revnet/Go_RevNet.rev>

In Safari it launches the app instantly.  In FF it presents a dialog 
asking the user to confirm my app as the handler for that protocol or 
choose another.  Not bad.

Looks like all I need to do to complete the implementation on OS X is to 
add a GURLGURL Apple event handler to actually download and open the stack.

Haven't tried the Win registry thang, but should be simple enough. 
Looks like the only script one needs is a one-liner to set the registry 
as per the example on the page Trevor provided the link for - here's 
Trevor's links:

Windows:
Registering an Application to a URL Protocol
<http://msdn.microsoft.com/en-us/library/aa767914(VS.85).aspx>

OS X:
HowToRegisterURLHandler
<http://www.cocoadev.com/index.pl?HowToRegisterURLHandler>
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/PListKeys.html#//apple_ref/doc/uid/20001431-102207>


Thanks, Trevor.

Who would have thought something this potentially dangerous could be so 
simple?  Now all we need to launch a standalone is a link on a web page, 
a copy of the app installed, and a registry entry.  Cool (until it gets 
abused and they shut this option down).

--
  Richard Gaskin
  Fourth World
  Revolution training and consulting: http://www.fourthworld.com
  Webzine for Rev developers: http://www.revjournal.com



More information about the Use-livecode mailing list