Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23416] Hyperloop: iOS: App crashes on startup when <use-jscore-framework> element non-existent

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-05-25T07:07:19.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsHyperloop
Labelsqe-5.4.0
ReporterChee Kiat Ng
AssigneeChee Kiat Ng
Created2016-05-20T06:02:06.000+0000
Updated2016-07-01T21:28:53.000+0000

Description

Steps to reproduce

1. *appc new --classic* 2. include hyperloop module and plugin in local project 3. update tiapp.xml with:
  <modules>
    <module version>hyperloop</module>
  </modules>
  <plugins>
    <plugin>hyperloop</plugin>
  </plugins>  
4. *appc run -p ios*

Expected Result

app builds and appears

Actual Result

app crashes on launch Note: If you include the element in tiapp.xml, be it true or false, it will launch successfully.

Comments

  1. Chee Kiat Ng 2016-05-20

    Additional note, if the element is not in tiapp.xml, the log does show this:
       [INFO]  Add the following to your tiapp.xml <ios> section to enable or disable this:
       [INFO]
       [INFO]          <use-jscore-framework>true</use-jscore-framework>
       [INFO]
       [INFO]  Using Apple JavaScriptCore by default when not specified.
       
    So somewhere it's not setting it as default.
  2. Chee Kiat Ng 2016-05-20

    The problem lies in, with or without hyperloop module, any titanium app created is by default, NOT using Apple Javascriptcore. Reason being, currently our debugger and profiler is not compatible with Apple Javascriptcore. Whereas in hyperloop, it's saying that if it doesn't see <use-jscore-framework> in tiapp.xml, it will build ASSUMING JSCORE is setup in the titanium app. Therefore it crashes. The solution (for now), is for hyperloop to assume the usage of TICORE by default instead of JSCORE if the element is missing, so that it's compatible with the app.
  3. Chee Kiat Ng 2016-05-20

    PR here: https://github.com/appcelerator/hyperloop.next/pull/31 Repeat the above steps using these 3 scenarios: 1. no : you should see in the log "using titanium javascriptcore as default" and builds normally 2. set to true : builds normally 3. set to false : builds normally
  4. Hans Knöchel 2016-05-20

    Left some CR comments, thanks!
  5. Josh Longton 2016-07-01

    Verified as fixed.
 Tested on:
 iPhone 6s Plus (9.3.1) iOS Simulator (9.3) 
Mac OSX El Capitan 10.11.5 Studio: 4.7.0.201606220541 
Ti SDK: 5.4.0.v20160629063537 
Appc NPM: 4.2.7-2 Appc CLI: 5.4.0-23 
Xcode 7.3.1 Node v4.4.4 *
Closing Ticket.*

JSON Source