[TIMOB-20484] Hyperloop: iOS: Local-embedded frameworks not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-04T09:46:22.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.4.0 |
Components | Hyperloop, iOS |
Labels | hyperloop, qe-5.4.0 |
Reporter | Hans Knöchel |
Assignee | Chee Kiat Ng |
Created | 2016-02-29T13:07:35.000+0000 |
Updated | 2016-08-04T09:46:33.000+0000 |
Description
Local-embedded frameworks in the /src/ folder are not working - like
.m
and .swift
files. We should find a way to recognize local-embedded frameworks correctly.
Project to reproduce: https://github.com/hansemannn/hyperloop-robot
Framework talking about: https://github.com/orbotix/Sphero-iOS-SDK/tree/master/frameworks/RobotKit.framework
The metabase seems to be generated, but the required (proof of concept) method does not work:
var RKRobotDiscoveryAgent = require("RobotKit/RKRobotDiscoveryAgent"); // works
RKRobotDiscoveryAgent.sharedAgent().isDiscovering(); // does not work - class not found
The generated metabase for the framework is attached.
*{color:red}EDIT{color}*: The problem happens with every other local-embedded framework as well. Using the attached "Serenity.framework" and the following demo code doesn't work as well. This very critical for the GA release.
var Widget = require("Serenity/Widget");
var test = new Widget();
Ti.API.warn(test.image());
Attachments
File | Date | Size |
---|---|---|
robotkit.zip | 2016-05-01T09:29:22.000+0000 | 132947 |
Serenity.zip | 2016-05-31T11:42:55.000+0000 | 93918 |
The attached Serenity.framework is empty. Is it supposed to be like that? [~hansknoechel]
Updated the Serenity framework + bundle (should not be required, but would be good to see if it works).
PR here: https://github.com/appcelerator/hyperloop.next/pull/34
Steps to test
1. *appc new --classic* 2. install the packaged hyperloop module here: https://github.com/appcelerator/hyperloop.next/releases/tag/1.2.2 3. in tiapp.xml include4. create a
src
folder and put Serenity.framework in 5. create aappc.js
file, and use this as content6. in
Resources/app.js
, use thisSome more thoughts here: Why don't we just say that frameworks can be placed in
/src/frameworks
and are detected automatically? So we don't need to map them manually in the appc.js and improve the workflow when trying out new frameworks. It has always been a mess when using framework in native modules, so now we have the chance to work on that process. Maybe it's another effort for 6.0.0, but we should consider it. The same with swift and obj-c files (stored in/src/swift
and/src/objc
). [~cng], [~bgrantges@appcelerator.com] thoughts?PR merged. The suggestions to improve the c-spec should be in a separate ticket :)
Steps used to test
1. *appc new --classic* 2. install the packaged hyperloop module here: https://github.com/appcelerator/hyperloop.next/releases/tag/1.2.3 3. in tiapp.xml include4. create a
src
folder and put TesseractOCR.framework in 5. addLenore3.png
to Resources/iPhone 6. add tessdata folder to Resources/iPhone 7. create aappc.js
file, and use this as content6. in
Resources/app.js
, use this