Skip to main content
Participant
June 30, 2020
Question

Arguments not getting passed, on opening application from browser using custom scheme url mac

  • June 30, 2020
  • 0 replies
  • 170 views

Requirement : Need to run an Adobe AIR captive runtime application from browser in mac.
After creating application have added CFBundleURLTypes tag in Info.plist

 

 

<key>CFBundleURLTypes</key>
            <array>
            <dict>
                <key>CFBundleURLName</key>
                <string>com.test.helloworld</string>
                <key>CFBundleURLSchemes</key>
                <array>
                <string>testapp</string>
                </array>
            </dict>
            </array>

 

 

Then opening the application once to register CFBundleURLTypes in mac os.

Then, when I open this url in browser testapp://login?user123&pass=abc application gets opened but argument is not passed.

 

 

window.runtime.flash.desktop.NativeApplication.nativeApplication.addEventListener(window.runtime.flash.events.InvokeEvent.INVOKE, function (event) {
alert("event.arguments="+event.arguments);

 

 

 

If I don't not close this application and open the url testapp://login?user123&pass=abc again then application's InvokeEvent.INVOKE event is triggered again and parameters is passed

 

 

 

Why this argument is not getting passed first time?

Topics

 
This topic is closed to new replies. Start a new post to keep the conversation going.