Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial commit

  • Loading branch information...
commit b50e62ad855a98528fea09806e6a902e1c13c8d0 0 parents
Daisuke Murase authored
9 .gitignore
@@ -0,0 +1,9 @@
+Makefile
+build/
+*.xcodeproj/*.pbxuser
+*.xcodeproj/*.perspectivev3
+*.xcodeproj/project.xcworkspace/xcuserdata/
+*.xcodeproj/xcuserdata/
+a.out
+test.m
+*~
42 Info.plist
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleDisplayName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFiles</key>
+ <array/>
+ <key>CFBundleIdentifier</key>
+ <string>org.unknownplace.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>LSRequiresIPhoneOS</key>
+ <true/>
+ <key>UIRequiredDeviceCapabilities</key>
+ <array>
+ <string>armv7</string>
+ </array>
+ <key>UISupportedInterfaceOrientations</key>
+ <array>
+ <string>UIInterfaceOrientationPortrait</string>
+ <string>UIInterfaceOrientationLandscapeLeft</string>
+ <string>UIInterfaceOrientationLandscapeRight</string>
+ </array>
+ <key>NSMainNibFile</key>
+ <string>MainWindow</string>
+</dict>
+</plist>
1  lib/.gitignore
@@ -0,0 +1 @@
+*
300 node.xcodeproj/project.pbxproj
@@ -0,0 +1,300 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ A0C2D840146B8D5000743CA1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D83F146B8D5000743CA1 /* UIKit.framework */; };
+ A0C2D842146B8D5000743CA1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D841146B8D5000743CA1 /* Foundation.framework */; };
+ A0C2D844146B8D5000743CA1 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D843146B8D5000743CA1 /* CoreGraphics.framework */; };
+ A0C2D85B146B8E3200743CA1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A0C2D859146B8E3200743CA1 /* AppDelegate.m */; };
+ A0C2D85C146B8E3200743CA1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A0C2D85A146B8E3200743CA1 /* main.m */; };
+ A0C2D85E146B8E3C00743CA1 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A0C2D85D146B8E3C00743CA1 /* InfoPlist.strings */; };
+ A0C2D866146B8EA800743CA1 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D860146B8EA800743CA1 /* libcrypto.a */; };
+ A0C2D867146B8EA800743CA1 /* libnode.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D861146B8EA800743CA1 /* libnode.a */; };
+ A0C2D868146B8EA800743CA1 /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D862146B8EA800743CA1 /* libssl.a */; };
+ A0C2D869146B8EA800743CA1 /* libv8.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D863146B8EA800743CA1 /* libv8.a */; };
+ A0C2D86A146B8EA800743CA1 /* libv8preparser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D864146B8EA800743CA1 /* libv8preparser.a */; };
+ A0C2D86B146B8EA800743CA1 /* uv.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D865146B8EA800743CA1 /* uv.a */; };
+ A0C2D86D146B8F9500743CA1 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = A0C2D86C146B8F9500743CA1 /* MainWindow.xib */; };
+ A0C2D870146B904200743CA1 /* RunViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = A0C2D86F146B904200743CA1 /* RunViewController.mm */; };
+ A0C2D872146B905400743CA1 /* RunView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A0C2D871146B905400743CA1 /* RunView.xib */; };
+ A0C2D874146B995B00743CA1 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C2D873146B995B00743CA1 /* libz.dylib */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ A0C2D83B146B8D5000743CA1 /* node.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = node.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ A0C2D83F146B8D5000743CA1 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
+ A0C2D841146B8D5000743CA1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ A0C2D843146B8D5000743CA1 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+ A0C2D858146B8E3200743CA1 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = src/AppDelegate.h; sourceTree = "<group>"; };
+ A0C2D859146B8E3200743CA1 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = src/AppDelegate.m; sourceTree = "<group>"; };
+ A0C2D85A146B8E3200743CA1 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = src/main.m; sourceTree = "<group>"; };
+ A0C2D85D146B8E3C00743CA1 /* InfoPlist.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = InfoPlist.strings; path = resources/InfoPlist.strings; sourceTree = "<group>"; };
+ A0C2D85F146B8E8300743CA1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ A0C2D860146B8EA800743CA1 /* libcrypto.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcrypto.a; path = lib/libcrypto.a; sourceTree = "<group>"; };
+ A0C2D861146B8EA800743CA1 /* libnode.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libnode.a; path = lib/libnode.a; sourceTree = "<group>"; };
+ A0C2D862146B8EA800743CA1 /* libssl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libssl.a; path = lib/libssl.a; sourceTree = "<group>"; };
+ A0C2D863146B8EA800743CA1 /* libv8.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libv8.a; path = lib/libv8.a; sourceTree = "<group>"; };
+ A0C2D864146B8EA800743CA1 /* libv8preparser.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libv8preparser.a; path = lib/libv8preparser.a; sourceTree = "<group>"; };
+ A0C2D865146B8EA800743CA1 /* uv.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = uv.a; path = lib/uv.a; sourceTree = "<group>"; };
+ A0C2D86C146B8F9500743CA1 /* MainWindow.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MainWindow.xib; path = resources/MainWindow.xib; sourceTree = "<group>"; };
+ A0C2D86E146B904200743CA1 /* RunViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RunViewController.h; path = src/RunViewController.h; sourceTree = "<group>"; };
+ A0C2D86F146B904200743CA1 /* RunViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RunViewController.mm; path = src/RunViewController.mm; sourceTree = "<group>"; };
+ A0C2D871146B905400743CA1 /* RunView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = RunView.xib; path = resources/RunView.xib; sourceTree = "<group>"; };
+ A0C2D873146B995B00743CA1 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ A0C2D838146B8D5000743CA1 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A0C2D874146B995B00743CA1 /* libz.dylib in Frameworks */,
+ A0C2D866146B8EA800743CA1 /* libcrypto.a in Frameworks */,
+ A0C2D867146B8EA800743CA1 /* libnode.a in Frameworks */,
+ A0C2D868146B8EA800743CA1 /* libssl.a in Frameworks */,
+ A0C2D869146B8EA800743CA1 /* libv8.a in Frameworks */,
+ A0C2D86A146B8EA800743CA1 /* libv8preparser.a in Frameworks */,
+ A0C2D86B146B8EA800743CA1 /* uv.a in Frameworks */,
+ A0C2D840146B8D5000743CA1 /* UIKit.framework in Frameworks */,
+ A0C2D842146B8D5000743CA1 /* Foundation.framework in Frameworks */,
+ A0C2D844146B8D5000743CA1 /* CoreGraphics.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ A0C2D830146B8D5000743CA1 = {
+ isa = PBXGroup;
+ children = (
+ A0C2D857146B8DB100743CA1 /* src */,
+ A0C2D856146B8DAA00743CA1 /* resources */,
+ A0C2D83E146B8D5000743CA1 /* Frameworks */,
+ A0C2D83C146B8D5000743CA1 /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ A0C2D83C146B8D5000743CA1 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ A0C2D83B146B8D5000743CA1 /* node.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ A0C2D83E146B8D5000743CA1 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ A0C2D83F146B8D5000743CA1 /* UIKit.framework */,
+ A0C2D841146B8D5000743CA1 /* Foundation.framework */,
+ A0C2D843146B8D5000743CA1 /* CoreGraphics.framework */,
+ A0C2D873146B995B00743CA1 /* libz.dylib */,
+ A0C2D860146B8EA800743CA1 /* libcrypto.a */,
+ A0C2D861146B8EA800743CA1 /* libnode.a */,
+ A0C2D862146B8EA800743CA1 /* libssl.a */,
+ A0C2D863146B8EA800743CA1 /* libv8.a */,
+ A0C2D864146B8EA800743CA1 /* libv8preparser.a */,
+ A0C2D865146B8EA800743CA1 /* uv.a */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ A0C2D856146B8DAA00743CA1 /* resources */ = {
+ isa = PBXGroup;
+ children = (
+ A0C2D85F146B8E8300743CA1 /* Info.plist */,
+ A0C2D85D146B8E3C00743CA1 /* InfoPlist.strings */,
+ A0C2D86C146B8F9500743CA1 /* MainWindow.xib */,
+ A0C2D871146B905400743CA1 /* RunView.xib */,
+ );
+ name = resources;
+ sourceTree = "<group>";
+ };
+ A0C2D857146B8DB100743CA1 /* src */ = {
+ isa = PBXGroup;
+ children = (
+ A0C2D86E146B904200743CA1 /* RunViewController.h */,
+ A0C2D86F146B904200743CA1 /* RunViewController.mm */,
+ A0C2D858146B8E3200743CA1 /* AppDelegate.h */,
+ A0C2D859146B8E3200743CA1 /* AppDelegate.m */,
+ A0C2D85A146B8E3200743CA1 /* main.m */,
+ );
+ name = src;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ A0C2D83A146B8D5000743CA1 /* node */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A0C2D853146B8D5100743CA1 /* Build configuration list for PBXNativeTarget "node" */;
+ buildPhases = (
+ A0C2D837146B8D5000743CA1 /* Sources */,
+ A0C2D838146B8D5000743CA1 /* Frameworks */,
+ A0C2D839146B8D5000743CA1 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = node;
+ productName = node;
+ productReference = A0C2D83B146B8D5000743CA1 /* node.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ A0C2D832146B8D5000743CA1 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
+ buildConfigurationList = A0C2D835146B8D5000743CA1 /* Build configuration list for PBXProject "node" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = A0C2D830146B8D5000743CA1;
+ productRefGroup = A0C2D83C146B8D5000743CA1 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ A0C2D83A146B8D5000743CA1 /* node */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ A0C2D839146B8D5000743CA1 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A0C2D85E146B8E3C00743CA1 /* InfoPlist.strings in Resources */,
+ A0C2D86D146B8F9500743CA1 /* MainWindow.xib in Resources */,
+ A0C2D872146B905400743CA1 /* RunView.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ A0C2D837146B8D5000743CA1 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A0C2D85B146B8E3200743CA1 /* AppDelegate.m in Sources */,
+ A0C2D85C146B8E3200743CA1 /* main.m in Sources */,
+ A0C2D870146B904200743CA1 /* RunViewController.mm in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ A0C2D851146B8D5100743CA1 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ A0C2D852146B8D5100743CA1 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 4.0;
+ OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ A0C2D854146B8D5100743CA1 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "";
+ HEADER_SEARCH_PATHS = "$(HOME)/.nave/installed/0.6.0/include/node";
+ INFOPLIST_FILE = Info.plist;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/lib\"",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ A0C2D855146B8D5100743CA1 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "";
+ HEADER_SEARCH_PATHS = "$(HOME)/.nave/installed/0.6.0/include/node";
+ INFOPLIST_FILE = Info.plist;
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/lib\"",
+ );
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ A0C2D835146B8D5000743CA1 /* Build configuration list for PBXProject "node" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A0C2D851146B8D5100743CA1 /* Debug */,
+ A0C2D852146B8D5100743CA1 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A0C2D853146B8D5100743CA1 /* Build configuration list for PBXNativeTarget "node" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A0C2D854146B8D5100743CA1 /* Debug */,
+ A0C2D855146B8D5100743CA1 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = A0C2D832146B8D5000743CA1 /* Project object */;
+}
7 node.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:node.xcodeproj">
+ </FileRef>
+</Workspace>
2  resources/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
154 resources/MainWindow.xib
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1280</int>
+ <string key="IBDocument.SystemVersion">11C74</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1938</string>
+ <string key="IBDocument.AppKitVersion">1138.23</string>
+ <string key="IBDocument.HIToolboxVersion">567.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">933</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBUIWindow</string>
+ <string>IBUICustomObject</string>
+ <string>IBUIViewController</string>
+ <string>IBProxyObject</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="841351856">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="590933970">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUICustomObject" id="217860293">
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIWindow" id="380026005">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">1316</int>
+ <object class="NSPSMatrix" key="NSFrameMatrix"/>
+ <string key="NSFrameSize">{320, 480}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSNextKeyView"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIOpaque">NO</bool>
+ <bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIResizesToFullScreen">YES</bool>
+ </object>
+ <object class="IBUIViewController" id="713891733">
+ <string key="IBUINibName">RunView</string>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+ <int key="IBUIInterfaceOrientation">1</int>
+ <int key="interfaceOrientation">1</int>
+ </object>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIHorizontal">NO</bool>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">delegate</string>
+ <reference key="source" ref="841351856"/>
+ <reference key="destination" ref="217860293"/>
+ </object>
+ <int key="connectionID">4</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">rootViewController</string>
+ <reference key="source" ref="380026005"/>
+ <reference key="destination" ref="713891733"/>
+ </object>
+ <int key="connectionID">7</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">window</string>
+ <reference key="source" ref="217860293"/>
+ <reference key="destination" ref="380026005"/>
+ </object>
+ <int key="connectionID">5</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">2</int>
+ <reference key="object" ref="380026005"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="841351856"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="590933970"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">3</int>
+ <reference key="object" ref="217860293"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="713891733"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">UIApplication</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <dictionary class="NSMutableDictionary" key="2.IBAttributePlaceholdersKey"/>
+ <string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="3.CustomClassName">AppDelegate</string>
+ <string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="6.CustomClassName">RunViewController</string>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">7</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes"/>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">933</string>
+ </data>
+</archive>
253 resources/RunView.xib
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
+ <data>
+ <int key="IBDocument.SystemTarget">1280</int>
+ <string key="IBDocument.SystemVersion">11C74</string>
+ <string key="IBDocument.InterfaceBuilderVersion">1938</string>
+ <string key="IBDocument.AppKitVersion">1138.23</string>
+ <string key="IBDocument.HIToolboxVersion">567.00</string>
+ <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+ <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="NS.object.0">933</string>
+ </object>
+ <array key="IBDocument.IntegratedClassDependencies">
+ <string>IBUITextView</string>
+ <string>IBUIButton</string>
+ <string>IBUIView</string>
+ <string>IBProxyObject</string>
+ </array>
+ <array key="IBDocument.PluginDependencies">
+ <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </array>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
+ <integer value="1" key="NS.object.0"/>
+ </object>
+ <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+ <object class="IBProxyObject" id="372490531">
+ <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBProxyObject" id="975951072">
+ <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIView" id="191373211">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">274</int>
+ <array class="NSMutableArray" key="NSSubviews">
+ <object class="IBUITextView" id="524877568">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">274</int>
+ <string key="NSFrame">{{20, 20}, {280, 100}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSNextKeyView" ref="906714028"/>
+ <string key="NSReuseIdentifierKey">_NS:639</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC43OTUzODg5MjY2IDAuNzk1Mzg4OTI2NiAwLjc5NTM4ODkyNjYAA</bytes>
+ </object>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <string key="IBUIText"/>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocapitalizationType">2</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription" id="659080268">
+ <int key="type">1</int>
+ <double key="pointSize">14</double>
+ </object>
+ <object class="NSFont" key="IBUIFont" id="576148475">
+ <string key="NSName">Helvetica</string>
+ <double key="NSSize">14</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ <object class="IBUIButton" id="906714028">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{228, 128}, {72, 37}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <reference key="NSNextKeyView"/>
+ <string key="NSReuseIdentifierKey">_NS:225</string>
+ <bool key="IBUIOpaque">NO</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <int key="IBUIContentHorizontalAlignment">0</int>
+ <int key="IBUIContentVerticalAlignment">0</int>
+ <int key="IBUIButtonType">1</int>
+ <string key="IBUINormalTitle">Run!</string>
+ <object class="NSColor" key="IBUIHighlightedTitleColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+ </object>
+ <object class="NSColor" key="IBUINormalTitleShadowColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MC41AA</bytes>
+ </object>
+ <object class="IBUIFontDescription" key="IBUIFontDescription">
+ <int key="type">2</int>
+ <double key="pointSize">15</double>
+ </object>
+ <object class="NSFont" key="IBUIFont">
+ <string key="NSName">Helvetica-Bold</string>
+ <double key="NSSize">15</double>
+ <int key="NSfFlags">16</int>
+ </object>
+ </object>
+ <object class="IBUITextView" id="717478212">
+ <reference key="NSNextResponder" ref="191373211"/>
+ <int key="NSvFlags">292</int>
+ <string key="NSFrame">{{20, 173}, {280, 267}}</string>
+ <reference key="NSSuperview" ref="191373211"/>
+ <string key="NSReuseIdentifierKey">_NS:639</string>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">1</int>
+ <bytes key="NSRGB">MSAxIDEAA</bytes>
+ </object>
+ <bool key="IBUIClipsSubviews">YES</bool>
+ <bool key="IBUIMultipleTouchEnabled">YES</bool>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBUIEditable">NO</bool>
+ <string key="IBUIText"/>
+ <object class="IBUITextInputTraits" key="IBUITextInputTraits">
+ <int key="IBUIAutocapitalizationType">2</int>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ <reference key="IBUIFontDescription" ref="659080268"/>
+ <reference key="IBUIFont" ref="576148475"/>
+ </object>
+ </array>
+ <string key="NSFrame">{{0, 20}, {320, 460}}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSNextKeyView" ref="524877568"/>
+ <object class="NSColor" key="IBUIBackgroundColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ <object class="NSColorSpace" key="NSCustomColorSpace">
+ <int key="NSID">2</int>
+ </object>
+ </object>
+ <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
+ <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ </object>
+ </array>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <array class="NSMutableArray" key="connectionRecords">
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">view</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="191373211"/>
+ </object>
+ <int key="connectionID">3</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">resultView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="717478212"/>
+ </object>
+ <int key="connectionID">8</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">runButton</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="906714028"/>
+ </object>
+ <int key="connectionID">9</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchOutletConnection" key="connection">
+ <string key="label">sourceView</string>
+ <reference key="source" ref="372490531"/>
+ <reference key="destination" ref="524877568"/>
+ </object>
+ <int key="connectionID">10</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBCocoaTouchEventConnection" key="connection">
+ <string key="label">onPushRun</string>
+ <reference key="source" ref="906714028"/>
+ <reference key="destination" ref="372490531"/>
+ <int key="IBEventType">7</int>
+ </object>
+ <int key="connectionID">11</int>
+ </object>
+ </array>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <array key="orderedObjects">
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <array key="object" id="0"/>
+ <reference key="children" ref="1000"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">1</int>
+ <reference key="object" ref="191373211"/>
+ <array class="NSMutableArray" key="children">
+ <reference ref="524877568"/>
+ <reference ref="906714028"/>
+ <reference ref="717478212"/>
+ </array>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="372490531"/>
+ <reference key="parent" ref="0"/>
+ <string key="objectName">File's Owner</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="975951072"/>
+ <reference key="parent" ref="0"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="524877568"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">6</int>
+ <reference key="object" ref="906714028"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">7</int>
+ <reference key="object" ref="717478212"/>
+ <reference key="parent" ref="191373211"/>
+ </object>
+ </array>
+ </object>
+ <dictionary class="NSMutableDictionary" key="flattenedProperties">
+ <string key="-1.CustomClassName">RunViewController</string>
+ <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="-2.CustomClassName">UIResponder</string>
+ <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="5.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ <string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+ </dictionary>
+ <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
+ <nil key="activeLocalization"/>
+ <dictionary class="NSMutableDictionary" key="localizations"/>
+ <nil key="sourceID"/>
+ <int key="maxID">11</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes"/>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
+ <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ <string key="IBCocoaTouchPluginVersion">933</string>
+ </data>
+</archive>
7 src/AppDelegate.h
@@ -0,0 +1,7 @@
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : UIResponder <UIApplicationDelegate>
+
+@property (retain, nonatomic) IBOutlet UIWindow* window;
+
+@end
19 src/AppDelegate.m
@@ -0,0 +1,19 @@
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+@synthesize window = window_;
+
+-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
+{
+ // Override point for customization after application launch.
+ [self.window makeKeyAndVisible];
+ return YES;
+}
+
+-(void)dealloc {
+ self.window = nil;
+ [super dealloc];
+}
+
+@end
11 src/RunViewController.h
@@ -0,0 +1,11 @@
+#import <UIKit/UIKit.h>
+
+@interface RunViewController : UIViewController
+
+@property (nonatomic, retain) IBOutlet UIButton* runButton;
+@property (nonatomic, retain) IBOutlet UITextView* sourceView;
+@property (nonatomic, retain) IBOutlet UITextView* resultView;
+
+-(IBAction)onPushRun;
+
+@end
49 src/RunViewController.m
@@ -0,0 +1,49 @@
+#import "RunViewController.h"
+
+#import <node.h>
+
+@interface RunViewController (Private)
+-(void)releaseIB;
+@end
+
+@implementation RunViewController
+
+@synthesize runButton = runButton_;
+@synthesize sourceView = sourceView_, resultView = resultView_;
+
+-(void)viewDidUnload {
+ [self releaseIB];
+ [super viewDidUnload];
+}
+
+-(void)dealloc {
+ [self releaseIB];
+ [super dealloc];
+}
+
+-(void)releaseIB {
+ self.runButton = nil;
+ self.sourceView = nil;
+ self.resultView = nil;
+}
+
+-(IBAction)onPushRun {
+ NSLog(@"run");
+
+ // save js as file
+ NSString* file = [NSTemporaryDirectory() stringByAppendingPathComponent:@"code.js"];
+ [self.sourceView.text writeToFile:file
+ atomically:YES
+ encoding:NSUTF8StringEncoding
+ error:nil];
+
+ // run the code
+ const char* argv[2];
+ argv[0] = [[[NSBundle mainBundle] executablePath] UTF8String];
+ argv[1] = [file UTF8String];
+
+ int exitStatus = node::Start(argc, (char**)argv);
+ NSLog(@"[node] exited with status %d", exitStatus);
+}
+
+@end
49 src/RunViewController.mm
@@ -0,0 +1,49 @@
+#import "RunViewController.h"
+
+#import <node.h>
+
+@interface RunViewController (Private)
+-(void)releaseIB;
+@end
+
+@implementation RunViewController
+
+@synthesize runButton = runButton_;
+@synthesize sourceView = sourceView_, resultView = resultView_;
+
+-(void)viewDidUnload {
+ [self releaseIB];
+ [super viewDidUnload];
+}
+
+-(void)dealloc {
+ [self releaseIB];
+ [super dealloc];
+}
+
+-(void)releaseIB {
+ self.runButton = nil;
+ self.sourceView = nil;
+ self.resultView = nil;
+}
+
+-(IBAction)onPushRun {
+ NSLog(@"run");
+
+ // save js as file
+ NSString* file = [NSTemporaryDirectory() stringByAppendingPathComponent:@"code.js"];
+ [self.sourceView.text writeToFile:file
+ atomically:YES
+ encoding:NSUTF8StringEncoding
+ error:nil];
+
+ // run the code
+ const char* argv[2];
+ argv[0] = [[[NSBundle mainBundle] executablePath] UTF8String];
+ argv[1] = [file UTF8String];
+
+ int exitStatus = node::Start(2, (char**)argv);
+ NSLog(@"[node] exited with status %d", exitStatus);
+}
+
+@end
8 src/main.m
@@ -0,0 +1,8 @@
+#import <UIKit/UIKit.h>
+
+int main(int argc, char** argv) {
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ int retVal = UIApplicationMain(argc, argv, nil, nil);
+ [pool drain];
+ return retVal;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.