[TIMOB-23667] iOS: Hyperloop - Calling [object class] fails on device
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-10-11T04:55:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.0.0 |
Components | Hyperloop, iOS, Tooling |
Labels | n/a |
Reporter | Chee Kiat Ng |
Assignee | Hans Knöchel |
Created | 2016-07-21T03:22:58.000+0000 |
Updated | 2016-10-11T04:56:21.000+0000 |
Description
Sample that call the
NSObject
class method class
(e.g. UICollectionView
) are not working on iOS device but do work well on simulator.
Steps to reproduce
1. Clone hyperloop-examples 2. Install hyperloop 1.2.3 3. *appc ti build -p ios -T device* 4. on device, choose CollectionViewExpected Result
See lots of boxes of different colorsActual Result
This error appears:
[ERROR] Script Error {
[ERROR] column = 2291;
[ERROR] line = 1;
[ERROR] message = "o[\"class\"] is not a function. (In 'o[\"class\"]()', 'o[\"class\"]' is undefined)";
[ERROR] sourceURL = "file:///var/containers/Bundle/Application/A2B1F11F-E7F7-4AD1-9CAA-996F3A1E2718/Hyperloop_Sample.app/alloy/controllers/collectionview.js";
[ERROR] }
Attachments
File | Date | Size |
---|---|---|
Hyperloop Error.txt | 2016-10-05T15:10:09.000+0000 | 5855 |
I am able to reproduce this issue too. *ENV:*
The class-method
[object class]
is mapped to the string-representation of the class instead of usingobject.class()
. While [~jvennemann] is still investigating why it works in the Simulator, the above way is the proper solution for now. Example: Native:Hyperloop:
I updated the hyperloop-examples repo to reflect this change and we might also want to update the docs for this behavior.
Marking as fixed, since the hyperloop-examples have been updated using the correct syntax. @QE: Please verify the fix by testing the collection-view example on device.
Get the following error when trying to run the hyperloop example app on device (iOS10 / 9 ) _Please see the attached Error File._ Tested On: iPhone 6 Plus 10.0.2 Device & Simulator iPhone 5S 9.3.5 Device Mac OSX El Capitan 10.11.6 Hyperloop Module (1.2.7, 2.0.0) Ti SDK: 6.0.0.v20161004202820 Appc Studio: 4.8.0.201609292239 Appc NPM: 4.2.8-7 App CLI: 6.0.0-56 Xcode 8.0 Node v4.4.7 *Reopening Ticket.*
[~htbryant] The error relates to TIMOB-23971 as I already commented there. Please resolve / close this one again.