Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: macOS support #807

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Config variables for React Native apps

Module to expose config variables to your javascript code in React Native, supporting iOS, Android and Windows.
Module to expose config variables to your javascript code in React Native, supporting iOS, Android, macOS and Windows.

Bring some [12 factor](http://12factor.net/config) love to your mobile apps!

Expand Down Expand Up @@ -49,7 +49,7 @@ if cocoapods are used in the project then pod has to be installed as well:
(cd ios; pod install)
```

- Manual Link (iOS)
- Manual Link (iOS / macOS)

1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-config` ➜ `ios` and add `ReactNativeConfig.xcodeproj`
Expand Down Expand Up @@ -195,7 +195,7 @@ versionCode project.env.get("VERSION_CODE").toInteger()

Once again, remember variables stored in `.env` are published with your code, so **DO NOT put anything sensitive there like your app `signingConfigs`.**

### iOS
### iOS / macOS

Read variables declared in `.env` from your Obj-C classes like:

Expand Down Expand Up @@ -312,7 +312,7 @@ Also note that besides requiring lowercase, the matching is done with `buildFlav

<a name="ios-multi-scheme"></a>

#### iOS
#### iOS / macOS

The basic idea in iOS is to have one scheme per environment file, so you can easily alternate between them.

Expand Down
1 change: 1 addition & 0 deletions react-native-config.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Pod::Spec.new do |s|
s.license = 'MIT'
s.ios.deployment_target = '9.0'
s.tvos.deployment_target = '9.0'
s.macos.deployment_target = '10.15'
s.visionos.deployment_target = '1.0'

s.source = { git: 'https://github.com/luggit/react-native-config.git', tag: "v#{s.version.to_s}" }
Expand Down