Should look something like this.
#import <substrate.h>
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
%hook AppDelegate
-(bool) application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 {
UIAlertView *igcredits = [[UIAlertView alloc] initWithTitle:@"Title Text Here"
message:@"Message Text Here"
delegate:self
cancelButtonTitle:@"Ok Button Text"
otherButtonTitles:@"Link Button Text", nil];
[igcredits show];
[igcredits release];
return %orig();
}
%new
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *button = [alertView buttonTitleAtIndex:buttonIndex];
if([button isEqualToString:@"Link Button Text"])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://iosgods.com"]];
}
}
%end
ARCHS = armv7 arm64
include theos/makefiles/common.mk
TWEAK_NAME = MyTweak
MyTweak_FILES = Tweak.xm
include $(THEOS_MAKE_PATH)/tweak.mk
MyTweak_FRAMEWORKS = UIKit
CFLAGS = -w