You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swift format -i -p -r ./packages/react-native-device-activity/ios/Tests ./packages/react-native-device-activity/targets ./packages/react-native-device-activity/ios/TestHarness/reactnativedeviceactivityexample
2
+
swift format -i -p ./packages/react-native-device-activity/ios/Shared.swift
The example project is linked specifically to simplify development. This means it's not looking exactly like the published package, but for most intents and purposes it should result in the same outcome.
3
+
## Example app config (env-driven)
4
4
5
-
- The config plugin has a `copyToTargetFolder` option that is set to false. This is to prevent the target folder from being copied to the example project and potentially overwriting the original files.
6
-
- The swift files in the targets folder are linked to the root project instead of duplicated. If adding new swift files, try to link them instead of duplicating to keep things clean.
7
-
- The entitlements and info.plist files however duplicated - to not mess with the example project/signing etc.
8
-
- There is a Shared.swift file that can be accessed by all targets. This is linked to each target in the example project, but in the published package it's copied and duplicated to each target. I prefer this to making more changes in @bacons/xcode package which only supports swift files on the root level of each target directory.
9
-
- In addition the example project contains an XCode test target as well as SwiftLint.
5
+
The example app uses `apps/example/app.config.ts` so local developer values do not need to be committed.
10
6
11
-
## Prebuild
7
+
Create local env values from the template:
12
8
13
-
To try out prebuild functionality (i.e. the config plugin) run `bun run prebuild` in the example project (it uses the `INTERNALLY_TEST_EXAMPLE_PROJECT` and `COPY_TO_TARGET_FOLDER` env variables to behave like a published package). This should be used to verify changes are expected, but the result should not in it's full state be commited to the example project, since it will break the DX of the example project as explained above.
9
+
```bash
10
+
cp apps/example/.env.example apps/example/.env
11
+
```
12
+
13
+
Supported variables:
14
+
15
+
-`RNDA_APPLE_TEAM_ID`
16
+
-`RNDA_APP_GROUP`
17
+
-`RNDA_IOS_BUNDLE_ID`
18
+
-`RNDA_ANDROID_PACKAGE`
19
+
20
+
If these variables are missing, `app.config.ts` falls back to stable defaults for this repository.
21
+
22
+
## Example app follows CNG
23
+
24
+
The example app no longer tracks `apps/example/ios` and `apps/example/android`.
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -583,6 +583,23 @@ For a complete implementation, see the [example app](https://github.com/Kingstin
583
583
584
584
Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).
585
585
586
+
### Repository development setup
587
+
588
+
This repository uses an env-driven Expo example config in `apps/example/app.config.ts` to avoid committing local developer values such as team ID and app group.
589
+
590
+
Use `apps/example/.env.example` as a template for local values:
591
+
592
+
-`RNDA_APPLE_TEAM_ID`
593
+
-`RNDA_APP_GROUP`
594
+
-`RNDA_IOS_BUNDLE_ID`
595
+
-`RNDA_ANDROID_PACKAGE`
596
+
597
+
The example app follows CNG workflow (`expo prebuild --clean` / `expo run:*`) and native folders are generated as needed.
598
+
599
+
Swift test sources are package-owned in `packages/react-native-device-activity/ios/Tests` and run through the iOS harness in `packages/react-native-device-activity/ios/TestHarness`.
600
+
601
+
For repository-specific details, see [`CONTRIBUTING.md`](./CONTRIBUTING.md).
0 commit comments