[TIMOB-24661] iOS: Hyperloop: keys[num].indexOf is not a function with a module
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-05-08T15:46:53.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Backlog |
Components | iOS |
Labels | hyperloop, ios, module |
Reporter | Brian García |
Assignee | Eric Merriman |
Created | 2017-05-05T05:37:17.000+0000 |
Updated | 2017-06-02T19:08:33.000+0000 |
Description
When trying to compile an Hyperloop enabled project, if there is my charts module present it crash with this error.
See the attached Alloy project. It includes the build folder.
Attachments
File | Date | Size |
chartPoC.zip | 2017-05-05T05:36:59.000+0000 | 7782308 |
Hey Brian, thanks! But wait a second, didn't we have this in TIMOB-24547 as well (where you commented). I commented as well that it's resolved in 2.1.0 (as part of TIMOB-20274), so you are still getting it with 2.1.0?
Hi Hans, yes it still happens in 2.1.0 that's why I opened a new ticket I think it could be a different issue may be regarding the dynamic lib hook.
Ok, so * Is the issue is appearing when you use a native module together with Hyperloop? * Do you use any Hyperloop functionality (because I cannot see any)? * Will it work if you add one like a UILabel reference? * Does it work with other modules that do not have the dynamic-lib hook? * Can you attach the whole error-trace-log? * (Unrelated, personal) Why not just use the framework with CocoaPods in Hyperloop? Thanks :-)
Answering in order: * Yes, for me only happens with this module. * In other project yes, I made this demo project to see if there is any collision with some Hyperloop requires but it crashes just adding it to tiapp.xml * No, for the above reason. * Yes, I have other modules in the original projects and compiles and run perfectly. * the build log is inside the zip (if you need another one that there is in a different location just tell me the path I will upload it to a gist) I stated that there are some lines that doesn't show up in the build log:
* Because the mpcharts is a swift pod and pod frameworks are not supported yet. Also because I want to test if there is a performance difference between Hyperloop and native module (in Android I think so, but I need to do more testing)
[~hansknoechel], the crash is caused by the ti.dynamiclib hook. It extends the Array prototype by just assigned the
last
property. This causes all arrays to have the iterable propertylast
which causes the crash. To avoid that, the prototype extension should be defined like this:Thanks Jan! Updated the library and released [1.0.1 on Github](https://github.com/appcelerator-modules/hook-embedded-frameworks/releases). Resolving issue ...
Confirmed as solved! Thank you!
Closing ticket as fixed.