Ah, I guess I will make a tutorial soon on how to integrate this with theos.
@@extractor304
So first of all, you will need the headers from GitHub. Download them and add them in /theos/include/SCLAlertView/
Next, start a new project and then open your Makefile and add:
ARCHS = armv7 arm64
CFLAGS = -fobjc-arc # ARC is needed for SCLAlertView
include theos/makefiles/common.mk
TWEAK_NAME = YOURTWEAKNAMEHERE
YOURTWEAKNAMEHERE_FILES = Tweak.xm $(shell find $(THEOS)/include/SCLAlertView -name '*.m')
YOURTWEAKNAMEHERE_FRAMEWORKS = UIKit MessageUI Social QuartzCore CoreGraphics Foundation AVFoundation Accelerate GLKit AudioToolbox
YOURTWEAKNAMEHERE_LDFLAGS += -Wl,-segalign,4000
Then in your Tweak.xm:
#import <SCLAlertView/SCLAlertView.h> // Imports the popup headers.
%hook UnityAppController
- (BOOL)application:(id)fp8 didFinishLaunchingWithOptions:(id)fp12 { // Popup only once at each launch of the app.
SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindow];
[alert showSuccess: @"Title here"// Success, Error, Notice, Warning, Info, Edit, Custom, Waiting
subTitle: @"Subtitle here"
closeButtonTitle: @"Close button"
duration: 0.0f];
return %orig;
}
%end
Compile and it should work.