-
-
Save xorrior/58bac8d2de8dad5363e2e92e1415475c to your computer and use it in GitHub Desktop.
Launch Calc migrationTool plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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