Create a gist now

Instantly share code, notes, and snippets.

@xorrior /launchcalcplugin.m Secret
Last active May 26, 2018

Embed
What would you like to do?
Launch Calc migrationTool plugin
//
// demoClass.m
// testExampleBundle
//
// Created by Chris Ross on 4/17/18.
// Copyright © 2018 Void. All rights reserved.
//
// Need to add references to the SystemMigration and SystemMigrationUtils private frameworks.
// You may need to add header files from both as well using class-dump.
#import <Foundation/Foundation.h>
#import <objc/objc.h>
#import "SMConfMigratorPlugin.h"
@interface CustomTestPlugin : SMConfMigratorPlugin
@end
@implementation CustomTestPlugin
-(NSTimeInterval)estimateTime
{
return 10;
}
-(void)run
{
NSTask *Task = [[NSTask alloc] init];
[Task setLaunchPath:@"/bin/bash"];
NSArray *args = [NSArray arrayWithObjects:@"-l",
@"-c",
@"open /Applications/Calculator.app", //Assuming git is the launch path you want to run
nil];
[Task setArguments:args];
[Task launch];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment