diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d869f9..78bc534 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 81ad138..d6502da 100644 --- a/README.md +++ b/README.md @@ -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 [support@pushpushgo.com](mailto:support@pushpushgo.com) \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 80cf068..0169a4f 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -137,7 +137,7 @@ packages: path: ".." relative: true source: path - version: "0.0.3" + version: "0.0.4" sky_engine: dependency: transitive description: flutter diff --git a/ios/ppg_core.podspec b/ios/ppg_core.podspec index c4136c9..80355b6 100644 --- a/ios/ppg_core.podspec +++ b/ios/ppg_core.podspec @@ -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) diff --git a/pubspec.yaml b/pubspec.yaml index 7d03db8..7c25129 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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: