Skip to content

Instantly share code, notes, and snippets.

@xorrior
Last active May 26, 2018 07:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xorrior/58bac8d2de8dad5363e2e92e1415475c to your computer and use it in GitHub Desktop.
Save xorrior/58bac8d2de8dad5363e2e92e1415475c to your computer and use it in GitHub Desktop.
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