Skip to content

Instantly share code, notes, and snippets.

Last active November 14, 2021 05:25
What would you like to do?
Installer Plugin that pops a message box to the user
// MyInstallerPane.m
// messagebox
// Created by Chris Ross on 1/23/18.
// Copyright © 2018 testplugin. All rights reserved.
This should be in MyInstallerPane.h
#import <InstallerPlugins/InstallerPlugins.h>
@interface MyInstallerPane : InstallerPane
#import "MyInstallerPane.h"
#import <Foundation/Foundation.h>
@implementation MyInstallerPane
- (NSString *)title
return [[NSBundle bundleForClass:[self class]] localizedStringForKey:@"PaneTitle" value:nil table:nil];
- (void)didEnterPane:(InstallerSectionDirection)dir
//Malicious logic when entering pane
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText:@"Are you sure you want to install my malware?"];
[alert setInformativeText:@"Remember, you WANTED this...."];
[alert addButtonWithTitle:@"OK"];
[alert addButtonWithTitle:@"Cancel"];
[alert setAlertStyle:NSInformationalAlertStyle];
NSInteger result = [alert runModal];
if (result == NSAlertFirstButtonReturn) {
NSLog(@"first button clicked");
} else if (result == NSAlertSecondButtonReturn) {
NSLog(@"Second button clicked");
- (void) willEnterPane:(InstallerSectionDirection)dir {
//Malicious logic when ????
- (BOOL)shouldExitPane:(InstallerSectionDirection)dir
return YES;
Copy link

Hello @xorrior , I am working on an Installer Plugin that opens the browser with a pre specified URL, I am unable to get help on this since I am new to macOS and Installer Plugins, can you help me with it, the problem I am dealing with is that I have the functions in C++/ObjC but I am unable to call them, Please help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment