Fail case / Test case
* In Terminal, execute the following:
python [path_to_mobile_sdk]/titanium.py create --type=module --platform=iphone --name=testmod --id=ti.testmod --dir=.
* After the test module project is created, create a file within it:
assets/ti.testmod.js
. Inside the file just put a simple
exports
statement such as:
exports.hello = function() {return "hello from test module";};
* In the module project folder, run
python build.py
to build the module.
During the build process, you should notice a warning similar to this (though build is allowed to continue):
Users/bill/tmp/mods/barker/Classes/TiBarkerModuleAssets.m:29:9: warning: implicit declaration of function 'filterDataInRange' is invalid in C99 [-Wimplicit-function-declaration]
return filterDataInRange([NSData dataWithBytesNoCopy:data length:sizeof(data) freeWhenDone:NO], ranges[0]);
^
In my fix branch, you shouldn't see that warning.
PR ready: https://github.com/appcelerator/titanium_mobile/pull/2285
Verified fix with Titanium Studio, build: 2.1.1.201206291424 Titanium SDK: 2.1.0.v20120628121617 Mac OS X Lion 10.7.4
Reopening to update labels.