Quantcast
Channel: Adobe Community : Popular Discussions - AIR Development
Viewing all articles
Browse latest Browse all 24121

UIApplication Delegate

$
0
0

Hi,

 

I'm trying to figure out how to correctly use the delegate class on an iOS application using a Native Extension.

 

We've got it figured out and working, but we have a few bugs and I'm not sure if we're going about it the wrong way.

 

Our basic procedure is to create and set the delegate in the ContextInitializer function like this:

 

g_delegate = [[PushNotificationsAppDelegatealloc] init];

[[UIApplicationsharedApplication] setDelegate:g_delegate];

 

 

However this causes a few problems:

 

If we load the extension at app startup (say in the actionscript main class constructor) the application crashes with an error:

 

[XXXXDelegate _stageLoaded]: unrecognized selector sent to instance)

 

 

If we delay the extension load, it initialises and works as expected, however any subsequent calls to FRE functions fail eg:

 

FREDispatchStatusEventAsync(g_ctx, (uint8_t*)[@"test"UTF8String], (uint8_t*)[@"test"UTF8String]);

 

will cause the application to crash with error:

 

[XXXXDelegate notifyASyncMessages]: unrecognized selector sent to instance

 

 

Anyone have any ideas?

 

Is there some default Delegate class implementation that the extension uses that I'm destroying?

 

Any help will be greatly appreciated!

 

Cheers


Viewing all articles
Browse latest Browse all 24121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>