Skip to content

Commit 7ae930a

Browse files
fix for mac os high sierra
1 parent 3294fc4 commit 7ae930a

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

sketch2app.sketchplugin/Contents/Sketch/library/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ var exec = function(document, command) {
7878
command = 'cd "' + path + '" && ' + command;
7979

8080
task.setLaunchPath_('/bin/bash');
81-
task.setArguments_(NSArray.arrayWithObjects_('-c', '-l', command, null));
81+
task.setArguments_(NSArray.arrayWithArray_(['-c', '-l', command]));
8282
task.standardOutput = pipe;
8383
task.standardError = errPipe;
8484
task.launch();

sketch2app.sketchplugin/Contents/Sketch/library/core.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
var l4c = {
55
"defs": {
6-
"pluginVersion": "Version 0.4.0",
6+
"pluginVersion": "Version 0.4.2",
77
"apiBase": "https://cloud.appchef.io/",
88
"apiSignin": "login",
99
"apiUpload": "sketch",
@@ -106,7 +106,7 @@ var l4c = {
106106
[request setValue:"sketch" forHTTPHeaderField:"User-Agent"]
107107
[request setValue:"application/json" forHTTPHeaderField:"Content-Type"]
108108

109-
var parameter = NSDictionary.alloc().initWithObjectsAndKeys(email, @"username", password, @"password", nil)
109+
var parameter = {"username": email, "password": password}
110110
var postData = [NSJSONSerialization dataWithJSONObject:parameter options:0 error:nil]
111111
[request setHTTPBody:postData]
112112

@@ -243,7 +243,7 @@ var l4c = {
243243
var task = NSTask.alloc().init()
244244
var logging = project + ", "
245245
task.setLaunchPath("/usr/bin/curl")
246-
var args = NSArray.arrayWithObjects("-X", "POST", "-H", "Authorization: Bearer " + token, "-F", "project=" + project, "-F", "type=" + type, "-F", "assets=@" + filePath, l4c.defs.apiBase + l4c.defs.apiUpload, nil)
246+
var args = NSArray.arrayWithArray(["-X", "POST", "-H", "Authorization: Bearer " + token, "-F", "project=" + project, "-F", "type=" + type, "-F", "assets=@" + filePath, l4c.defs.apiBase + l4c.defs.apiUpload])
247247
task.setArguments(args)
248248
var outputPipe = [NSPipe pipe]
249249
[task setStandardOutput:outputPipe]
@@ -278,7 +278,7 @@ var l4c = {
278278
[request setValue:"application/json" forHTTPHeaderField:"Content-Type"]
279279
[request setValue:token forHTTPHeaderField:"Authorization"]
280280

281-
var parameter = NSDictionary.alloc().initWithObjectsAndKeys(message, @"message", level, @"level", nil)
281+
var parameter = {"message": message, "level": level};
282282
var postData = [NSJSONSerialization dataWithJSONObject:parameter options:0 error:nil]
283283
[request setHTTPBody:postData]
284284
[NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]

sketch2app.sketchplugin/Contents/Sketch/manifest.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "Sketch2App",
3-
"description": "A Sketch Plugin to upload mobile design and create native app instantly. Design in Sketch and view result on device in real time.",
4-
"version": "0.4.1",
3+
"description":
4+
"A Sketch Plugin to upload mobile design and create native app instantly. Design in Sketch and view result on device in real time.",
5+
"version": "0.4.2",
56
"identifier": "instantapp.io.sketch2app",
6-
"appcast": "https://api.sketchpacks.com/v1/plugins/instantapp.io.sketch2app/appcast",
7+
"appcast":
8+
"https://api.sketchpacks.com/v1/plugins/instantapp.io.sketch2app/appcast",
79
"compatibleVersion": 3,
810
"bundleVersion": 1,
911
"commands": [
@@ -26,11 +28,6 @@
2628
],
2729
"menu": {
2830
"title": "📲 Sketch2App",
29-
"items": [
30-
"upload",
31-
"install-sketchtool",
32-
"-",
33-
"logout"
34-
]
31+
"items": ["upload", "install-sketchtool", "-", "logout"]
3532
}
3633
}

0 commit comments

Comments
 (0)