From 8fe5dcaebd667d4bf35ba9f2e02c02bc61dbe0f3 Mon Sep 17 00:00:00 2001 From: raienkotixnet Date: Sun, 21 Jul 2024 23:39:38 +0300 Subject: [PATCH] macOS support --- README.md | 8 ++++---- react-native-config.podspec | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c64e7f63..4ed7478f 100644 --- a/README.md +++ b/README.md @@ -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! @@ -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` @@ -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: @@ -312,7 +312,7 @@ Also note that besides requiring lowercase, the matching is done with `buildFlav -#### iOS +#### iOS / macOS The basic idea in iOS is to have one scheme per environment file, so you can easily alternate between them. diff --git a/react-native-config.podspec b/react-native-config.podspec index d5a8c42f..449b9707 100644 --- a/react-native-config.podspec +++ b/react-native-config.podspec @@ -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}" }