From cfd30986be0c7d5b29cfd3ccdfee621e6dc9e666 Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Tue, 13 Jun 2023 19:26:34 +0300 Subject: [PATCH] Update Getting-Started-React-Native.md --- docs/en/Getting-Started-React-Native.md | 42 +++++-------------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/docs/en/Getting-Started-React-Native.md b/docs/en/Getting-Started-React-Native.md index df8fb355a5..0c10e79795 100644 --- a/docs/en/Getting-Started-React-Native.md +++ b/docs/en/Getting-Started-React-Native.md @@ -37,17 +37,9 @@ abp new MyCompanyName.MyProjectName -csf -u -m react-native This command will prepare a solution with an **Angular** or an **MVC** (depends on your choice), a **.NET Core**, and a **React Native** project in it. -### 2. Direct Download +### 2. Generating a CLI Command from Get Started Page -You may [download a solution scaffold directly on ABP.io](https://abp.io/get-started) if you are more comfortable with GUI or simply want to try ABP without installing the CLI. - -Please do the following: - -1. Click on the "DIRECT DOWNLOAD" tab. -2. Fill out the short form about your project. -3. Click on the "Create now" button. - -...and a customized download will start in a few seconds. +You can generate a CLI command on the [get started page of the abp.io website](https://abp.io/get-started). Then, use the command on your terminal to create a new [Startup Template](./Startup-Templates/Index.md). ## How to Configure & Run the Backend @@ -55,25 +47,6 @@ Please do the following: > When you are using OpenIddict, You should remove 'clientSecret' on Environment.js (if exists) and disable "HTTPS-only" settings. (Openiddict has default since Version 6.0) -### How to disable Https-only in Openiddict. -You should add this code on {{ if Tiered == "No" }}`MyProjectNameHttpApiHostModule`{{ else if Tiered == "Yes" }}`MyProjectNameAuthServerModule`{{ end }}. - -```csharp - public override void PreConfigureServices(ServiceConfigurationContext context) - { - #if DEBUG - PreConfigure(options => - { - options - .UseAspNetCore() - .DisableTransportSecurityRequirement(); - }); - #endif - //.... - } - -``` - A React Native application running on an Android emulator or a physical phone **can not connect to the backend** on `localhost`. To fix this problem, it is necessary to run the backend application on your **local IP address**. {{ if Tiered == "No"}} @@ -96,20 +69,21 @@ A React Native application running on an Android emulator or a physical phone ** Run the backend application as described in the [getting started document](Getting-Started.md). > You should turn off the "Https Restriction" if you're using OpenIddict as a central identity management solution. Because the IOS Simulator doesn't support self-signed certificates and OpenIddict is set to only work with HTTPS by default. + ## How to disable the Https-only settings of OpenIddict - Go to MyProjectNameHttpApiHostModule.cs under the host project. Add put these codes under the `PreConfigureServices` function. +Open the {{ if Tiered == "No" }}`MyProjectNameHttpApiHostModule`{{ else if Tiered == "Yes" }}`MyProjectNameAuthServerModule`{{ end }} project and copy-paste the below code-block to the `PreConfigureServices` method: ```csharp #if DEBUG - PreConfigure(options => { - options.UseAspNetCore() - .DisableTransportSecurityRequirement(); + PreConfigure(options => + { + options.UseAspNetCore() + .DisableTransportSecurityRequirement(); }); #endif ``` - ## How to Configure & Run the React Native Application 1. Make sure the [database migration is complete](./Getting-Started?UI=NG&DB=EF&Tiered=No#create-the-database) and the [API is up and running](./Getting-Started?UI=NG&DB=EF&Tiered=No#run-the-application).