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
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.
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
I believe [~simonr]'s concern is the one I brought forth in TIMOB-14884
Pull request: https://github.com/appcelerator/titanium_mobile/pull/4760
PR: https://github.com/appcelerator/titanium_mobile/pull/4781
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.