test case update
The test case was slightly unclear as to what would cause this. If you follow the instructions below you will not cause the error on the first attempt. You need to do the following.
Create a new alloy app
Put the following in alloy.js
Alloy.isTablet = false;
Alloy.isHandheld = true;
Run the app for ios once. It should start successfully.
Now delete the Resources folder
Attempt to run the app again (or just compile for alloy, may make it easier to read the log). You should see the alloy log state that it is using the cached app.js, which has since been deleted. This should cause an error.
original
Hi,
I sometimes have the problem that my app.js is not generated. I'm using Alloy 1.3.0 and SDK 3.2.0. To reproduce this issue follow the following steps:
* Delete the complete Resource directory.
* Make sure you have something in alloy.js. For instance
Alloy.isTablet = false;
Alloy.isHandheld = true;
* Run for instance the following command:
titanium build -p ios --sdk 3.2.0.v20131108155642
Same issue with just running alloy compile.... Deleting the Resource directory is more or less just to demonstrate the issue. I do not exactly remember how I ran into this issue. I usually never delete the Resource directory but I could reproduce it this way. In this case the buildLog / hash of the app.js still exists but app.js does not exist under the Resource directory and won't be created.
Result
You will notice an empty Resources/app.js and no Resource/iphone/app.js. After opening Titanium Studio, making a whitespace change to alloy.js and saving the file, the app.js will be generated correct on the next titanium build run. But only if I make a change to the file. Re-running the above titanium build command does not work.
I guess it is related to ALOY-866 as I can see in the build process it things the app.js is there and it wants to use the cached one.
Q&A Ticket:
http://developer.appcelerator.com/question/159428/alloy-130---could-not-find-appjs
Environment
- OSX 10.8.5
- iOS Simulator 7.0
- Xcode 5.0.1
- Latest Titanium SDK: 3.2.0.v20131108155642
- Latest Titanium CLI Master 3.2.0
- Latest Alloy Master 1.3.0
PR: https://github.com/appcelerator/alloy/pull/277 Functional test should include simply following the updated test case in the description of this ticket.
Verified as fixed. TiSDK 3.2.0.v20131127194046 CLI 3.2.0-beta Alloy 1.3.0-beta Closing
Reopening for updating 'tester' field and labels. Test case added. Re-verified as fixed. TiSDK 3.3.1.v20140725130913 Alloy 1.5.0-dev Appcelerator Studio 3.3.1.201408011410 CLI 3.3.0
If this is "Re-verified as fixed" can it be closed again?
@Tim - yes. Closing.