{"id":15141811,"url":"https://github.com/nativescript/mobile-devices-controller-server","last_synced_at":"2026-01-15T22:11:23.339Z","repository":{"id":141978205,"uuid":"105757730","full_name":"NativeScript/mobile-devices-controller-server","owner":"NativeScript","description":null,"archived":false,"fork":false,"pushed_at":"2019-11-21T17:52:52.000Z","size":265,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-02T11:24:19.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NativeScript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-10-04T10:51:18.000Z","updated_at":"2019-11-29T17:30:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5f0ff8c-c984-4a7a-bb31-560b78c83916","html_url":"https://github.com/NativeScript/mobile-devices-controller-server","commit_stats":{"total_commits":116,"total_committers":3,"mean_commits":"38.666666666666664","dds":0.0431034482758621,"last_synced_commit":"6236978819c578570cdc8833d6bb1d0b94b60b93"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fmobile-devices-controller-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fmobile-devices-controller-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fmobile-devices-controller-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fmobile-devices-controller-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NativeScript","download_url":"https://codeload.github.com/NativeScript/mobile-devices-controller-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247093360,"owners_count":20882392,"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":[],"created_at":"2024-09-26T09:02:13.866Z","updated_at":"2026-01-15T22:11:23.304Z","avatar_url":"https://github.com/NativeScript.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Server which comunivates with mobile-devices-manager. Serves to control simulatos, emulators and real devices.\n    Purpose of this server is to manage all devices on а machine.\n    This is very convinience when a multiple builds are triggered.\n\n    Provides api as:\n        /api/v1/devices/\n            - `subscribe?type=simulator\u0026name=iPhone%207%20100\u0026info=Test\u0026apiLevel=11.0\u0026platform=ios`\n            - `unsubscribe?token=93B75F3B-0D2A-4873-8BCB-9F78B104BDB5`\n            - `?query`- returns devices.\n            - `boot?query`- starts devices.\n            - `update?query`\n            - `refresh?query`\n    \n    Basically works with query of type IDevice exposed in mobile-devices-controller \n\n        export interface IDevice {\n            name: string,\n            token: string,\n            type: DeviceType,\n            platform: Platform,\n            status?: Status,\n            startedAt?: number,\n            busySince?: number,\n            pid?: number,\n            apiLevel?: string,\n            info?: string,\n            config?: any,\n        }\n\n## Install\n\nInstall the node packages via:\n\n`$ npm install`\n\n### Run\n    `$ ns-server`\n\n|command                |Purpose|\n|:-------------------------------:|:-------------------:|\n|`--port`|Specify port to run server.|\n|`DEVICE_CONTROLLER_SERVER_PORT`|Specify port to run server as env variable|\n|`--mongodb`|Should use mongodb storage.|\n|`--mongodb --startmongodb`|Will start and use mongodb server.|\n\n\n### Install mogodb\n\n`$ brew update`\n`$ brew install mongodb`\n\n#### Create database default folder\n\n`mkdir -p data/db`\n\n#### Run mongodb\n\n`mogod`\n\n### Installing dependencies for mobile-devices-controller\n`brew uninstall telnet \u0026\u0026 true`\n`brew install telnet \u0026\u0026 true`\n`brew uninstall ios-webkit-debug-proxy \u0026\u0026 true`\n`brew uninstall ideviceinstaller \u0026\u0026 true`\n`brew uninstall libimobiledevice \u0026\u0026 true`\n`brew install --HEAD libimobiledevice`\n`brew link --overwrite libimobiledevice \u0026\u0026 true`\n`brew install --HEAD ideviceinstaller`\n`brew link --overwrite ideviceinstaller \u0026\u0026 true`\n`brew install ios-webkit-debug-proxy`\n`brew uninstall carthage \u0026\u0026 true; brew install carthage `\n`plutil \u003cplistfile\u003e`\n\n### Start server as a service\n\n# To setup nativescript.mobile.devices.controller.server.plist on mac\n```\n$ sudo chmod 777 ./resources/start-mobile-devices-controller-server.sh\n$ cp resources/nativescript.mobile.devices.controller.server.plist ~/Library/LaunchAgents\n$ cd ~/Library/LaunchAgents\n\n# This plist profile is setup for node8. In order to change node, open file and edit it\n$ sudo chown nsbuilduser: nativescript.mobile.devices.controller.server.plist\n$ launchctl load nativescript.mobile.devices.controller.server.plist\n$ launchctl start nativescript.mobile.devices.controller.server.plist\n```\n\n###  Restart service\n$ sudo chown nsbuilduser: nativescript.mobile.devices.controller.server.plist\n$ launchctl unload nativescript.mobile.devices.controller.server.plist\n$ launchctl load nativescript.mobile.devices.controller.server.plist\n$ launchctl start nativescript.mobile.devices.controller.server.plist\n```\n\n### To disable/enable. sudo vim nativescript.mobile.devices.controller.server.plist and edit\n'\u003ckey\u003eDisabled\u003c/key\u003e \u003ctrue/\u003e'\n'\u003ckey\u003eEnable\u003c/key\u003e \u003cfalse/\u003e'\n\n# To setup nativescript.mobile.devices.controller.server.service on linux\n```\n\nhttps://gododblog.wordpress.com/2017/01/26/boot-start-script-by-systemd/\n\n$ sudo cp resources/nativescript.mobile.devices.controller.server.service /usr/lib/systemd/user/\n$ sudo chmod 664 /usr/lib/systemd/user/nativescript.mobile.devices.controller.server.service\n$ sudo chmod 755 $HOME/git/mobile-devices-controller-server\n$ systemctl --user daemon-reload\n$ systemctl --user enable nativescript.mobile.devices.controller.server.service\n$ systemctl --user start nativescript.mobile.devices.controller.server.service\n$ systemctl --user status nativescript.mobile.devices.controller.server.service\n\nRESULT:\n\n● nativescript.mobile.devices.controller.server.service\n   Loaded: loaded (/usr/lib/systemd/user/nativescript.mobile.devices.controller.server.service; enabled; vendor preset: enabled)\n   Active: active (running) since Thu 2018-09-20 15:57:33 EEST; 1s ago\n Main PID: 3288 (sh)\n   CGroup: /user.slice/user-1001.slice/user@1001.service/nativescript.mobile.devices.controller.server.service\n           ├─3288 /bin/sh /home/nsbuilduser/git/ns-setup/infrastructure/start-shares-server-ubuntu.sh \u0026\n           └─3289 node /home/nsbuilduser/.nvm/versions/node/v8.11.1/bin/shares-server --port 8700\n\n```\n\n# test:\n```\n$ curl localhost:8700/api/v1/devices\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fmobile-devices-controller-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript%2Fmobile-devices-controller-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fmobile-devices-controller-server/lists"}