I'm working on adding a custom module to my Titanium iPhone app. I have an example module that works fine, but I consistently get "Couldn't find module" errors when I load the window that would instantiate mine.
This is the relevant section of my tiapp.xml file:
<modules> <!--module version="0.1">ti.barcode</module--> <module version="0.1">zbarmodule</module> </modules>
The commented-out line is for the example module I got from the kind Jeff Haynie. If I uncomment that and comment out line the zbarmodule line (and force a full rebuild), the project builds fine.
I'm using the 1.3.3 SDK and I built the module using the Appcelerator XCode template. There's not much to it besides one method and some linked binaries, and there are no errors when I build and install it. The contents of its manifest are as follows:
name: ZBarModule moduleid: zbarmodule version: 0.1 description: ZBar Titanium Module author: Brendan Adkins license: Full Copyright copyright: Copyright (c) 2010 DevelopmentNow platform: iphone minsdk: 1.3.2
The module is installed at /Library/Application Support/Titanium/modules/iphone/zbarmodule. Here's the contents of the file where it's being called:
var win = Titanium.UI.currentWindow; Ti.Zbar = require("zbarmodule");
That's really all there is to it, but here's the error I get when I build and compile the project:
>APPLICATION ERROR. Couldn't find module: zbarmodule
I've tried every capitalization I can think of, as well as removing the "module" like it says in the old documentation. I've also tried the old method of just accessing it via Titanium.Zbar or Titanium.Zbarmodule, but I'm going off of this recent thread about how to instantiate modules in the new SDK.
Am I just missing some magic word, or do I need to use a different notation in the manifest?
I should add that Developer does show "[INFO] Detected third-party module: zbarmodule/0.1" when I hit the launch button. (For some reason it always stops once the project is built, however, and I have to go into XCode and use the Build-and-Run button directly.)
Sorry double posted
I had same problem and I figured out.
Ti.Zbar = require("ZBarModule");
I uploaded my camera module for HEAD.
have you solved your problem? We developed a similar module and faced those problems as well. After we figured out how to get all running we decided to write a detailed tutorial on writing modules besed on third party libraries, which we will release nest week. You might want to check out our barcode titanium module TiBar for iPhone Apps which is based on ZBar as well. Thanks.
I'am trying to work with ti.paint and I get the same error.
On my mac the file tree structure is:
in this folder are manifest, module.xcconfig …
During building line 611 says:
Third-party module: ti.paint/1.0 missing library at /Library/Application Support/Titanium/modules/iphone/paint/libti.paint.a
In fact – on my system is not such file and I ask me, who builds this lib.
I downloaded the zip from git and copied in such manner that the project dates are in folder above.
Whats going wrong?
I dont know, which zip file is to copy in wich folder??