Skip to content

Commit 512a65c

Browse files
committed
docs: updated the readme
1 parent ddc93fa commit 512a65c

7 files changed

Lines changed: 168 additions & 9 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,35 @@ addEvent({
2525
});
2626
```
2727

28+
## Demo
29+
30+
### iOS
31+
32+
![iOS demo](media/ios_gif.gif)
33+
34+
### Android
35+
36+
![Android demo](media/android_gif.gif)
37+
38+
## iOS setup
39+
40+
To access the Calendar, add the following keys to your app’s `Info.plist` (the one in your app, not the library):
41+
42+
```xml
43+
<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
44+
<string>Used to add events to the calendar.</string>
45+
<key>NSCalendarsUsageDescription</key>
46+
<string>Used to access calendar information.</string>
47+
```
48+
49+
> ⚠️ Note: Without these keys, the app may crash or be rejected by App Store review when calendar access is requested.
50+
51+
and that's it 🥳
52+
53+
## Android setup
54+
55+
Android is ready to go after downloading library 🥳
56+
2857
## Contributing
2958

3059
- [Development workflow](CONTRIBUTING.md#development-workflow)

example/Gemfile.lock

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.8)
5+
activesupport (7.2.3)
6+
base64
7+
benchmark (>= 0.3)
8+
bigdecimal
9+
concurrent-ruby (~> 1.0, >= 1.3.1)
10+
connection_pool (>= 2.2.5)
11+
drb
12+
i18n (>= 1.6, < 2)
13+
logger (>= 1.4.2)
14+
minitest (>= 5.1)
15+
securerandom (>= 0.3)
16+
tzinfo (~> 2.0, >= 2.0.5)
17+
addressable (2.8.9)
18+
public_suffix (>= 2.0.2, < 8.0)
19+
algoliasearch (1.27.5)
20+
httpclient (~> 2.8, >= 2.8.3)
21+
json (>= 1.5.1)
22+
atomos (0.1.3)
23+
base64 (0.3.0)
24+
benchmark (0.5.0)
25+
bigdecimal (4.0.1)
26+
claide (1.1.0)
27+
cocoapods (1.15.2)
28+
addressable (~> 2.8)
29+
claide (>= 1.0.2, < 2.0)
30+
cocoapods-core (= 1.15.2)
31+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
32+
cocoapods-downloader (>= 2.1, < 3.0)
33+
cocoapods-plugins (>= 1.0.0, < 2.0)
34+
cocoapods-search (>= 1.0.0, < 2.0)
35+
cocoapods-trunk (>= 1.6.0, < 2.0)
36+
cocoapods-try (>= 1.1.0, < 2.0)
37+
colored2 (~> 3.1)
38+
escape (~> 0.0.4)
39+
fourflusher (>= 2.3.0, < 3.0)
40+
gh_inspector (~> 1.0)
41+
molinillo (~> 0.8.0)
42+
nap (~> 1.0)
43+
ruby-macho (>= 2.3.0, < 3.0)
44+
xcodeproj (>= 1.23.0, < 2.0)
45+
cocoapods-core (1.15.2)
46+
activesupport (>= 5.0, < 8)
47+
addressable (~> 2.8)
48+
algoliasearch (~> 1.0)
49+
concurrent-ruby (~> 1.1)
50+
fuzzy_match (~> 2.0.4)
51+
nap (~> 1.0)
52+
netrc (~> 0.11)
53+
public_suffix (~> 4.0)
54+
typhoeus (~> 1.0)
55+
cocoapods-deintegrate (1.0.5)
56+
cocoapods-downloader (2.1)
57+
cocoapods-plugins (1.0.0)
58+
nap
59+
cocoapods-search (1.0.1)
60+
cocoapods-trunk (1.6.0)
61+
nap (>= 0.8, < 2.0)
62+
netrc (~> 0.11)
63+
cocoapods-try (1.2.0)
64+
colored2 (3.1.2)
65+
concurrent-ruby (1.3.3)
66+
connection_pool (3.0.2)
67+
drb (2.2.3)
68+
escape (0.0.4)
69+
ethon (0.18.0)
70+
ffi (>= 1.15.0)
71+
logger
72+
ffi (1.17.3)
73+
fourflusher (2.3.1)
74+
fuzzy_match (2.0.4)
75+
gh_inspector (1.1.3)
76+
httpclient (2.9.0)
77+
mutex_m
78+
i18n (1.14.8)
79+
concurrent-ruby (~> 1.0)
80+
json (2.19.1)
81+
logger (1.7.0)
82+
minitest (6.0.2)
83+
drb (~> 2.0)
84+
prism (~> 1.5)
85+
molinillo (0.8.0)
86+
mutex_m (0.3.0)
87+
nanaimo (0.3.0)
88+
nap (1.1.0)
89+
netrc (0.11.0)
90+
prism (1.9.0)
91+
public_suffix (4.0.7)
92+
rexml (3.4.4)
93+
ruby-macho (2.5.1)
94+
securerandom (0.4.1)
95+
typhoeus (1.6.0)
96+
ethon (>= 0.18.0)
97+
tzinfo (2.0.6)
98+
concurrent-ruby (~> 1.0)
99+
xcodeproj (1.25.1)
100+
CFPropertyList (>= 2.3.3, < 4.0)
101+
atomos (~> 0.1.3)
102+
claide (>= 1.0.2, < 2.0)
103+
colored2 (~> 3.1)
104+
nanaimo (~> 0.3.0)
105+
rexml (>= 3.3.6, < 4.0)
106+
107+
PLATFORMS
108+
ruby
109+
110+
DEPENDENCIES
111+
activesupport (>= 6.1.7.5, != 7.1.0)
112+
benchmark
113+
bigdecimal
114+
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
115+
concurrent-ruby (< 1.3.4)
116+
logger
117+
mutex_m
118+
xcodeproj (< 1.26.0)
119+
120+
RUBY VERSION
121+
ruby 3.3.0p0
122+
123+
BUNDLED WITH
124+
2.5.3

example/ios/AddCalendarExample/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
<array>
4444
<string>arm64</string>
4545
</array>
46+
<key>NSCalendarsWriteOnlyAccessUsageDescription</key>
47+
<string>For demonstration purposes</string>
48+
<key>NSCalendarsUsageDescription</key>
49+
<string>For demonstration purposes</string>
4650
<key>UISupportedInterfaceOrientations</key>
4751
<array>
4852
<string>UIInterfaceOrientationPortrait</string>

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PODS:
2-
- AddCalendar (0.1.0):
2+
- AddCalendar (1.0.1):
33
- boost
44
- DoubleConversion
55
- fast_float
@@ -2760,7 +2760,7 @@ EXTERNAL SOURCES:
27602760
:path: "../node_modules/react-native/ReactCommon/yoga"
27612761

27622762
SPEC CHECKSUMS:
2763-
AddCalendar: a88be41c72ad3bb481b94271a42305743a340e68
2763+
AddCalendar: 8d6840b66764e3bab4856bb54a49625b570f4a8e
27642764
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
27652765
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
27662766
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
@@ -2843,4 +2843,4 @@ SPEC CHECKSUMS:
28432843

28442844
PODFILE CHECKSUM: 720c47996bf07ddc6dfa25b8afdfa5d1308ee386
28452845

2846-
COCOAPODS: 1.16.2
2846+
COCOAPODS: 1.15.2

example/src/App.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
1-
import { View, StyleSheet, Button } from 'react-native';
1+
import { View, StyleSheet, Text } from 'react-native';
22
import { addEvent } from 'react-native-add-calendar';
33

44
export default function App() {
55
return (
66
<View style={styles.container}>
7-
<Button
8-
title="Add Event"
7+
<Text
98
onPress={() =>
109
addEvent(
1110
'Hello world',
1211
'Somewhere over the rainbow',
13-
new Date().getTime(),
14-
new Date(new Date().getDate() + 1).getTime()
12+
1773759222723,
13+
1773999600000
1514
)
1615
}
17-
/>
16+
>
17+
Add Event
18+
</Text>
1819
</View>
1920
);
2021
}
2122

2223
const styles = StyleSheet.create({
2324
container: {
2425
flex: 1,
26+
backgroundColor: 'white',
2527
alignItems: 'center',
2628
justifyContent: 'center',
2729
},

media/android_gif.gif

5.01 MB
Loading

media/ios_gif.gif

624 KB
Loading

0 commit comments

Comments
 (0)