GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-04T16:49:23.000+0000 |
Affected Version/s | Release 2.0.2, Release 2.0.1 |
Fix Version/s | Release 2.1.0, Sprint 2012-12 Core, Sprint 2012-18 Core |
Components | Tooling |
Labels | core, qe-and040912 |
Reporter | Dustin Hyde |
Assignee | Bill Dawson |
Created | 2012-05-09T17:16:51.000+0000 |
Updated | 2017-03-06T22:34:58.000+0000 |
When creating a new module from either the command line or studio, the specified name is not respected. It is replaced by "titanium-". However, the project is initially created with a correct project directory name.
Steps to Reproduce:
1. Create an android module (remove it from the project explorer if created in studio).
2. Import the module into studio (note: the module may have to be removed from the workspace directory first).
Expected Result:
The project name should be the one specified during creation (and the module directory name).
Actual Result:
The project name is "titanium-".
This also creates problems when a module is created in studio and saved to the workspace, then reimported from the workspace. The import will fail due to the name conflict, screenshot attached.
for latest status see also linked issue (TISTUD-1648)
for latest status see also linked issue (TISTUD-1648)
Pull request ready: https://github.com/appcelerator/titanium_mobile/pull/2355
Reopening, this is not completely fixed. If a new android module is created with uppercase characters, only lowercase characters exist in the module directory and project name. Titanium Studio: 2.1.2.201208201549 Titanium SDK: 2.1.2.v20120821160113 OS: Mountain Lion 10.8.1 Xcode: 4.4 Android SDK: r20.0.3 Android NDK: r8b Browser: Safari 6.0 This is both a parity and usability issue with related consequences.
Just ran across this today in fact. The reason is because module.py (which is called from titanium.py) says:
So, it would seem this was done by design.
TIMOB-8056 forced lower-case for android. Any fix for this item will need to test the fail case in TIMOB-8056.
Testing Notes
*IMPORTANT NOTE*: Make sure you use the titanium.py in the PR branch! (Some people have titanium.py aliased in their shell (e.g., BASH) -- just make sure you're really using mine when you test.) The command-line invocations in these instructions specify just "titanium.py". If that's not in your PATH (or not aliased somehow) you'll need to adjust the command-line appropriately so that you run the titanium.py in the PR branch.Module Creation and Build on Command Line
iOS
* Enter the following in a terminal window:* Make sure no errors occur when you enter that. * Make sure the created module directory is named IphoneModule. * Go into the module directory and run
python build.py
. * There should be no errors and the file ti.test-iphone-0.1.zip should appear in the directory.Android
*NOTE*: Must test on OSX, Linux, Windows!! * Enter the following in a terminal window / command-prompt:* Make sure no errors occur when you enter that. * Make sure the created module directory is named AndroidModule. * Go into the module directory and run
ant
. * It should end with "BUILD SUCCESSFUL" and in the dist/ directory you should see androidmodule.jar and ti.test-android-0.1.zip.MobileWeb
*NOTE*: Must test on OSX, Linux, Windows!! * Enter the following in a terminal window / command-prompt:* Make sure no errors occur when you enter that. * Make sure the created module directory is named MobileWebModule. * Go into the module directory and run
python build.py
. * You should get no errors, and the file ti.test-mobileweb-0.1.zip should be created.Module Project Import into Titanium Studio
iOS
* In Titanium Studio import the IphoneModule project you created above and accept the default project name it suggests to you. * The project name should be "IphoneModule". * Use Studio's Package menu (in the App Explorer view) to re-package the module. * When it finishes, you should end up with a ti.test-iphone-0.1.zip in whichever directory you told Studio to put it.Android
*NOTE*: Must test on OSX, Linux, Windows!! * In Titanium Studio import the AndroidModule project you created above and accept the default project name it suggests to you. * The project name should be "AndroidModule". * Use Studio's Package menu (in the App Explorer view) to re-package the module. * When it finishes, you should end up with a ti.test-android-0.1.zip in whichever directory you told Studio to put it.MobileWeb
*NOTE*: Must test on OSX, Linux, Windows!! * In Titanium Studio import the MobileWebModule project you created above and accept the default project name it suggests to you. * The project name should be "MobileWebModule". * Use Studio's Package menu (in the App Explorer view) to re-package the module. * When it finishes, you should end up with a ti.test-mobileweb-0.1.zip in whichever directory you told Studio to put it.Creation and Build of Module Project in Titanium Studio
iOS
* In Studio, create a Titanium Mobile Module Project. * Enter "NewIphoneModule" as the project name and "ti.test2" as the id. * Be sure "iOS" is selected as the deployment target. * Be sure "Titanium SDK Version" points to the build and release of my branch (i.e., be sure you're testing my changes.) * When you're finished, the project name as it appears in the App Explorer (or Project Explorer) should indeed be "NewIphoneModule". * Use Studio's Package menu (in the App Explorer view) to package the module. * When it finishes, you should end up with a ti.test2-iphone-0.1.zip in whichever directory you told Studio to put it.Android
*NOTE*: Must test on OSX, Linux, Windows!! * In Studio, create a Titanium Mobile Module Project. * Enter "NewAndroidModule" as the project name and "ti.test2" as the id. * Be sure "Android" is selected as the deployment target. * Be sure "Titanium SDK Version" points to the build and release of my branch (i.e., be sure you're testing my changes.) * When you're finished, the project name as it appears in the App Explorer (or Project Explorer) should indeed be "NewAndroidModule". * Use Studio's Package menu (in the App Explorer view) to package the module. * When it finishes, you should end up with a ti.test2-android-0.1.zip in whichever directory you told Studio to put it.MobileWeb
*NOTE*: Must test on OSX, Linux, Windows!! * In Studio, create a Titanium Mobile Module Project. * Enter "NewMobileWebModule" as the project name and "ti.test2" as the id. * Be sure "Mobile Web" is selected as the deployment target. * Be sure "Titanium SDK Version" points to the build and release of my branch (i.e., be sure you're testing my changes.) * When you're finished, the project name as it appears in the App Explorer (or Project Explorer) should indeed be "NewMobileWebModule". * Use Studio's Package menu (in the App Explorer view) to package the module. * When it finishes, you should end up with a ti.test2-mobileweb-0.1.zip in whichever directory you told Studio to put it.Testing All the Built Modules
*NOTE* Must test on OSX, Linux and Windows!! * Install all 6 of the module zips you built above as you normally would any module zip. (I.e., on OS X, copy up to /Library/Application Support/Titanium and unzip). When testing on Linux and Windows it will be only 4 zips, of course. * Create a new Titanium Mobile application project in Titanium Studio. Be sure to target the SDK built from the pull request. * Change the tiapp.xml to include the modules. Use either the GUI interface in Studio for it or edit tiapp.xml manually like this:(Remove the iphone lines on Windows and Linux, of course.) * Replace app.js with this:
* Run the app on iOS, Android and MobileWeb (when testing on Windows and Linux, of course you don't need to run on iOS). You should get output that looks like:
Pull request https://github.com/appcelerator/titanium_mobile/pull/2854
Closing ticket due to time passed.