[TIMOB-20245] Hyperloop: Should not compile platform-specific folders for other platforms
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-06-07T12:11:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.4.0 |
Components | Hyperloop |
Labels | hyperloop, ios, qe-5.4.0 |
Reporter | Rohan Peshwe |
Assignee | Hans Knöchel |
Created | 2016-01-11T09:19:11.000+0000 |
Updated | 2016-08-08T22:21:44.000+0000 |
Description
If you download the example app linked form the body of http://labs.appcelerator.com/project/55f74a9f421c44837717716b/Hyperloop-Module and run it for iOS straight away (
appc new --import --no-services && appc ti build -p ios
the Hyperloop compile will fails with:
[INFO] Alloy compiler completed successfully
[WARN] Hyperloop is currently available in Beta and should not be used for production applications.
[INFO] Starting Hyperloop assembly
[INFO] [Hyperloop] Building CocoaPods dependencies
[WARN] The iOS framework "javax.crypto.KeyGenerator" could not be found. Are you trying to use "JavaScriptCore" or "JBChartView" instead? (android/alloy/controllers/touchid.js)
[WARN] The iOS framework "javax.crypto.Cipher" could not be found. Are you trying to use "JavaScriptCore" or "JBChartView" instead? (android/alloy/controllers/touchid.js)
/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/walk.js:15
if (false === override) fn(n);
^
JSParseError: Hyperloop.defineClass cannot define multiple classes with the same name "ChartDelegate" (/Users/bhushankumar/Downloads/hyperloop-examples (1)/Resources/iphone/subclasses/chartdelegate.js:1:20)
at /Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/lib/generate/custom.js:585:11
at walk (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/walk.js:15:29)
at Object.skip (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/types.js:293:3)
at walk (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/walk.js:17:16)
at Object.exports.VariableDeclaration (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/types.js:191:7)
at walk (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/walk.js:17:16)
at Object.skip (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/types.js:293:3)
at walk (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/walk.js:17:16)
at Object.exports.Program.exports.BlockStatement (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/types.js:25:5)
at walk (/Users/bhushankumar/Downloads/hyperloop-examples (1)/plugins/hyperloop/node_modules/hyperloop-metabase/node_modules/walk-ast/lib/walk.js:17:16)
Cause
Hyperloop should not compile JavaScript files inResources
that are in platform-specific folders for other platforms then the one you build for.
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2016-01-12 at 11.08.56 AM.png | 2016-01-12T05:23:23.000+0000 | 391780 |
Screen Shot 2016-01-17 at 12.25.55 PM.png | 2016-01-17T06:36:22.000+0000 | 417238 |
Hello, I just tested the example project in [here](https://s3-us-west-2.amazonaws.com/appc-labs-server/downloads/hyperloop-examples.zip). It's running fine in iOS 9.0. With SDK 6.0.0.b. See the attachment. During run I got this below info in my log
And yes it did took some time for build, for me almost 5 minutes. Following your log it doesn't show any error in there. So, I guess you need to wait for the project to finish background work. Also you need to follow the instruction in the [guide](https://s3-us-west-2.amazonaws.com/appc-labs-server/downloads/Hyperloop+for+iOS+Programming+Guide.pdf) for iOS. Follow the guide there. Check if anything you are missing. Also. Do a project clean and build. Hope this helps, Thanks.
GUID in tiapp.xml: 11111111-1111-1111-1111- 111111111111
Why did you change the GUID of the project. Use the project GUID "2eddfe3d-eaff-4b23-9ccc-d96bd4d2e058". The project should run if you properly imported the project. Download the example project, Extract it. in studio File/Import/General/Import existing project as new project/Next/ Give the path to the project folder. Run default in studio with sdk 6.0.0.v20160107190008. Thanks.
GUID in tiapp.xml: 11111111-1111-1111-1111-111111111111 Mention in hyperloop_Example documentaion. https://s3-us-west-2.amazonaws.com/appc-labs-server/downloads/Hyperloop+for+iOS+Programming+Guide.pdf Now I installed new version of hyperloop example 2 send by appcelerator Team. https://www.dropbox.com/s/vojno5y6bbbdi70/hyperloop-examples%202.zip?dl=0 Still facing same issue.
[~shossain] I have this same error as well with the latest on the 5_2_X branch and it has also been reported on Stack Overflow by [~developer82]: http://stackoverflow.com/questions/34817022/cant-run-hyperloop-project/34817901 I think the bug lies in the fact that for an iOS build Hyperloop should not parse the
android
specific folder for APIs:Hello [~fokkezb], I just tested the example project again. It's running fine in iOS 9.1. With SDK 5.2.0.v20160114021251. See the second attachment. Hyperloop example project is working fine. As you can see I have both Android and iOS version of the module configured in the tiapp.xml.
Environment
SDK 5.2.0.v20160114021251 CLI 5.1.0 iOS SDK: 9.1 hyperloop version=1.0.1 platform iOS Xcode 7.1[~sdarda] where did you get the samples app from? If you get it form http://labs.appcelerator.com/project/55f74a9f421c44837717716b/Hyperloop-Module (via the link in the text, not the _Download_ button) then it does not compile for me (with the above error) in the same environment as you except I'm using Xcode 7.2 and iOS 9.2. I simply do:
Because I noticed the example ZIP includes the Resources directory I did
appc ti clean
and guess what? It works. This makes sense because the then theResources/android
folder which caused the error is gone. I've updated and moved the ticket to specify the actual bugIssue still present even after cleaning the *Resources* by _appc ti clean _. {noformat} Bhushankumars-MacBook-Pro:hyperloop-examples 2 bhushankumar$ appc ti build -p ios [Error: Module version mismatch. Expected 46, got 47.] Appcelerator Command-Line Interface, version 5.1.0 Copyright (c) 2014-2016, Appcelerator, Inc. All Rights Reserved. [Error: Module version mismatch. Expected 46, got 47.] [INFO] tiapp.xml
[~rpeshwe] Your log is displaying a different error. Could you create a ticket for that? Also, noticed your logs have:
You should be able to fix that with
appc use 5.1.0 --force
[~rpeshwe] Can you please test this with the latest [Hyperloop 1.2.0 beta](http://labs.appcelerator.com/project/55f74a9f421c44837717716b/Hyperloop-Module)? Thanks!
Verified as fixed, Ran the hyperloop example app to iOS in which only the iphone folder was generated. Android folder was generated when the same app was built to an android device. Rebuilding to iOS with the android assets did not cause any crashes. Tested On: iPhone 6S (9.3.3) Device Android Nexus 6P (6.0.0) Device Hyperloop Module (1.2.6) Mac OSX El Capitan 10.11.6 Ti SDK: 5.4.0.v20160804185318 Appc Studio: 4.7.0.201607250649 Appc NPM: 4.2.7 App CLI: 5.4.0-40 Xcode 7.3.1 Node v4.4.7 *Closing ticket.*