{ "id": "116765", "key": "TIMOB-14467", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "15564", "description": "2013 Sprint 15 API", "name": "2013 Sprint 15 API", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15567", "description": "2013 Sprint 15", "name": "2013 Sprint 15", "archived": true, "released": true, "releaseDate": "2013-07-29" }, { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-25T22:51:51.000+0000", "created": "2013-07-02T18:30:16.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "blackberry", "qe-3.1.2", "qe-testadded" ], "versions": [], "issuelinks": [ { "id": "30020", "type": { "id": "10020", "name": "Depends", "inward": "is dependent of", "outward": "depends on" }, "inwardIssue": { "id": "89984", "key": "TIMOB-8721", "fields": { "summary": "BlackBerry: Implement module API", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2014-06-19T12:43:51.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10230", "name": "BlackBerry", "description": "BlackBerry Platform" } ], "description": "Test:\r\n\r\n1) Import native module into Momentics.\r\n\r\n2) Edit common.mk to have your static module in the search path and named.\r\n\r\n3) Edit main.cpp to register the module. \r\n\r\n3) Create an app.js file that requires in the module. You should be able to debug the module.", "attachment": [], "flagged": false, "summary": "BlackBerry: Tibbtest project needs to be enhanced to allow the running and debugging of native modules", "creator": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "263122", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "git:\r\nhttps://github.com/appcelerator/titanium_mobile_blackberry/pull/133", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-25T06:32:39.000+0000", "updated": "2013-07-25T06:32:39.000+0000" }, { "id": "266152", "author": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "\nTest by following the instruction in the GitHub repo. \n\n\n- Create Native Module:\n\n\tBy running the module create command will you generate a stub BlackBerry module including documentation that you can use as a starting point to building your own Titanium BlackBerry extension. The project created is to be used by the QNX Momentics IDE (QDE). The IDE should have been installed when you installed the BlackBerry NDK. \n\n\t\ttitanium create -p blackberry --id -n -t module\n\n- Build and Extend the Module:\n\n\tThe QDE is the tool most often used to develop native BlackBerry 10 applications. Although the module stub generated during create has a Makefile that can be utilized by command-line tools, developers often find the Eclipse based IDE easier to use. To get started with BlackBerry 10 module development import the module project created above into the QDE. You will see a CPP source file with the same name as your this file is the entry point and the startup method is the hook to the BlackBerry SDK. When a module is first \"required\" into a running Titanium application the startup method is called. BlackBerry uses the V8 JavaScript runtime engine, and the generated stub has some simple example of extending the module by \"plugging into\" V8. To embedded V8 developers and Node.JS developers the code will be very familiar. Using the stub as a sample add your own BlackBerry 10 extensions and these will be available to Titanium applications.\n \n\n- Testing and Debugging the Module:\n\n\tNot shipping with the BlackBerry SDK but available from GitHub is an application that the BlackBerry team uses for testing modules and developing the SDK. The app name is tibbtest it is located at https://github.com/appcelerator/titanium_mobile_blackberry/tree/master/test/apps/native/tibbtest like the generated module project tibbtest is a QDE project and should be imported into the QDE. You will also need the BlackBerry SDK located at https://github.com/appcelerator/titanium_mobile_blackberry/tree/master/src/tibb. The tibb project should also be imported into the QDE. The last step is to build and make sure the V8 library is available to the QDE. V8 ships with the Titanium BlackBerry SDK and you can adjust the common.mk in tibb, and tibbtest but it is probably easier to clone the Titanium BlackBerry SDK locally and follow the instructions on how to contribute to the BlackBerry SDK, instruction can be found at https://github.com/appcelerator/titanium_mobile_blackberry#how-to-setup-build-and-test-the-titanium-blackberry-sdk. Once you have your BlackBerry environment setup then:\n\n\t1) In the QDE tibbtest project's main.cpp file uncomment the #include \"ReplaceWithModuleName.h\", and tiRegisterModule(\"ReplaceWithModuleName\", (TiModule*) new ReplaceWithModuleName()); lines and replace the ReplaceWithModuleName strings with you module name.\n\n\t2) Edit the common.mk with the path to your module library and the library name. There are comments in the file to assist you.\n\n\t3) In the tibbtest project edit the app.js JavaScript to \"require\" in your module and then call your exposed properties methods and hook any callbacks. See the native_module_test.js for an example of using the stub module generated in step one. \n\n\t4) Run the tibbtest application to simulator or device to test out your module. You can set breakpoints in your module to make debugging easier.\n", "updateAuthor": { "name": "rmcmahon", "key": "rmcmahon", "displayName": "Russell McMahon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-13T01:00:07.000+0000", "updated": "2013-08-13T01:00:07.000+0000" }, { "id": "266344", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix & it works as expected.Thus closing.\r\n\r\nEnvironment:\r\nAppcel Studio : 3.1.2.201308091728\r\nTi SDK : 3.1.2.v20130812225629\r\nMac OSX : 10.8.4\r\nAlloy : 1.2.0-alpha6\r\nCLI - 3.1.2-alpha\r\nwin 7 \r\nWin 8 \r\nZ10 BB simulator : 10.0.10.822\r\nZ10 device running 10.0.10.88", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-08-13T23:20:25.000+0000", "updated": "2013-08-13T23:20:25.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }