我正在使用Appcelerator Hyperloop
,希望将调用的第三方 iOS 框架集成KolorEyes
到我的Titanium
应用程序中。
这是我的appc.js
文件:
module.exports = {
hyperloop: {
ios: {
xcodebuild: {
flags: {
FRAMEWORK_SEARCH_PATHS: '../../src',
LD_RUNPATH_SEARCH_PATHS: '@executable_path'
},
frameworks: [
'KolorEyes'
]
},
thirdparty: {
'KolorEyes': {
source: ['src'],
header: 'src',
resource: 'src'
}
}
}
}
};
我的KolorEyes.framework
文件src
夹位于项目根目录的文件夹中。
我正在做的事情看起来应该可行:
index.js
var KolorEyes = require('KolorEyes/KolorEyes');
var KolorEyesSessionParams = require('KolorEyes/KolorEyesSessionParams');
var KolorEyesRenderViewParams = require('KolorEyes/KolorEyesRenderViewParams');
console.log('CLASS: ' + KolorEyes);
console.log('CLASS: ' + KolorEyesSessionParams);
console.log('CLASS: ' + KolorEyesRenderViewParams);
这是输出:
[INFO] : CLASS: [class KolorEyes]
[INFO] : CLASS: [class KolorEyesSessionParams]
[INFO] : CLASS: [class KolorEyesRenderViewParams]
但是当我尝试这样做时:
var params = KolorEyesSessionParams.alloc().init();
它告诉我找不到课程KolorEyesSessionParams
:
[ERROR] : Cannot find class with name: KolorEyesSessionParams
[ERROR] : Script Error {
[ERROR] : column = 32;
[ERROR] : description = "Cannot find class with name: KolorEyesSessionParams";
[ERROR] : line = 108;
[ERROR] : message = "Cannot find class with name: KolorEyesSessionParams";
[ERROR] : name = ClassNotFound;
[ERROR] : nativeStack = "1 libobjc.A.dylib 0x23a6ae17 objc_exception_throw + 38\n2 kolor_test 0x0019ce0b kolor_test + 1515019\n3 kolor_test 0x00195d05 kolor_test + 1486085\n4 JavaScriptCore 0x275f77cd <redacted> + 364\n5 JavaScriptCore 0x273c7dfb <redacted> + 314\n6 JavaScriptCore 0x273c6629 <redacted> + 120\n7 JavaScriptCore 0x2768302f <redacted> + 20366\n8 JavaScriptCore 0x27683039 <redacted> + 20376\n9 JavaScriptCore 0x2767de91 <redacted> + 336\n10 JavaScriptCore 0x275d87db <redacted> + 102\n11 JavaScriptCore 0x273caa09 <redacted> + 344\n12 JavaScriptCore 0x273ca8ad _ZN3JSC4callEPNS_9ExecStateENS_7JSValueENS_8CallTypeERKNS_8CallDataES2_RKNS_7ArgListE + 52\n13 JavaScriptCore 0x275887a3 <redacted> + 126\n14 JavaScriptCore 0x276dc183 _ZNK3JSC12PropertySlot14functionGetterEPNS_9ExecStateE + 42\n15 JavaScriptCore 0x273c220b <redacted> + 1406\n16 JavaScriptCore 0x276804ed <redacted> + 9292\n17 JavaScriptCore 0x27683039 <redacted> + 20376\n18 JavaScriptCore 0x27683135 <redacted> + 20628\n19 JavaScriptCore 0x27683039 <redacted> + 20376\n20 JavaScriptCore 0x2767de91 <redacted> + 336\n21 JavaScriptCore 0x275d87db <redacted> + 102\n22 JavaScriptCore 0x273b8d0d <redacted> + 7292\n23 JavaScriptCore 0x274c839b _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 354\n24 JavaScriptCore 0x275f6ba5 JSEvaluateScript + 268\n25 kolor_test 0x0003c91d kolor_test + 71965\n26 kolor_test 0x00042fa7 kolor_test + 98215\n27 kolor_test 0x00044741 kolor_test + 104257\n28 kolor_test 0x00044b81 kolor_test + 105345\n29 kolor_test 0x0003caf3 kolor_test + 72435\n30 kolor_test 0x0003da83 kolor_test + 76419\n31 kolor_test 0x00045589 kolor_test + 107913\n32 kolor_test 0x00044521 kolor_test + 103713\n33 libdispatch.dylib 0x23e3d823 <redacted> + 10\n34 libdispatch.dylib 0x23e3d80f <redacted> + 22\n35 libdispatch.dylib 0x23e4bba9 <redacted> + 1524\n36 CoreFoundation 0x24291b6d <redacted> + 8\n37 CoreFoundation 0x24290067 <redacted> + 1574\n38 CoreFoundation 0x241df229 CFRunLoopRunSpecific + 520\n39 CoreFoundation 0x241df015 CFRunLoopRunInMode + 108\n40 GraphicsServices 0x257cfac9 GSEventRunModal + 160\n41 UIKit 0x288b3189 UIApplicationMain + 144\n42 kolor_test 0x00030747 kolor_test + 22343\n43 libdyld.dylib 0x23e87873 <redacted> + 2";
[ERROR] : sourceURL = "file:///var/containers/Bundle/Application/1536D545-76AB-48FA-BDF7-C2729A175F82/kolor_test.app/hyperloop/koloreyes/koloreyessessionparams.js";
[ERROR] : }
我使用东西没有问题UIKit
,但只是看不到这些第三方类。即使Hyperloop
说它正在为他们生成课程:
[INFO] : [Hyperloop] Generating class GLKit/GLKView
[INFO] : [Hyperloop] Generating class GLKit/GLKViewController
[INFO] : [Hyperloop] Generating class KolorEyes/KolorEyes
[INFO] : [Hyperloop] Generating class KolorEyes/KolorEyesRenderViewParams
[INFO] : [Hyperloop] Generating class KolorEyes/KolorEyesSessionParams
[INFO] : [Hyperloop] Generating class ModelIO/MDLCamera
[INFO] : [Hyperloop] Generating class ModelIO/MDLLight
有任何想法吗?