Skip to main content
Participating Frequently
July 21, 2011
Answered

Can I develop an application on ios that can be called by other applications?

  • July 21, 2011
  • 1 reply
  • 2001 views

I'm trying to develop a service application on ios. I know that I could use custom url schema to communicate between applications and I can get handleUrl event , in case of using objective c. But I don't know if I can do that or how to do that in flash builder 4.5.1.

I found an article which said I can regist my custom url schema in app.xml but I found nothing about how I can handle the custom url call. Is there an event or what? Does anybody know that?

Thanks!

This topic has been closed for replies.
Correct answer Pahup

Hi Pahup,

Thanks for your answer first.

I tried the solution. I have a good news and a bad news.

The good one is I can use the customized URI schema to configure my application so that another application can call it using the url. It really works.    : )

But unfortunately, I didn't get the url as an argument in INVOKE.event. In fact, the argument array is empty and the invoke reason is just "standard" which means I can not find out if the application is invoked by a url call.

Could you please tell me if that it is now? Thanks a lot.

Jenny


Hi Jenny,

I've just tried custom URI with iOS and I am able to receive the argument with length 1, which has the complete url I browsed.

For Eg: If I launch url example://xyz?abc, I get the complete url as 1st element of the e.arguments array.

public function invokeHandler(e:InvokeEvent):void{

label1.text = "";

label1.appendText(e.arguments.length.toString() + " ");

for (var i:int=0;i<e.arguments.length;i++)

{

label1.appendText(e.arguments + " ");

}

label1.appendText(e.reason);

}

Reason should always be standard if it's not launched from login. Currently on Mobile it will be standard only.

Hope it helps.

-Pahup

1 reply

Pahup
Adobe Employee
Adobe Employee
July 22, 2011

Hi Jenny,

Custom URIs in app xml are specific to Android AIR.

For iOS, AFAIK, there is no way to call applications.

-Pahup

Participating Frequently
July 22, 2011

I haven't tried it on iOS myself, but was told by one of the AIR engineers that it should work. (http://help.adobe.com/en_US/air/build/WSfffb011ac560372f7e64a7f12cd2dd1867-8000.html#WS901d38e593cd1bac354f4f7b12e260e3e67-8000)

When your app is invoked by this, or any other means, the NativeApplication object dispatches an InvokeEvent object. The URL should be in the arguments array. See http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/InvokeEvent.html.

Participating Frequently
July 22, 2011

Hi Joe,

Thank you for your answers. But I still have another question about this issue.

In fact, my application needs to do two things. Firstly the application should be able to be called by the second application which is developed by xcode. You already give me the answer of how to do that. I'll try later. Thanks again.

Secondly, my application needs to call the xcode application to get some data from it. I already developped and tested the xcode application. It works fine. The xcode application is called by customer URL schema. But I don't know how to call it using Flash builder 4.5.1. I tried to use "navigateToURL", but it doesn't work. So could you please give me some suggestion about this?

Jenny