Jump to content

Theos iOS 11.3.1 Forward Declaration Error


Go to solution Solved by Rook,

2 posts in this topic

Recommended Posts

Posted (edited)

Error: AppDelegate' for instance message is a forward declaration

Tweak.xm:

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>

#import <substrate.h>

/* Code Injection Example

More CSCI examples can be found here: http://iosgods.com/forum/48-coding-center/

*/

#include “writeData.h”

 

%hook AFUserAccount

-(bool) isElite {

return TRUE;

}

%end

 

%hook AFUserAccount

-(void) setIsElite:(bool)arg1 {

arg1 = TRUE;

%orig(arg1);

}

%end

 

 

%hook AppDelegate

 

UIAlertController * alert = [UIAlertController

                alertControllerWithTitle:@"Title"

                                 message:@"Message"

                          preferredStyle:UIAlertControllerStyleAlert];

 

 

 

UIAlertAction* yesButton = [UIAlertAction

                    actionWithTitle:@"Yes, please"

                              style:UIAlertActionStyleDefault

                            handler:^(UIAlertAction * action) {

                                //Handle your yes please button action here

                            }];

 

UIAlertAction* noButton = [UIAlertAction

                        actionWithTitle:@"No, thanks"

                                  style:UIAlertActionStyleDefault

                                handler:^(UIAlertAction * action) {

                                   //Handle no, thanks button                

                                }];

 

[alert addAction:yesButton];

[alert addAction:noButton];

 

[self presentViewController:alert animated:YES completion:nil];

Updated by The Epic Gamer
  • Solution
Posted

Hey!

Please use the new and updated iOSGods Tweak & Patcher template here! It has everything ready for you and makes creating tweaks easier! :)

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines