Skip to content

Commit

Permalink
macOS support (#807)
Browse files Browse the repository at this point in the history
Co-authored-by: raienkotixnet <oleksandr.r@tixnet.com>
  • Loading branch information
raienko and raienkotixnet authored Jul 30, 2024
1 parent 0eb4830 commit 5efa39e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
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

0 comments on commit 5efa39e

Please sign in to comment.