Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2906] iOS: Build for device does not use platform specific folder

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2012-07-19T15:42:53.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules, Titanium SDK & CLI
Labelsdevice, ios, simulator
ReporterEli Mor
AssigneeVarun Joshi
Created2012-05-21T08:37:19.000+0000
Updated2016-03-08T07:47:52.000+0000

Description

When building the app for simulator, Titanium uses the correct file from the platform specific folder (iphone). When running on device, platform specific file is not loaded, but instead file used from the resources folder. Way to duplicate: 1. Create new titanium mobile project (single page) 2. Run the app on simulator and device - Works fine. 3. Copy the file from resources/ui/common/FirstView.js to resources/iphone/ui/common/FirstView.js 4. modify label to include additional info, indicating located in iPhone folder. 5. Clean project. 6. Run on simulator. Correct file used. 7. Run on device. File from resources/ui/common/FirstView.js is used, instead of platform specific. 8. If the file from resources/ui/common is removed, build to device uses correct file (platform specific), but then generates Slider related error (second bug).

Attachments

FileDateSize
applicationerror.log2012-05-21T08:37:19.000+00002741
iOS Simulator Screen shot May 21, 2012 9.05.52 AM.png2012-05-21T08:37:19.000+000010936
iOS Simulator Screen shot May 21, 2012 9.13.25 AM.png2012-05-21T08:37:19.000+000011818
iPhone.png2012-05-21T08:37:19.000+000040373
iPhone Error.png2012-05-21T08:37:19.000+000086731

Comments

  1. Varun Joshi 2012-06-04

    Hi, Did you try cleaning the project before installing it onto the device and also removing the previous built app from the device so we are sure that there is no reference to it? Thanks, Varun
  2. Eli Mor 2012-06-04

    I did try that. Several times, including creating a brand new test project(different id and folder) with the same results: when the file was in the iPhone folder, it generated the error as you can see in the screenshot
  3. Joël Bohrer 2012-06-04

    Hi Varun, Before making your comment, did you try it yourself ? I have found the same problem, I have lost a few hours because of it, I can even explain you why it fails (or at least where you can watch), but I think you could at least try and verify, instead of making such a comment. Your community wants to help you, not to make you lose time. When you compile for the device, and watch the build.log, you can see that builder copy all files from specific folders to "build/Resources", but then it compiles from the original folder that's why it doesn't take care about specific files. It's in /Library/Application Support/Titanium/mobilesdk/osx/2.0.2.GA/iphone/compiler.py, around line 559 (and its callee, of course). Thank you for trying it. Joel
  4. Varun Joshi 2012-06-21

  5. Dan Ziemba 2012-06-25

    I am experiencing what is probably the same bug. Attempting to use Ti.UI.iPhone.createNavigationGroup from any file within '/Resources/iphone/ui/' causes the following error: [ERROR] Script Error = 'undefined' is not an object (evaluating 'Ti.UI.iPhone.createNavigationGroup') (unknown file). No error appears if the code is run on the iphone simulator, but then running it on the device causes the error to happen both on the device and subsequent runs on the simulator until the project is cleaned. I've tried with several different types of iDevices with different os versions and both deploying through itunes and with ad-hoc. I've tried cleaning the project, deleting the build folder, creating a new project and coping only essential parts to run just iphone stuff, and finally an empty project with just the essential code for creating a nav group. All attempts have resulted in the same errors, so I think it must be related to this bug.
  6. Varun Joshi 2012-07-02

    Hi Dan, Did you try this with the latest CI Build? The issue is resolved in that build. Thanks, Varun
  7. Varun Joshi 2012-07-19

    Issue fixed in latest CI.

JSON Source