whitebear
whitebear

Reputation: 12423

app.js is not created by Alloy. [Could not find the file app.js] error

My problem is

  1. Run application on appcelerator studio.
  2. Open /build/iphone folder with x code
  3. Run in my device.

it shows error.

Could not find the file app.js

If I choose iphone simulator at step 3.It works fine.

This error happens only in real device.

My environments are

What I have done is...

First, I compared two projects

ProjectA/Resources/app.js 
ProjectB/Resources/app.js

Both are created however, projectB's app.js is 0byte.

Second, I compared the both /build/iphone/ folder

There is Asset folder in Xcode project, it has app_js file in projectA not in projectB.

These two results must be a hint though, I have no clue yet.

Does anyone help me?


Thanks to @Brenton.

I tried

ti clean && ti build -p ios --log-level trace

then put the log file here.

I found sentences like though, can't find likely error.

[INFO]  [app.js] Titanium entry point processing...
[TRACE] - Processing "builtins" module...
[TRACE] - Processing "optimizer" module...
[TRACE] - Processing "compress" module...
[INFO]    created:    "Resources/iphone/app.js"
[DEBUG]   map:        "build/map/Resources/iphone/app.js.map"
[INFO]    

Upvotes: 1

Views: 1443

Answers (2)

Fokke Zandbergen
Fokke Zandbergen

Reputation: 3866

It is currently not possible to build from Xcode: https://jira.appcelerator.org/browse/TIMOB-19818

There's a workaround in the above ticket.

In most cases you should not need to build from Xcode and just deploy to devices straight from the (AppC) Ti CLI.

Upvotes: 2

Brenton House
Brenton House

Reputation: 144

More than likely, it is a result of a syntax error in the code from projectB. Can you try building projectB from the terminal using:

ti clean && ti build -p ios --log-level trace

You should be able to see if there are any javascript syntax errors in the output log.

If this doesn't work, reply here and I can probably help you try a couple of other things.

Upvotes: 1

Related Questions