ios逆向 如何实现一个app启动弹窗 注入呢

请问 启动弹窗的dylib或者是freamwork 如何Xcode中如何创建,编写代码以及如何生成dylib 或者freamwork动态库呢?

我在一个帖子上按照步骤进行操作。他是用theos方式进行的。
但是我最终安装到手机上是闪退的。
该帖子的tweak.xm 是微信弹窗的。 我如何修改才能实现通用 app 启动弹窗呢?
附上tweak.xm代码


@interface MMUIViewController: UIViewController
- (void)helloWorld;
@end

%hook MMUIViewController

- (void)viewDidAppear:(_Bool)arg1 {
    %orig;
    [self helloWorld];
}

%new
- (void)helloWorld {
    UIAlertController *alertController =({
        UIAlertController *al = [UIAlertController alertControllerWithTitle:@"标题" message:@"这是一些信息" preferredStyle:UIAlertControllerStyleAlert];
        [al addAction:[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDestructive handler:nil]];

        al;

    });

    [self presentViewController:alertController animated:YES completion:nil];
}
%end