{"id":20418932,"url":"https://github.com/safe-stack/safe-nightwatch","last_synced_at":"2025-08-21T20:33:18.969Z","repository":{"id":10035068,"uuid":"64166894","full_name":"SAFE-Stack/SAFE-Nightwatch","owner":"SAFE-Stack","description":"Demo of SAFE-Stack applied to React Native for cross platform native mobile apps","archived":false,"fork":false,"pushed_at":"2023-01-04T21:45:20.000Z","size":3926,"stargazers_count":157,"open_issues_count":33,"forks_count":29,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-13T21:57:53.158Z","etag":null,"topics":["fable","fsharp","react-native"],"latest_commit_sha":null,"homepage":"","language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAFE-Stack.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}},"created_at":"2016-07-25T20:47:31.000Z","updated_at":"2023-11-09T06:23:56.000Z","dependencies_parsed_at":"2022-08-26T02:11:00.402Z","dependency_job_id":null,"html_url":"https://github.com/SAFE-Stack/SAFE-Nightwatch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAFE-Stack%2FSAFE-Nightwatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAFE-Stack%2FSAFE-Nightwatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAFE-Stack%2FSAFE-Nightwatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAFE-Stack%2FSAFE-Nightwatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAFE-Stack","download_url":"https://codeload.github.com/SAFE-Stack/SAFE-Nightwatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230532451,"owners_count":18240792,"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":["fable","fsharp","react-native"],"created_at":"2024-11-15T06:35:22.209Z","updated_at":"2024-12-20T04:08:10.994Z","avatar_url":"https://github.com/SAFE-Stack.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Native + SAFE demo\n\nThis is a demo application for React Native development in F# using Fable and the SAFE stack.\nSAFE is a technology stack that brings together several technologies into a single, coherent stack for typesafe, flexible end-to-end web-enabled applications that are written entirely in F#.\n\n![SAFE-Stack](images/safe_logo.png \"SAFE-Stack\")\n\nIf you want to try it out then please do the following:\n\n## Requirements\n\n- [Mono](http://www.mono-project.com/) on MacOS/Linux\n- [.NET Framework 4.6.2](https://support.microsoft.com/en-us/help/3151800/the--net-framework-4-6-2-offline-installer-for-windows) on Windows\n- [node.js](https://nodejs.org/) - JavaScript runtime\n- [yarn](https://yarnpkg.com/) - Package manager for npm modules\n\n\u003e On OS X/macOS, make sure you have OpenSSL installed and symlinked correctly, as described here: [https://www.microsoft.com/net/core#macos](https://www.microsoft.com/net/core#macos).\n\n[dotnet SDK 3.0.100](https://www.microsoft.com/net/core) is required but it will be downloaded automatically by the build script if not installed (see below).\nOther tools like [Paket](https://fsprojects.github.io/Paket/) or [FAKE](https://fake.build/) will also be installed by the build script.\n\n### Make sure React Native works\n\n* Install the Ionide [VS Code extension for F#](https://github.com/ionide/ionide-vscode-fsharp)\n* Go to https://facebook.github.io/react-native/ and do all steps of the [getting started tutorial](https://facebook.github.io/react-native/docs/getting-started.html#content)\n* At this point you should have the default Javascript React Native \"Hello World\" running\n\n### Running F# code on React Native\n\n* Pull latest master\n* Open Android Simulator or connect a device in debug mode via USB\n* Run `build.cmd debug` from command prompt\n* Go to android device simulator and you should see something like\n\n![Device Running](http://www.navision-blog.de/images/nightwatchapp.gif)\n\n* Go to the F# source in VS Code make a change and save the file\n* Fable watch should pick up this change automatically and compile it\n* Go to android device simulator - change should be visible\n\nThis could look like:\n\n![Hot loading](http://www.navision-blog.de/images/hotloading.gif)\n\n\n## Error handling\n\n### Unauthorized device\n\nIf you run `build.cmd debug` and it compiles everything, but nothing happens... go to the packager\noutput and search for hints.\nOne pitfall might be \"Skipping device, Device is UNAUTHORIZED\". With\n```\nadb devices\n```\nyou can see the list of devices, probably one of them is marked as UNAUTHORIZED. First,\ntry\n```\nadb kill-server\n```\nand try it again. If it doesn't help, you can push the public key onto the device again:\n```\ncd ~/.android \u0026\u0026 adb push adbkey.pub /data/misc/adb/adb_keys\n```\nAfter rebooting the device, access should be granted again.\n\n### Licenses not accepted\n\nIf the above does not work, and still nothing happens after it compiles everything, the licenses may need to be accepted on your computer. To accept the licenses run the following commands for your platform\n\nOn a Mac run the following\n```\n$ANDROID_HOME/tools/bin/sdkmanager --update\n```\nOn Windows run the following\n```\n“%ANDROID_HOME%\\tools\\bin\\sdkmanager” --update\n```\n\nRe-run the build script and everything should work.\n\n### The app is not updating on saving code changes\n\nIf the app does not update whenever you save an F# code change even after Fable compilation succeeds, you may need to enable hot reloading from the in-app developer menu. It is accessed by opening the app and shacking the device or causing the emulator to simulate a shake or by using the command:\n```\nadb shell input keyevent 82\n```\n\nClick on \"Enable Hot Reloading\". Now when you save a code change and Fable compiles it, you should see the result in the app on your device or emulator automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-stack%2Fsafe-nightwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafe-stack%2Fsafe-nightwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-stack%2Fsafe-nightwatch/lists"}