Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14683] CLI: Titanium fails to build when only platform-specific app.js is present

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-19T01:39:48.000+0000
Affected Version/sRelease 3.1.2
Fix Version/s2013 Sprint 21, 2013 Sprint 21 Core, Release 3.2.0
ComponentsCLI
Labelsqe-closed-3.2.0
ReporterTony Lukasavage
AssigneeChris Barber
Created2013-07-29T15:36:12.000+0000
Updated2013-11-21T19:42:16.000+0000

Description

problem

Despite the presence of a platform-specific app.js file, the Titanium CLI will fail to build with the following error if there is no app.js directly in the Resources folder. This behavior seems to affect all supported platforms.
[ERROR] app.js not found

Ensure the "app.js" file exists in your project's "Resources" directory.
To make it a little more clear, even if *Resources/iphone/app.js* exists, the error still occurs on iOS builds if *Resources/app.js* does not, despite the fact that it would be unused.

expected

Apps should not require *Resources/app.js* if they have the appropriate platform-specific app.js for the current build.

reproduce

Create a new Titanium app

Move the app.js file to the *Resources/iphone* directory

Build the app for iOS

You should get the error listed above in the problem section

Comments

  1. Tony Lukasavage 2013-07-29

    Alloy is aiming to compile entirely to platform-specific folders in order to facilitate LiveView multi-platform executions. Alloy can work around this by leaving an empty app.js in the Resources folder, but this is redundant and unnecessary clutter. It would be ideal to have this resolved to clean up the Resources folder, but it is not critical for Alloy's current progress.
  2. Simon R 2013-09-05

    I'm seeing much more serious problems here on 3.1.2.GA on iOS: - Building to the iOS simulator works fine - However when I build to the device (either from CLI or XCode) the blank /app.js rather than iphone/app.js is being used, and therefore the app doesn't run at all
  3. Tony Lukasavage 2013-09-05

    I believe [~simonr]'s concern is the one I brought forth in TIMOB-14884
  4. Chris Barber 2013-10-05

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/4760
  5. Allen Yeung 2013-10-19

    PR: https://github.com/appcelerator/titanium_mobile/pull/4781
  6. Olga Romero 2013-11-21

    Tested with: Titanium Studio, build: 3.2.0.201311200322 CLI 3.2.0-alpha Xcode 5.0.2 Titanium SDK, build: 3.2.0.v20131119142443 iPhone5s iOS 7.0.2 Created a default project>moved app.js into Resources/iphone> built for device No errors.

JSON Source