Skip to content

Commit

Permalink
chore: readme fixes version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
worotyns committed May 31, 2023
1 parent bafb559 commit 30dd502
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ Now we use:
- 0.0.30 for Android
- 0.0.8 for iOS.
Initial release of library

## 0.0.4
Initial release of library with Readme instructions
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,50 @@ apply plugin: 'com.huawei.agconnect'
$ flutter run
```


# Sending notifications

## 1. iOS
### 1.1. Prepare certificates
1. Go to [Apple Developer Portal - Identities](https://developer.apple.com/account/resources/identifiers/list) and go to **Identifiers** section
2. Select from list your appBundleId like `com.example.your_project_name`
3. Look for PushNotifications and click "**Configure**" button
4. Select your __Certificate Singing Request__ file
5. Download Certificates and open in KeyChain Access (double click in macos)
6. Find this certificate in list select then in context menu (right click) select export and export to .p12 format file with password.
### 2. Prepare configuration
1. Wrap exported certficates with Base64 with command
```bash
$ cat Certificate.p12 | base64
```
2. Prepare JSON with provider configuration
```json
{
"type": "apns_cert",
"payload": {
"p12": "encoded base64 Certficiate.p12",
"passphrase": "PASSWORD",
"production": false,
"appBundleId": "com.example.your_product_name",
}
```

## 2. Android
1. Go to [Firebase Developer Console](https://console.firebase.google.com/)
2. Select your project and go to **Settings**
3. On **Service Accounts** section click **Generate Credentials**
4. Prepare JSON with provider configuration
```json
{
"type": "fcm_v1",
"payload": {
// Content of service account file
}
}
```

## 3. Go to example [SenderSDK](https://github.com/ppgco/ppg-core-js-sdk/tree/main/examples/sender) docs
In examples please use prepared "providerConfig" and token returned from SDK to send notifications.

# Support & production run
If you need production credentials or just help with integration please visit us in [discord](https://discord.gg/NVpUWvreZa) or just mail to [[email protected]](mailto:[email protected])
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.0.3"
version: "0.0.4"
sky_engine:
dependency: transitive
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion ios/ppg_core.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'ppg_core'
s.version = '0.0.3'
s.version = '0.0.4'
s.summary = 'PushPushGo Core SDK'
s.description = <<-DESC
PushPushGo Core SDK for Flutter (Dart)
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ppg_core
description: PushPushGo Core SDK for Flutter (Dart)
version: 0.0.3
version: 0.0.4
repository: https://github.com/ppgco/ppg-core-flutter-sdk

environment:
Expand Down

0 comments on commit 30dd502

Please sign in to comment.