Theos如何找到需要 hook的类名

我想做一个通用app启动弹窗。 目前写出一个Tweak.xm 注入后 发现有的软件可以运行代码 弹窗 有些软件不弹窗不运行 。 我想应该是 每个软件启动的 ViewController 类名不同。 所以我的代码没有运行。 请问怎么找到软件的第一启动 ViewController 类名?或者 Tweak.xm 如何写 才能通用 hook 启动的那个类名。

只是弹窗的话应该可以hook UIApplication的setDelegate,拿到delegate类名,再hook delegate里面的 - application:didFinishLaunchingWithOptions:

https://developer.apple.com/documentation/uikit/1622933-uiapplicationmain

请问是要获取到rootViewController 吗?
我这个代码应该怎么改 求教 。

AppDelegate *app =(AppDelegate *) [UIApplication sharedApplication].delegate;

UIViewController *rootViewController1 = appdelegate.window.rootViewController;

%hook rootViewController1
-(void)viewDidAppear:(BOOL)animated{
%orig;
//弹窗//

}

%end

求大神指教

求大神 指教