diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2023-12-11 15:31:21 +0100 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2023-12-11 15:31:21 +0100 |
commit | f0600c5ec4ffa5a84f6a08c07ec341a22e0430de (patch) | |
tree | 39a3e1da4bf67c21491aa588344aa9f850ad8fac | |
parent | de52f51a0ad59500ac24992d63a45f0972ee38fe (diff) | |
download | cyberbadge_mobile-f0600c5ec4ffa5a84f6a08c07ec341a22e0430de.tar.gz cyberbadge_mobile-f0600c5ec4ffa5a84f6a08c07ec341a22e0430de.zip |
Add README files.
-rw-r--r-- | README.md | 137 | ||||
-rw-r--r-- | README.org | 53 |
2 files changed, 111 insertions, 79 deletions
@@ -1,79 +1,58 @@ | |||
1 | This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli). | 1 | # Jak uruchomic projekt ? |
2 | 2 | ||
3 | # Getting Started | 3 | - Android: |
4 | 4 | - Wymagania: | |
5 | >**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. | 5 | 1. Docker |
6 | 6 | - Kroki do wykonania na telefonie | |
7 | ## Step 1: Start the Metro Server | 7 | 1. Wejdź do ustawień w telefonie i w zakładce \"Developer |
8 | 8 | options\" włącz opcję \"USB Debugging\" | |
9 | First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. | 9 | 2. Podłącz telefon do komputera |
10 | 10 | - Kroki do wykonania na komputerze | |
11 | To start Metro, run the following command from the _root_ of your React Native project: | 11 | 1. Przejść do projektu: |
12 | 12 | ||
13 | ```bash | 13 | ``` {.bash org-language="sh"} |
14 | # using npm | 14 | cd cyberbadge_mobile |
15 | npm start | 15 | ``` |
16 | 16 | ||
17 | # OR using Yarn | 17 | 2. Sprawdzić czy urządzenie z androidem jest poprawnie |
18 | yarn start | 18 | podłączone, możliwe będzie zaakceptowanie prośby o |
19 | ``` | 19 | podłączenie na telefonie. |
20 | 20 | ||
21 | ## Step 2: Start your Application | 21 | - **Note**: Jak będzie brakować uprawnień (u mnie było to |
22 | 22 | zbędne) można spróbować dodać regułkę do udeva, | |
23 | Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: | 23 | dokładnie jest to opisanie tutaj: |
24 | 24 | <https://reactnative.dev/docs/running-on-device> | |
25 | ### For Android | 25 | |
26 | 26 | ``` {.bash org-language="sh"} | |
27 | ```bash | 27 | ./dev-env adb devices |
28 | # using npm | 28 | |
29 | npm run android | 29 | # Poprawny output \/ |
30 | 30 | # * daemon not running; starting now at tcp:5037 | |
31 | # OR using Yarn | 31 | # * daemon started successfully |
32 | yarn android | 32 | # List of devices attached |
33 | ``` | 33 | # 27141JEGR05136 device |
34 | 34 | ``` | |
35 | ### For iOS | 35 | |
36 | 36 | 3. Uruchomić projekt komenda podana poniżej: | |
37 | ```bash | 37 | |
38 | # using npm | 38 | - **Note**: pierwsze uruchomienie będzie trwało długo (u |
39 | npm run ios | 39 | mnie to było kolo 30 minut). |
40 | 40 | ||
41 | # OR using Yarn | 41 | ``` {.bash org-language="sh"} |
42 | yarn ios | 42 | ./dev-env npm run start |
43 | ``` | 43 | ``` |
44 | 44 | ||
45 | If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. | 45 | 4. Jak sie wszystko załaduję poprawnie powinna się ukazać ładna |
46 | 46 | grafika z napisem *Welcome to Metro*, w tym momencie należy | |
47 | This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. | 47 | kliknąć literkę \"a\", aby uruchomić apkę na telefonie z |
48 | 48 | Androidem. | |
49 | ## Step 3: Modifying your App | 49 | |
50 | 50 | 5. Jak się nic nie wysypie po drodze to apka powinna się | |
51 | Now that you have successfully run the app, let's modify it. | 51 | uruchomić sama na telefonie. |
52 | 52 | ||
53 | 1. Open `App.tsx` in your text editor of choice and edit some lines. | 53 | 6. **NOTE**: Wszystkie operacje z **npm** powinny być |
54 | 2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes! | 54 | wykonywanie wewnątrz środowiska, czyli: |
55 | 55 | ||
56 | For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes! | 56 | ``` {.bash org-language="sh"} |
57 | 57 | ./dev-env npm [cokolwiek] | |
58 | ## Congratulations! :tada: | 58 | ``` |
59 | |||
60 | You've successfully run and modified your React Native App. :partying_face: | ||
61 | |||
62 | ### Now what? | ||
63 | |||
64 | - If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps). | ||
65 | - If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started). | ||
66 | |||
67 | # Troubleshooting | ||
68 | |||
69 | If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page. | ||
70 | |||
71 | # Learn More | ||
72 | |||
73 | To learn more about React Native, take a look at the following resources: | ||
74 | |||
75 | - [React Native Website](https://reactnative.dev) - learn more about React Native. | ||
76 | - [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment. | ||
77 | - [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**. | ||
78 | - [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts. | ||
79 | - [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native. | ||
diff --git a/README.org b/README.org new file mode 100644 index 0000000..9b7b842 --- /dev/null +++ b/README.org | |||
@@ -0,0 +1,53 @@ | |||
1 | #+TITLE: README | ||
2 | |||
3 | * Jak uruchomic projekt ? | ||
4 | - Android: | ||
5 | + Wymagania: | ||
6 | 1. Docker | ||
7 | |||
8 | + Kroki do wykonania na telefonie | ||
9 | 1. Wejdź do ustawień w telefonie i w zakładce "Developer options" włącz opcję "USB Debugging" | ||
10 | 2. Podłącz telefon do komputera | ||
11 | |||
12 | + Kroki do wykonania na komputerze | ||
13 | 1. Przejść do projektu: | ||
14 | #+begin_src sh | ||
15 | cd cyberbadge_mobile | ||
16 | #+end_src | ||
17 | |||
18 | 2. Sprawdzić czy urządzenie z androidem jest poprawnie podłączone, | ||
19 | możliwe będzie zaakceptowanie prośby o podłączenie na telefonie. | ||
20 | |||
21 | - *Note*: Jak będzie brakować uprawnień (u mnie było to zbędne) | ||
22 | można spróbować dodać regułkę do udeva, dokładnie jest to | ||
23 | opisanie tutaj: | ||
24 | https://reactnative.dev/docs/running-on-device | ||
25 | |||
26 | #+begin_src sh | ||
27 | ./dev-env adb devices | ||
28 | |||
29 | # Poprawny output \/ | ||
30 | # * daemon not running; starting now at tcp:5037 | ||
31 | # * daemon started successfully | ||
32 | # List of devices attached | ||
33 | # 27141JEGR05136 device | ||
34 | #+end_src | ||
35 | |||
36 | 3. Uruchomić projekt komenda podana poniżej: | ||
37 | - *Note*: pierwsze uruchomienie będzie trwało długo (u mnie to | ||
38 | było kolo 30 minut). | ||
39 | #+begin_src sh | ||
40 | ./dev-env npm run start | ||
41 | #+end_src | ||
42 | |||
43 | 4. Jak sie wszystko załaduję poprawnie powinna się ukazać ładna | ||
44 | grafika z napisem /Welcome to Metro/, w tym momencie należy | ||
45 | kliknąć literkę "a", aby uruchomić apkę na telefonie z | ||
46 | Androidem. | ||
47 | |||
48 | 5. Jak się nic nie wysypie po drodze to apka powinna się uruchomić sama na telefonie. | ||
49 | |||
50 | 6. *NOTE*: Wszystkie operacje z *npm* powinny być wykonywanie wewnątrz środowiska, czyli: | ||
51 | #+begin_src sh | ||
52 | ./dev-env npm [cokolwiek] | ||
53 | #+end_src | ||