Skip to content

Commit cc9b767

Browse files
authored
chore(docs): Update docs to use @react-native-community/cookies namespace. (#21)
* Chaneg name * Breaking change warning * Update typo
1 parent 4bb364f commit cc9b767

File tree

5 files changed

+22
-19
lines changed

5 files changed

+22
-19
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Cookie Manager for React Native
33

44
This module was ported from [joeferraro/react-native-cookies](https://github.com/joeferraro/react-native-cookies). This would not exist without the work of the original author, [Joe Ferraro](https://github.com/joeferraro).
55

6+
## Important notices & Breaking Changes
7+
- v1.1.1 >= will be published to `@react-native-community/cookies`. `@react-native-community/react-native-cookies` is now deprecated as of v1.1.1.
8+
69
## Maintainers
710
- [Jason Safaiyeh](https://github.com/safaiyeh) ([Twitter @safaiyeh](https://twitter.com/safaiyeh)) from [Sumo Logic](https://www.sumologic.com)
811

@@ -15,7 +18,7 @@ Currently lacking support for Windows, Web, and Expo. Support for these platform
1518
## Installation
1619

1720
```
18-
yarn add @react-native-community/react-native-cookies
21+
yarn add @react-native-community/cookies
1922
```
2023

2124

@@ -24,7 +27,7 @@ yarn add @react-native-community/react-native-cookies
2427
### Automatic (recommended)
2528

2629
```
27-
react-native link @react-native-community/react-native-cookies
30+
react-native link @react-native-community/cookies
2831
```
2932

3033
### Manual
@@ -34,29 +37,29 @@ If automatic linking does not work, you can manually link this library by follow
3437
#### iOS
3538

3639
1. Open your project in Xcode, right click on `Libraries` and click `Add
37-
Files to "Your Project Name"` Look under `node_modules/@react-native-community/react-native-cookies/ios` and add `RNCookieManagerIOS.xcodeproj`.
40+
Files to "Your Project Name"` Look under `node_modules/@react-native-community/cookies/ios` and add `RNCookieManagerIOS.xcodeproj`.
3841
2. Add `libRNCookieManagerIOS.a` to `Build Phases -> Link Binary With Libraries.
3942
3. Clean and rebuild your project
4043

4144
#### Android
4245

43-
Run `react-native link` to link the react-native-cookies library.
46+
Run `react-native link` to link the cookies library.
4447

4548
Or if you have trouble, make the following additions to the given files manually:
4649

4750
**android/settings.gradle**
4851

4952
```gradle
50-
include ':@react-native-community_react-native-cookies'
51-
project(':@react-native-community_react-native-cookies').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/react-native-cookies/android')
53+
include ':@react-native-community_cookies'
54+
project(':@react-native-community_cookies').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/cookies/android')
5255
```
5356

5457
**android/app/build.gradle**
5558

5659
```gradle
5760
dependencies {
5861
...
59-
implementation project(':@react-native-community_react-native-cookies')
62+
implementation project(':@react-native-community_cookies')
6063
}
6164
```
6265

@@ -85,7 +88,7 @@ protected List<ReactPackage> getPackages() {
8588
## Usage
8689

8790
```javascript
88-
import CookieManager from '@react-native-community/react-native-cookies';
91+
import CookieManager from '@react-native-community/cookies';
8992

9093
// set a cookie (IOS ONLY)
9194
CookieManager.set({
@@ -156,7 +159,7 @@ To use this _CookieManager_ with WebKit-Support we extended the interface with t
156159

157160
##### Usage
158161
```javascript
159-
import CookieManager from '@react-native-community/react-native-cookies';
162+
import CookieManager from '@react-native-community/cookies';
160163

161164
const useWebKit = true;
162165

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module "@react-native-community/react-native-cookies" {
1+
declare module "@react-native-community/cookies" {
22
export interface Cookie {
33
name: string;
44
value: string;

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ let CookieManager;
1515
if (Platform.OS === 'ios') {
1616
invariant(
1717
RNCookieManagerIOS,
18-
'react-native-cookies: Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project',
18+
'@react-native-community/cookies: Add RNCookieManagerIOS.h and RNCookieManagerIOS.m to your Xcode project',
1919
);
2020
CookieManager = RNCookieManagerIOS;
2121
} else if (Platform.OS === 'android') {
2222
invariant(
2323
RNCookieManagerAndroid,
24-
'react-native-cookies: Import libraries to android "react-native link react-native-cookies"',
24+
'@react-native-community/cookies: Import libraries to android "react-native link @react-native-community/cookies"',
2525
);
2626
CookieManager = RNCookieManagerAndroid;
2727
} else {
2828
invariant(
2929
CookieManager,
30-
'react-native-cookies: Invalid platform. This library only supports Android and iOS.',
30+
'@react-native-community/cookies: Invalid platform. This library only supports Android and iOS.',
3131
);
3232
}
3333

ios/react-native-cookies.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Pod::Spec.new do |s|
99
s.homepage = package['homepage']
1010
s.license = package['license']
1111
s.author = "safaiyeh"
12-
s.source = { :git => "[email protected]:react-native-community/react-native-cookies.git", :tag => "v#{s.version}" }
12+
s.source = { :git => "[email protected]:react-native-community/cookies.git", :tag => "v#{s.version}" }
1313
s.requires_arc = true
1414
s.platform = :ios, "7.0"
1515
s.preserve_paths = "*.framework"

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "@react-native-community/react-native-cookies",
2+
"name": "@react-native-community/cookies",
33
"version": "1.1.1",
44
"description": "Cookie Manager for React Native",
55
"repository": {
66
"type": "git",
7-
"url": "git+https://github.com/react-native-community/react-native-cookies.git",
8-
"baseUrl": "https://github.com/react-native-community/react-native-cookies"
7+
"url": "git+https://github.com/react-native-community/cookies.git",
8+
"baseUrl": "https://github.com/react-native-community/cookies"
99
},
1010
"keywords": [
1111
"react native",
@@ -23,9 +23,9 @@
2323
"licenseFilename": "LICENSE",
2424
"readmeFilename": "README.md",
2525
"bugs": {
26-
"url": "https://github.com/react-native-community/react-native-cookies/issues"
26+
"url": "https://github.com/react-native-community/cookies/issues"
2727
},
28-
"homepage": "https://github.com/react-native-community/react-native-cookies#readme",
28+
"homepage": "https://github.com/react-native-community/cookies#readme",
2929
"main": "index.js",
3030
"types": "index.d.ts",
3131
"scripts": {

0 commit comments

Comments
 (0)