Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/martinmoec/fable-react-native-template
A template project for starting a new Fable React Native app
https://github.com/martinmoec/fable-react-native-template
dotnet-core fable fable-elmish fsharp react-native
Last synced: about 1 month ago
JSON representation
A template project for starting a new Fable React Native app
- Host: GitHub
- URL: https://github.com/martinmoec/fable-react-native-template
- Owner: martinmoec
- Created: 2019-01-04T09:25:08.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-26T11:25:13.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T04:05:41.887Z (5 months ago)
- Topics: dotnet-core, fable, fable-elmish, fsharp, react-native
- Language: Objective-C
- Size: 986 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-fsharp-project-templates - martinmoec/fable-react-native-template - Fable React Native App using F#, .NET Core and Yarn (List / React Native)
README
# Template for starting out a new Fable React Native App using F#, .NET Core and Yarn
## Requirements
* Yarn or NPM
* ```brew install yarn```
* ```brew install npm```
* (comes with Node)
* Node.js
* ```brew install node```
* Watchman
* ```brew install watchman```
* JDK
* ```brew tap AdoptOpenJDK/openjdk```
* ```brew cask install adoptopenjdk8```
* React Native CLI
* ```npm install -g react-native-cli```* [.NET Core SDK](https://dotnet.microsoft.com/download)
* XCode ( for iOS )
- install command line tools: ```xcode-select --install```brew install node
brew install watchman
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8## Setup
After cloning the respository cd into project root
* ```yarn```
* ```paket install```
* ```cd src```
* ```dotnet restore```## Building JavaScript
* Building for debug: ```yarn debug```
* Building for release : ```yarn build```
* Running with auto-compiling: ```yarn watch```
- Enables auto-updating when the F# project in ```src/``` is altered.Output is built to ```out/```
### Running the React Native application
* iOS simulator: ```react-native run-ios```
* Android: ```react-native run-android```Remember to build JavaScript files. If the package manager does not automatically start run ```react-native start``` before ```react-native run-(ios/android)```.
## Error handling
### iOS
* ```No bundle URL present``` :
- Try cleaning build-output, kill metro bundler and rebuild.
- ```rm -rf ios/build/; kill $(lsof -t -i:8081); react-native run-ios```* ```No bundle URL present``` & the packager did not start automatically:
- Kill running instances
- Start packager manually ```react-native start```
- Re-run project after packager successfully starts ```react-native run-ios```* ```Entry, ":CFBundleIdentifier", Does Not Exist``` and similar
- open ```ios/ReactNativeApp.xcodeproj``` in XCode
- File -> Project Settings... -> Advanced
- Set build location to Custom
- Replace ```Build/..``` with ```build/Build/...``` for the Products and Intermediates entries
- E.g
- Products: ```build/Build/Products```
- Intermediates: ```build/Build/Intermediates.noindex```### Android
* Licenses not accepted
- run ```/sdk/tools/bin/sdkmanager --licenses``` and accept all* Device unable to load script from asset
1. ```mkdir android/app/src/main/assets```
2. ```react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res```
3. ```react-native run-android```