From b36cbbf77eb0bab8f5f87df079e1ef3a33a010d4 Mon Sep 17 00:00:00 2001 From: Robert Herber Date: Tue, 19 Nov 2024 13:28:02 +0100 Subject: [PATCH] Add contributing.md --- CONTRIBUTING.md | 7 +++++++ example/App.tsx | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..aa8e842 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,7 @@ +# Example project setup + +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. +- 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. +- 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. +- The entitlements and info.plist files however duplicated - to not mess with the example project/signing etc. +- 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. diff --git a/example/App.tsx b/example/App.tsx index eadb5c7..7a25c01 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -35,7 +35,8 @@ console.log( // gets run on reload, so easy to play around with void ReactNativeDeviceActivity.updateShieldConfiguration({ backgroundBlurStyle: UIBlurEffectStyle.prominent, - title: "{applicationOrDomainDisplayName} blocked by Zabit", + title: + "{applicationOrDomainDisplayName} blocked by react-native-device-activity", subtitle: "You have reached your limit! {activityName}", primaryButtonLabel: "Give me 5 more minutes", secondaryButtonLabel: "Close", @@ -111,7 +112,8 @@ const startMonitoring = (activitySelection: string) => { }, shieldConfiguration: { backgroundBlurStyle: UIBlurEffectStyle.prominent, - title: "{applicationOrDomainDisplayName} Blocked by Zabit", + title: + "{applicationOrDomainDisplayName} Blocked by react-native-device-activity", subtitle: "You have reached your limit! {activityName}", primaryButtonLabel: "Give me 5 more minutes", secondaryButtonLabel: "Close",