0
votes

i am using custom url scheme in my flex iOS app and it’s working fine when i start my app from a web link..but the issue is when i start my app from start menu in iPad and move to webpage in safari.In page i click a button that redirects it to my app, at that time app call “preinitialize” method more than once..it wary every time, some time it’s 2,3,4 and different one each time..i don't know why it’s behaving like this..can i know the reason please its urgent.. thanks…any help will be appreciated.

1

1 Answers

1
votes

Create a flag initialized and set it to true when preinitialize is called. All other calls to this method can be filtered out. Simple example:

private var initialized:Boolean = false;
public function preinitialize():void
{
  if (initialized) return;
  initialized = true;
}

Next step would be finding the real cause of the multiple calls, but for that we would need to see some code of your app.