Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 2e7638e

Browse files
Feature request: Invites #199 (docs)
1 parent a1fede7 commit 2e7638e

24 files changed

+80
-27
lines changed

.npmignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.idea
22
.vscode
33
platforms/android/libraryproject/
4+
platforms/ios/typings/
45
docs
56
README.md
67
CHANGELOG.md
7-
node_modules
8-
*.tgz
8+
node_modules

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ For readability the supported features have been moved to their own README's:
1414
* [Storage](docs/STORAGE.md)
1515
* [Crash Reporting](docs/CRASHREPORTING.md)
1616
* [Analytics](docs/ANALYTICS.md)
17+
* [Invites](docs/INVITES.md)
1718
* [AdMob](docs/ADMOB.md)
1819

1920
## Prerequisites
@@ -138,7 +139,7 @@ firebase.init({
138139
```
139140

140141
#### Pod dependency error
141-
If you see an error like `Unable to satisfy the following requirements: Firebase (~> 3.13.0) required by Podfile`,
142+
If you see an error like `Unable to satisfy the following requirements: Firebase (~> 3.17.0) required by Podfile`,
142143
then run `pod repo update` on the command line to make sure you have the latest Podspec.
143144

144145
This could happen when updating the plugin to a new version. You'll want to `tns platform remove ios && tns platform add ios` as well to clean out the old pod version.

docs/ADMOB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img src="images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/admob.png" height="85px" alt="AdMob"/>
22

33
## Enabling AdMob
44
Since plugin version 3.10.0 you can use Firebase _AdMob_ features.

docs/ANALYTICS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<img src="images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
2-
3-
<img src="images/features/analytics.png" width="296px" height="124px" alt="Analytics"/>
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/analytics.png" height="85px" alt="Analytics"/>
42

53
## Enabling Analytics
64
This plugin has had enalytics enabled since day 1 to collect usage and behavior data for your app. However, you were not able to push your own events. That changed with version 3.6.0 😃🔥

docs/AUTHENTICATION.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<img src="images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
2-
3-
<img src="images/features/auth.png" width="296px" height="124px" alt="Auth"/>
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/auth.png" height="85px" alt="Authentication"/>
42

53
## Enabling Authentication
64
You can sign in a user either

docs/CRASHREPORTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<img src="images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
2-
3-
<img src="images/features/crash.png" width="296px" height="124px" alt="Crash"/>
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/crash.png" height="85px" alt="Crash Reporting"/>
42

53
## Enabling Crash Reporting
64
With plugin version 3.9.0+ you will be prompted during installation of the plugin to enable Crash Reporting (it's off by default).

docs/DATABASE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<img src="images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
2-
3-
<img src="images/features/database.png" width="296px" height="124px" alt="Database"/>
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/database.png" height="85px" alt="Realtime Database"/>
42

53
If you can spare 41 seconds, check (an older version of) this plugin's [demo app](https://github.com/EddyVerbruggen/nativescript-plugin-firebase-demo) in action:
64
[![YouTube demo, 41 sec](images/yt-thumb-database.png)](https://youtu.be/7zYU5e0Djkw "YouTube demo, 41 sec")

docs/INVITES.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/invites.png" height="85px" alt="Invites"/>
2+
3+
## Enabling Invites
4+
Since plugin version 3.12.0 you can use Firebase _Invites_ features.
5+
6+
_Invites_ lets you invite other users to your app from right within your own app, via SMS and/or Email.
7+
8+
### iOS
9+
* On iOS the user must be signed in with their Google Account to send invitations.
10+
* You must have the App Store ID set in your developer console project in order for invitations to successfully be sent.
11+
* For more details see [https://firebase.google.com/docs/invites/ios](https://firebase.google.com/docs/invites/ios).
12+
13+
#### Contacts Usage Permission
14+
Open `app/App_Resources/iOS/Info.plist` and add this somewhere in the file (if it's not already there):
15+
16+
```xml
17+
<key>NSContactsUsageDescription</key>
18+
<string>For inviting others to use this app.</string>
19+
```
20+
21+
## Functions
22+
23+
### invites.sendInvitation
24+
25+
```js
26+
firebase.invites.sendInvitation({
27+
title: "Invite title here",
28+
message: "Invite message here"
29+
}).then(
30+
function (result) { // SendInvitationResult
31+
console.log(result.count + "invitations sent, ID's: " + JSON.stringify(result.invitationIds));
32+
},
33+
function (error) {
34+
console.log("sendInvitation error: " + error);
35+
}
36+
);
37+
```
38+
39+
The options you can pass to `sendInvitation` are:
40+
41+
|param|optional|description
42+
|---|---|---
43+
|`title`|no|Invitation title you want to send.
44+
|`message`|no|Sets the default message sent with invitations.
45+
|`deepLink`|yes|Sets the link into your app that is sent with invitations.
46+
|`callToActionText`|yes|Sets the call-to-action text of the button rendered in email invitations. Cannot exceed 32 characters.
47+
|`customImage`|yes|Sets the URL of a custom image to include in email invitations. The image must be square and around 600x600 pixels. The image can be no larger than 4000x4000 pixels.
48+
|`androidClientID`|yes|If you have an Android version of your app and you want to send an invitation that can be opened on Android in addition to iOS.
49+
|`iosClientID`|yes|You can find your iOS app's client ID in the GoogleService-Info.plist file you downloaded from the Firebase console.
50+
51+
52+
### invites.getInvitation
53+
When the user opens your app from an invite, you can retrieve the details via the `getInvitation` function:
54+
55+
```js
56+
firebase.invites.getInvitation().then(
57+
function (result) { // GetInvitationResult
58+
console.log("deeplink: " + result.deeplink + ", invitationId: " result.invitationId);
59+
},
60+
function (error) {
61+
console.log("getInvitation error: " + error);
62+
}
63+
);
64+
```

docs/MESSAGING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<img src="images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
2-
3-
<img src="images/features/notifications.png" width="296px" height="124px" alt="Notifications"/>
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/notifications.png" height="85px" alt="Notifications"/>
42

53
## Enabling Firebase Cloud Messaging (FCM)
64
Version 3.3.0 of this plugin added FCM support (which is the successor of GCM).

docs/REMOTECONFIG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<img src="images/firebase-logo.png" width="116px" height="32px" alt="Firebase"/>
1+
<img src="https://raw.githubusercontent.com/EddyVerbruggen/nativescript-plugin-firebase/master/docs/images/features/config.png" height="85px" alt="Remote Config"/>
22

3-
<img src="images/features/config.png" width="296px" height="124px" alt="Config"/>
43

54
## Enabling Remote Config
65
Since plugin version 3.2.0 you can retrieve _Remote Config_ properties.

0 commit comments

Comments
 (0)