GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-23T16:39:27.000+0000 |
Affected Version/s | Release 1.7.2, Release 1.8.0 |
Fix Version/s | Sprint 2012-01, Release 2.0.0, Release 1.8.1 |
Components | iOS |
Labels | module_module, qe-testadded |
Reporter | Martijn Bogaard |
Assignee | Stephen Tramer |
Created | 2011-10-05T07:43:15.000+0000 |
Updated | 2012-02-03T14:59:46.000+0000 |
When a release build (run on iOS device) is done, a set of defines are generated to strip the binairy down to the API parts that are used in the App. When certain API's are only used in a JS module and not in the App, the application will crash since they are missing. Define (pseudo) calls to the API's in the app, and the module works.
In the simulator, all API's are included so everything works as expected.
Martijn, Are you talking about a native JS module? or a commonJS module? Best regards, Matt
Hi Matt, I uploaded a Testcase + a broken module for you. To run it, you need to install version 1.0 of the pull2refresh module. - Run the project in the simulator. It works normally. - Run it on a iOS device. It crash (2 crashes actually, the show of the errorview crash also, but thats probably since the initialization isnt fully done yet) since Ti.UI.iPhone is missing. The only differences between the 2 cases is defines.h. When you build for the device, he checks wich parts of the API must be included. IMO he should also load the JS of the module and include the used parts. Since the JS is embedded as a hex encoded string in the static archive, it shouldn't be hard to extract it. Or add a new file which contains the API parts the module is using. For now i have a workaround to manually define the required parts in the module xcconfig, but this issue is not documentated and you can easy miss a part of the API you need or the define could be changed in a future release. Martijn
TESTING
----Remove any existing SDK install for the version you're testing (1.9.0) - this contains the stale
json.py
file that was deleted as part of the commit.Install the SDK you are testing against
Import the timob-5815-test project into TiStudio
Create the ti.5815 module
#* Create a new module (either via commandline or TiStudio) with the identifierti.5815
#* Place theti.5815.js
file in<module_root>/assets
#* Build the module viabuild.py
#* Copy the module zipfile to the project directory fortimob-5815-test
and installBuild for simulator
#* Ensure that the<project_root>/build/iphone/Classes/defines.h
file is the default (all symbols) #* Ensure that the app runs on simulator. Output should be:Build for device
#* Ensure that the<project_root>/build/iphone/Classes/defines.h
file contains only the necessary symbol info (note that there may be more than this in the file, but these are required to validate the bug):#* Ensure that the application runs on device with the proper output
Export the project via the
bq.transport.py
script:<mobilesdk_install>/iphone/transport.py <project_root>
#* Open the xcode project for the export,<project_root>/build/iphone/timob-5815-test.xcodeproj
#* Confirm that the xcode project builds and runs on both simulator and device with the expected output #* Confirm that after a build (either for simulator or device), the<project_root>/build/iphone/Classes/defines.h
includes the appropriate symbol info (as above)NOTE: When resolving this ticket, TIMOB-6458 should be resolved as a DUPLICATE and link back to this ticket in the comment posted while resolving.
NOTE: When resolving this ticket, TIMOB-7001 should be resolved as FIXED provided that step 4. above passes.
Tested with 1.9.0.v20120112153134 on simulator and ipod 4.3.3 device