iOS equivalent of custom activity #10258
Answered
by
rigor789
ahosamanedinesh
asked this question in
Q&A
-
Hi guys, I was looking at the documentation for creating custom android.app.Application and android.app.Activity implementations. This feature can be very useful for passing bundle arguments. Is there an equivalent for iOS? |
Beta Was this translation helpful? Give feedback.
Answered by
rigor789
Jun 26, 2023
Replies: 1 comment
-
Late, but the iOS equivalent is a custom application delegate. import { Application } from "@nativescript/core";
@NativeClass
class MyAppDelegate extends UIResponder implements UIApplicationDelegate {
public static ObjCProtocols = [UIApplicationDelegate];
applicationDidFinishLaunchingWithOptions(
application: UIApplication,
launchOptions: NSDictionary<any, any>
): boolean {
console.log( "applicationWillFinishLaunchingWithOptions:", launchOptions);
return true;
}
applicationDidBecomeActive(application: UIApplication): void {
console.log("applicationDidBecomeActive:", application);
}
}
Application.ios.delegate = MyDelegate; Something like that... |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
rigor789
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Late, but the iOS equivalent is a custom application delegate.
Something like that...