[AC-2906] iOS: Build for device does not use platform specific folder
GitHub Issue | n/a |
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-19T15:42:53.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Appcelerator Modules, Titanium SDK & CLI |
Labels | device, ios, simulator |
Reporter | Eli Mor |
Assignee | Varun Joshi |
Created | 2012-05-21T08:37:19.000+0000 |
Updated | 2016-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
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
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
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
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.
Hi Dan, Did you try this with the latest CI Build? The issue is resolved in that build. Thanks, Varun
Issue fixed in latest CI.