diff --git a/commands/package/index.js b/commands/package/index.js
index b649ee5..4ebdfae 100644
--- a/commands/package/index.js
+++ b/commands/package/index.js
@@ -39,7 +39,9 @@ module.exports = new Command(
tasks.push(function (next) {
prepare(state, next);
});
-
+
+
+ // this is where we would extend for extensions and possibly watchos apps.
async.series(tasks,function(err){
if (err) { return done(err); }
switch (options.packageType) {
diff --git a/examples/arraySortWithFunctionPointer/app.js b/examples/arraySortWithFunctionPointer/app.js
index f3bb67b..9cbb28a 100644
--- a/examples/arraySortWithFunctionPointer/app.js
+++ b/examples/arraySortWithFunctionPointer/app.js
@@ -1,5 +1,7 @@
"use hyperloop"
-
+/*
+This example fails. Hyperloop wants to bring SceneKit in. why?
+*/
var array = NSMutableArray.array();
array.addObject(NSNumber.numberWithInt(3));
array.addObject(NSNumber.numberWithInt(2));
diff --git a/examples/cast/app.js b/examples/cast/app.js
index 60df0fa..3cfae1a 100644
--- a/examples/cast/app.js
+++ b/examples/cast/app.js
@@ -1,8 +1,10 @@
"use hyperloop"
+/* this also wants to bring in SceneKit. really confused */
+
var array = NSMutableArray.array();
array.cast(NSMutableArray).addObject(NSString.stringWithUTF8String("abc"));
var obj = array.objectAtIndex(0);
-var length = obj.cast(NSString).length();
+var length = obj.cast(NSString).length;
var numLen = NSNumber.numberWithDouble(length);
//var i = "a" instanceof NSNumber;
//var i=numLen instanceof numLen;
diff --git a/examples/casting/app.js b/examples/casting/app.js
index 5f2dded..f51d5b3 100644
--- a/examples/casting/app.js
+++ b/examples/casting/app.js
@@ -14,7 +14,7 @@ array.addObject(str);
// cast the NSString back when we pull out the string from the array
var str2 = array.objectAtIndex(0).cast('NSString');
-console.log(str2.length());
+console.log(str2.length);
/*
Create our simple UI.
diff --git a/examples/constant/app.js b/examples/constant/app.js
index 0232d18..5e7b509 100644
--- a/examples/constant/app.js
+++ b/examples/constant/app.js
@@ -1,5 +1,5 @@
"use hyperloop"
-
+/* this example fails. likely due to not having all the frameworks included in the readme */
// enum
var center = NSTextAlignmentCenter;
diff --git a/examples/distanceTraveled/README.md b/examples/distanceTraveled/README.md
index 42178b5..c6229a1 100644
--- a/examples/distanceTraveled/README.md
+++ b/examples/distanceTraveled/README.md
@@ -1,5 +1,5 @@
## Run
```bash
-bin/hyperloop clean compile package launch --platform=ios --src=../hyperloop-ios/examples/distanceTraveled --arch=i386 --frameworks=CoreLocation --frameworks=CoreText
+../hyperloop-cli/bin/hyperloop clean compile package launch --platform=ios --src=../hyperloop-ios/examples/distanceTraveled --arch=i386 --frameworks=CoreLocation --frameworks=CoreText
```
diff --git a/examples/distanceTraveled/app.js b/examples/distanceTraveled/app.js
index 336553b..56d4491 100644
--- a/examples/distanceTraveled/app.js
+++ b/examples/distanceTraveled/app.js
@@ -1,5 +1,23 @@
"use hyperloop"
+/* this wont work until we can figure out how to have an Info.plist file included
+we need NSLocationAlwaysUsageDescription or NSLocationWhenInUsageDescription with a string explaining.
+the XML would look something like:
+
+
+
+
+ NSLocationAlwaysUsageDescription
+ Specify the reason for accessing the user's location information.
+ This appears in the alert dialog when asking the user for permission to
+ access their location.
+
+
+
+
+*/
+
+
var TARGET_FPS = 60;
/*
@@ -34,7 +52,7 @@ var calculateManually = false,
function handleNewPosition(locationManager, didUpdateLocations) {
var locations = didUpdateLocations.cast('NSArray');
- for (var i = 0, iL = locations.count(); i < iL; i++) {
+ for (var i = 0, iL = locations.count; i < iL; i++) {
var location = locations.objectAtIndex(i).cast('CLLocation'),
coordinate = location.coordinate;
var _lastLocation = lastLocation.cast('CLLocation'); // TODO need to cast explicitly here
diff --git a/examples/nib/app.js b/examples/nib/app.js
index d1d5a56..8f45fd0 100644
--- a/examples/nib/app.js
+++ b/examples/nib/app.js
@@ -9,7 +9,7 @@ var xbundle = NSBundle.mainBundle();
function nibToView(name) {
var xib = xbundle.loadNibNamed(name, null, null);
- var xview = xib.lastObject();
+ var xview = xib.lastObject;
xview.frame = UIScreen.mainScreen().applicationFrame;
return xview;
}
diff --git a/examples/pixate/README.md b/examples/pixate/README.md
index 4ce9a95..3304168 100644
--- a/examples/pixate/README.md
+++ b/examples/pixate/README.md
@@ -5,7 +5,7 @@ This example demonstrates how to use external framework with Hyperloop. You can
## Install
- Download latest Pixate Freestyle from [https://github.com/Pixate/pixate-freestyle-ios/releases](https://github.com/Pixate/pixate-freestyle-ios/releases)
-- Extract donwlowded zip and place PixateFreestyle.framework into anywhere, like PIXATE_FRAMEWORK_DIR
+- Extract downloaded zip and place PixateFreestyle.framework into anywhere, like PIXATE_FRAMEWORK_DIR
## Run
diff --git a/examples/spritekit/app.js b/examples/spritekit/app.js
index 2b87626..f628a94 100644
--- a/examples/spritekit/app.js
+++ b/examples/spritekit/app.js
@@ -18,14 +18,14 @@ function textureArrayFromSlices(slices) {
var manager = NSFileManager.defaultManager();
// get the path to the given slices folder
- var path = NSBundle.mainBundle().resourcePath().stringByAppendingString(NSString.stringWithUTF8String('/' + slices));
+ var path = NSBundle.mainBundle().resourcePath.stringByAppendingString(NSString.stringWithUTF8String('/' + slices));
// get the list of slice images
var files = manager.contentsOfDirectoryAtPath(path, null);
// Create an array of the images as textures
var textures = NSMutableArray.array();
- for (var i = 0; i < files.count(); i++) {
+ for (var i = 0; i < files.count; i++) {
// make sure we have an actual image
if (/^Slice\-\d+\.png$/.test(files.objectAtIndex(i))) {
diff --git a/lib/buildlib.js b/lib/buildlib.js
index 5461955..d62c4d1 100644
--- a/lib/buildlib.js
+++ b/lib/buildlib.js
@@ -92,6 +92,7 @@ exports.__defineSetter__('debug',function(v){
function getSDKs (settings) {
return {
'i386': {path: settings.simSDKPath, name:'ios-simulator'},
+ 'x86_64': {path: settings.simSDKPath, name:'ios-simulator'},
'arm64': {path: settings.deviceSDKPath, name:'iphoneos'},
'armv7': {path: settings.deviceSDKPath, name:'iphoneos'},
'armv7s': {path: settings.deviceSDKPath, name:'iphoneos'}
diff --git a/lib/library.js b/lib/library.js
index 4d84924..93cc43e 100644
--- a/lib/library.js
+++ b/lib/library.js
@@ -80,7 +80,7 @@ var fs = require('fs'),
// set the minVersion for iOS compile if not set
if (!options.minVersion) {
- options.minVersion = options.ticurrent ? '6.0' : version;
+ options.minVersion = options.ticurrent ? '7.0' : version;
}
var opts = _.clone(options);
@@ -142,9 +142,10 @@ var fs = require('fs'),
*/
function getArchitectures (options, callback) {
xcode.settings(function(err,settings){
- var archs = ['i386','armv7s','armv7','arm64'],
+ var archs = ['i386','armv7s','armv7','arm64','x86_64'],
sdks = {
'i386': {path: settings.simSDKPath, name:'ios-simulator'},
+ 'x86_64': {path: settings.simSDKPath, name:'ios-simulator'},
'armv7s': {path: settings.deviceSDKPath, name:'iphoneos'},
'armv7': {path: settings.deviceSDKPath, name:'iphoneos'},
'arm64': {path: settings.deviceSDKPath, name:'iphoneos'}
@@ -162,7 +163,7 @@ var fs = require('fs'),
}
}
else if (options.simulator_only) {
- archs = ['i386'];
+ archs = ['i386','x86_64'];
}
callback(err, archs, sdks, settings);
});
diff --git a/lib/packager.js b/lib/packager.js
index 5bf7e9f..f8735bd 100644
--- a/lib/packager.js
+++ b/lib/packager.js
@@ -71,7 +71,7 @@ var fs = require('fs'),
buildoptions.cflags.push('-I"'+classes+'"');
buildoptions.cflags.push('-I"'+headers+'"');
buildoptions.cflags.push('-I"'+path.join(headers,'TiCore')+'"');
- buildoptions['min-version'] = buildoptions['minVersion'] = '6.0';
+ buildoptions['min-version'] = buildoptions['minVersion'] = '7.0';
buildoptions.ticurrent = true;
next();
});
@@ -153,7 +153,7 @@ var fs = require('fs'),
// fall back to simulator
// set a flag to indicate that this is a simulator launch
options.simulator_only = true;
- options.arch = 'i386';
+ options.arch = 'x86_64';
}
else {
if (options.device_id) {
@@ -173,7 +173,7 @@ var fs = require('fs'),
}
options.device_id = state.device_id = uuids[0];
}
- options.arch = options.arch || 'armv7';
+ options.arch = options.arch || 'arm64';
}
});
}
@@ -191,7 +191,7 @@ var fs = require('fs'),
* package an iOS application
*/
function packageApp(options,args,callback) {
-
+ //this needs updating
var libpath = path.basename(options.libname||'libapp.a'),
libname = /^lib(\w+)\.a/.exec(libpath)[1],
arch = options.arch || 'i386',
@@ -465,6 +465,8 @@ var fs = require('fs'),
* package this app into a Ti.Current module
*/
function packageModule (options, args, callback) {
+ console.log('---------THESE ARE YOUR OPTIONS FOR PACKAGE MODULE --------');
+ console.log(options);
var name = makeModuleName(options.moduleid),
copyValues = _.extend(options.manifest, {
modulename: name,
@@ -475,6 +477,8 @@ var fs = require('fs'),
srcdir = path.join(options.dest,'src'),
templateDir = path.join(__dirname,'..','templates','ticurrent'),
srcs = [];
+ console.log('Your Name is'+name);
+
util.copyAndFilterEJS(path.join(templateDir,'module.h'),path.join(srcdir,name+'.h'),copyValues);
util.copyAndFilterEJS(path.join(templateDir,'module.m'),path.join(srcdir,name+'.mm'),copyValues);
util.copyAndFilterEJS(path.join(templateDir,'module_assets.h'),path.join(srcdir,name+'Assets.h'),copyValues);
@@ -597,9 +601,8 @@ var fs = require('fs'),
rd = path.join(rd,'..');
}
files.push([finallib,basedir+path.basename(finallib)]);
-
// directories & files we want to include in the module zip
- ['assets'/*,'platform'*/,'hooks','manifest','module.xcconfig','timodule.xml','LICENSE','metadata.json'].forEach(function(fn){
+ ['assets','platform','hooks','manifest','module.xcconfig','timodule.xml','LICENSE','metadata.json','documentation', 'example'].forEach(function(fn){
var f = path.join(rd,fn);
if (fs.existsSync(f)) {
if (util.isDirectory(f)) {
diff --git a/package.json b/package.json
index cafa3f5..7395a6c 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,8 @@
"semver": "2.2.1",
"uglify-js": "^2.4.13",
"prompt": "~0.2.12",
- "ioslib": "0.2.9"
+ "ioslib": "CodexLabs/ioslib",
+ "zipper": "0.3.0"
},
"devDependencies": {
"grunt": "~0.4.1",
diff --git a/templates/_ticurrent.h b/templates/_ticurrent.h
index 3ee8637..773ad33 100644
--- a/templates/_ticurrent.h
+++ b/templates/_ticurrent.h
@@ -14,7 +14,7 @@
#ifdef USE_TIJSCORE
#define HYPERLOOP_EXCLUDE_JSCORE_IMPORT
-#include
+#include
#define JSGlobalContextRef TiGlobalContextRef
#define JSContextGetGlobalObject TiContextGetGlobalObject