Skip to content

Commit

Permalink
Add contributing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
robertherber committed Nov 19, 2024
1 parent e8c47b8 commit b36cbbf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 4 additions & 2 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit b36cbbf

Please sign in to comment.