{"id":21903885,"url":"https://github.com/hansemannn/titanium-firebase-database","last_synced_at":"2025-04-15T20:44:16.777Z","repository":{"id":45472372,"uuid":"116672333","full_name":"hansemannn/titanium-firebase-database","owner":"hansemannn","description":"Use the Firebase Realtime Database SDK in Axway Titanium 🚀","archived":false,"fork":false,"pushed_at":"2024-04-07T15:49:53.000Z","size":28727,"stargazers_count":7,"open_issues_count":4,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T01:12:02.668Z","etag":null,"topics":["firebase","firebase-database","javascript","native","titanium","titanium-firebase"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hansemannn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["hansemannn","m1ga"]}},"created_at":"2018-01-08T12:11:59.000Z","updated_at":"2022-02-17T14:41:41.000Z","dependencies_parsed_at":"2024-11-28T15:32:49.202Z","dependency_job_id":"7ec373c2-53d3-4619-a3d2-e363d65a799f","html_url":"https://github.com/hansemannn/titanium-firebase-database","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-firebase-database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-firebase-database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-firebase-database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hansemannn%2Ftitanium-firebase-database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hansemannn","download_url":"https://codeload.github.com/hansemannn/titanium-firebase-database/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249151983,"owners_count":21221160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","firebase-database","javascript","native","titanium","titanium-firebase"],"created_at":"2024-11-28T15:29:58.012Z","updated_at":"2025-04-15T20:44:16.745Z","avatar_url":"https://github.com/hansemannn.png","language":"Objective-C","readme":"# Firebase Database - Titanium Module\n\nUse the native Firebase SDK in Axway Titanium. This repository is part of the [Titanium Firebase](https://github.com/hansemannn/titanium-firebase) project.\n\n## Supporting this effort\n\nThe whole Firebase support in Titanium is developed and maintained by the community (`@hansemannn` and `@m1ga`). To keep\nthis project maintained and be able to use the latest Firebase SDK's, please see the \"Sponsor\" button of this repository,\nthank you!\n\n## Requirements\n\n-   [x] The [Firebase Core](https://github.com/hansemannn/titanium-firebase-core) module\n-   [x] Titanium SDK 6.3.0+\n\n## ToDo's\n\n-   [ ] Property format nested lists in this Readme\n\n## API's\n\n### `FirebaseDatabase`\n\n#### Methods\n\n-   `getReference(arguments)` -\u003e `FirebaseDatabaseReference`\n      \\- `identifier` (String), `path` (String) **OR** `url` (String)\n      \\- `observableEvents` ([`DATA_EVENT_TYPE_*`])\n\n#### Properties\n\n-   `firebaseServerTimestamp`\n\n### `FirebaseDatabaseReference`\n\n#### Methods\n\n-   `child(arguments)` -\u003e `FirebaseDatabaseReference`\n    -   `identifier` (String), `path` (String) **OR** `url` (String)\n         \\- `observableEvents` ([`DATA_EVENT_TYPE_*`])\n\n\n-   `childByAutoId(arguments)` -\u003e `FirebaseDatabaseReference`\n\n    -   `identifier` (String), `path` (String) **OR** `url` (String)\n         \\- `observableEvents` ([`DATA_EVENT_TYPE_*`])\n\n-   `root(arguments)` -\u003e `FirebaseDatabaseReference`\n     \\- `observableEvents` ([`DATA_EVENT_TYPE_*`])\n\n-   `parent(arguments)` -\u003e `FirebaseDatabaseReference`\n\n    -   `observableEvents` ([`DATA_EVENT_TYPE_*`])\n\n-   `setValue(value, callback)`\n\n    -   `value` (Any)\n         \\- `callback` (optional, Function)\n\n-   `removeValue(callback)`\n     \\- `callback` (optional, Function)\n\n-   `updateChildValues(childValues, callback)`\n     \\- `childValues` (Dictionary)\n     \\- `callback` (optional, Function)\n\n-   `setPriority(priority, callback)`\n     \\- `priority` (Any)\n     \\- `callback` (optional, Function)\n\n-   `goOnline()`\n\n-   `goOffline()`\n\n-   `keepSynced(synced)`\n     \\- `synced` (Boolean)\n\n#### Properties\n\n-   `key` (String)\n\n-   `url` (String)\n\n#### Constants\n\n-   `DATA_EVENT_TYPE_VALUE`\n-   `DATA_EVENT_TYPE_CHILD_ADDED`\n-   `DATA_EVENT_TYPE_CHILD_CHANGED`\n-   `DATA_EVENT_TYPE_CHILD_MOVED`\n-   `DATA_EVENT_TYPE_CHILD_REMOVED`\n\n## Events\n\nImportant note: Events are added and removed generically. They are only fired if you observe them via\nthe `observableEvents` parameter.\n\n-   `value` (via `DATA_EVENT_TYPE_VALUE`)\n-   `add` (via `DATA_EVENT_TYPE_CHILD_ADDED`)\n-   `change` (via `DATA_EVENT_TYPE_CHILD_CHANGED`)\n-   `move` (via `DATA_EVENT_TYPE_CHILD_MOVED`)\n-   `remove` (via `DATA_EVENT_TYPE_CHILD_REMOVED`)\n\n## Example\n\n```js\nconst win = Ti.UI.createWindow({layout:'vertical', title:'Firebase Database'});\nconst btn1 = Ti.UI.createButton({title:'add random item'});\nconst btn2 = Ti.UI.createButton({title:'delete last item'});\nwin.add([btn1, btn2])\n\n// Require the Firebase Database module\nconst FirebaseDatabase = require('firebase.database');\nvar randomReference = null;\n\nbtn1.addEventListener('click', function(){\n\t// Inserting values in firebase database\n\trandomReference = FirebaseDatabase.getReference().childByAutoId({\n\t\tpath: 'user'\n\t});\n\n\trandomReference.setValue({\n\t\tusername: 'username',\n\t\temail: 'test@example.com',\n\t\tpassword: 'ABCXYZ',\n\t\ttimestamp: FirebaseDatabase.firebaseServerTimestamp\n\t}, function(e) {\n\t\tTi.API.info('Value written, snapshot: ' + JSON.stringify(e, null, 4));\n\t});\n})\n\nbtn2.addEventListener('click', function(){\n\tif (randomReference) {\n\t\t// remove last random item\n\t\trandomReference.removeValue();\n\t\trandomReference = null;\n\t}\n});\n\n// insert fixed item\nvar fdRef = FirebaseDatabase.getReference().child({\n\tpath: 'user',\n\tidentifier: 'user1'\n});\n\nfdRef.setValue({\n\tusername: 'fixed username',\n\temail: 'fixed@example.com',\n\tpassword: 'ABCXYZ_fixed',\n\ttimestamp: FirebaseDatabase.firebaseServerTimestamp\n}, function(e) {\n\tTi.API.info('Value written, snapshot: ' + JSON.stringify(e, null, 4));\n});\n\n// Fetching values from Firebase database\n\nvar userRef = FirebaseDatabase.getReference({\n\tpath: 'user',\n\tobservableEvents: [FirebaseDatabase.DATA_EVENT_TYPE_CHILD_ADDED, FirebaseDatabase.DATA_EVENT_TYPE_VALUE]\n});\n\nuserRef.addEventListener('value', function(e) {\n\tTi.API.info('DATA_EVENT_TYPE_VALUE, snapshot: ' + JSON.stringify(e));\n});\n\nuserRef.addEventListener('add', function(e) {\n\tTi.API.info('DATA_EVENT_TYPE_CHILD_ADDED, snapshot: ' + JSON.stringify(e));\n});\n\nuserRef.addEventListener('remove', function(e) {\n\tTi.API.info('removed value' + JSON.stringify(e));\n});\n\nwin.open();\n```\n\n-   [Example](https://github.com/RavindraChherke/titanium-firebase-database/blob/new_functions/example/app.js)\n\n## Build\n\n```js\ncd ios\nappc run -p ios --build-only\n```\n\n## Legal\n\nThis module is Copyright (c) 2018-present by Hans Knöchel, Inc. All Rights Reserved.\n","funding_links":["https://github.com/sponsors/hansemannn","https://github.com/sponsors/m1ga"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansemannn%2Ftitanium-firebase-database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhansemannn%2Ftitanium-firebase-database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhansemannn%2Ftitanium-firebase-database/lists"}