michaeltyson / commandline-cocoa Goto Github PK
View Code? Open in Web Editor NEWTools to run Cocoa/Objective-C and C code from the command line
Home Page: http://atastypixel.com/blog/objective-c-cocoa-on-the-command-line
Tools to run Cocoa/Objective-C and C code from the command line
Home Page: http://atastypixel.com/blog/objective-c-cocoa-on-the-command-line
I noticed that if my command includes an apostrophe the final output disappears ie
runcoacoa ' NSString* searchKeyword = [NSString stringWithFormat:@"searchkeyword"]; NSString* str = [NSString stringWithFormat:@"SELECT * FROM movies where title like '%%%@%%'",searchKeyword]; NSLog(@"%@",str)';
the output will look like this:
2013-01-25 09:47:07.710 runcocoa-output[20815:707] SELECT * FROM movies where title like %searchkeyword%
and i can't escape my apostrophes.. help!
๐ Just found this repo does not have any license, it would be good to add OSI-approved one, https://spdx.org/licenses/
Some popular license choice would be:
Whenever I try running using cocoa imports like the last ios circle example I get file not found errors.
example given in readme:
./runcocoa.sh -ios 'UIGraphicsBeginImageContext(CGSizeMake(100,100)); CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextSetFillColorWithColor(ctx,[[UIColor whiteColor] CGColor]); CGContextBeginPath(ctx); CGContextMoveToPoint(ctx, 50, 0); CGContextAddArc(ctx, 50, 50, 50, M_PI/2.0, M_PI/2.0 + (2*M_PI), 0); CGContextFillPath(ctx); UIImage *icon = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://atastypixel.com/favicon.ico"]]]; [icon drawAtPoint:CGPointMake((100-[icon size].width)/2.0,(100-[icon size].height)/2.0)]; UIImage *i = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); [UIImagePNGRepresentation(i) writeToFile:@"output.png" atomically:NO];'; open output.png;
clang: warning: no such sysroot directory: '/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk'
error output:
/tmp/runcocoa.m:2:9: fatal error: 'Foundation/Foundation.h' file not found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.