Skip to content

iOS equivalent of custom activity #10258

Answered by rigor789
ahosamanedinesh asked this question in Q&A
Discussion options

You must be logged in to vote

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...

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rigor789
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants