Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 40 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,31 @@ apply plugin: 'com.huawei.agconnect'

### Setup - iOS Part

1) Add the following post_install block to the end of your Podfile.
You can integrate the native Netmera iOS SDK either with **Swift Package Manager (SPM)** or with **CocoaPods**. Pick one method — don't mix the two in the same project. Flutter's SPM support requires Flutter 3.24 or later (on by default since Flutter 3.44).

1) Install dependencies

- Option 1: Swift Package Manager (Recommended)

Make sure Swift Package Manager integration is enabled for your Flutter project (on by default since Flutter 3.44; for earlier versions run `flutter config --enable-swift-package-manager`, or add the following to your app's `pubspec.yaml` so the setting applies to all contributors):

```yaml
flutter:
config:
enable-swift-package-manager: true
```

Then run your app as usual:

```
$ flutter run
```

Flutter resolves the plugin's Swift package automatically — no `post_install` Podfile block or `pod install` step is needed.

- Option 2: Cocoapods

Add the following post_install block to the end of your Podfile.

```
post_install do |installer|
Expand All @@ -117,21 +141,21 @@ post_install do |installer|
end
```

2) Navigate to ios folder in your terminal and run the following command.
Navigate to ios folder in your terminal and run the following command.

```
$ pod install
```

3) Enable push notifications for your project
2) Enable push notifications for your project

1) If you have not generated a valid push notification certificate yet,
generate one and then export by following the steps explained in [Configuring Push Notifications section of App Distribution Guide](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_certificate-based_connection_to_apns#2947597)
2) Export the generated push certificate in .p12 format and upload to Netmera Dashboard.
3) Enable Push Notifications capability for your application as explained in [Enable Push Notifications](https://developer.netmera.com/en/IOS/Quick-Start#enable-push-notifications) guide.
4) Enable Remote notifications background mode for your application as explained in [Configuring Background Modes](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app#2980038) guide.

4) Add the `Netmera-Config.plist` file to your ios/Runner directory.
3) Add the `Netmera-Config.plist` file to your ios/Runner directory.

```
<?xml version="1.0" encoding="UTF-8"?>
Expand Down Expand Up @@ -164,15 +188,23 @@ $ pod install
</plist>
```

5) In order to use iOS10 Media Push, follow the instructions in [Netmera Product Hub.](https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/push-notifications/media-push) Differently, you should add the pods to the top of the `Podfile` as below.
4) In order to use iOS10 Media Push, follow the instructions in [Netmera Product Hub.](https://user.netmera.com/netmera-developer-guide/platforms/ios/new-ios-swift/push-notifications/media-push) to create your Notification Service Extension and Notification Content Extension targets.

Option 1: Swift Package Manager

Select your project in Xcode → the `Runner` project (not a target) → **Package Dependencies** tab → add `https://github.com/Netmera/swift-sdk` at version `4.23.3` if it isn't already added as a dependency. In the **Choose Package Products** step, set **Add to Target** to `Runner` for both `NetmeraNotificationServiceExtension` and `NetmeraNotificationContentExtension`.

Option 2: Cocoapods

You should add the pods to the top of the `Podfile` as below.

```
// For receiving Media Push, you must add Netmera pods to top of your Podfile.
pod 'NetmeraNotificationServiceExtension', "4.19.1"
pod "NetmeraNotificationContentExtension", "4.19.1"
pod 'NetmeraNotificationServiceExtension', "4.23.3"
pod "NetmeraNotificationContentExtension", "4.23.3"
```

6) In order to use the widget URL callback, add these lines into `AppDelegate.swift` file.
5) In order to use the widget URL callback, add these lines into `AppDelegate.swift` file.

```
import NetmeraNotification
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ android {
minSdkVersion flutter.minSdkVersion
targetSdkVersion 36
versionCode flutterVersionCode.toInteger()
versionName "3.1.0-beta02"
versionName "3.2.0-beta01"

buildConfigField "String", "NETMERA_API_KEY", "\"" + getNetmeraApiKey() + "\""
buildConfigField "String", "GCM_SENDER_ID", "\"" + getGCMSenderId() + "\""
Expand Down
18 changes: 0 additions & 18 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,14 @@ flutter_ios_podfile_setup
use_frameworks!
use_modular_headers!

# Add these pods to receive Media Push
pod 'NetmeraNotificationServiceExtension', "4.19.1"
pod "NetmeraNotificationContentExtension", "4.19.1"

platform :ios, '15.0'

target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

# Add these targets to receive Media Push
target 'NetmeraFlutterNotificationServiceExtension' do
end

target 'NetmeraFlutterNotificationContentExtension' do
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
if target.name.include?('Swinject')
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
end
end
169 changes: 1 addition & 168 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,189 +1,22 @@
PODS:
- app_links (7.0.0):
- Flutter
- Firebase/CoreOnly (11.15.0):
- FirebaseCore (~> 11.15.0)
- Firebase/Messaging (11.15.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 11.15.0)
- firebase_core (3.15.2):
- Firebase/CoreOnly (= 11.15.0)
- Flutter
- firebase_messaging (15.2.10):
- Firebase/Messaging (= 11.15.0)
- firebase_core
- Flutter
- FirebaseCore (11.15.0):
- FirebaseCoreInternal (~> 11.15.0)
- GoogleUtilities/Environment (~> 8.1)
- GoogleUtilities/Logger (~> 8.1)
- FirebaseCoreInternal (11.15.0):
- "GoogleUtilities/NSData+zlib (~> 8.1)"
- FirebaseInstallations (11.15.0):
- FirebaseCore (~> 11.15.0)
- GoogleUtilities/Environment (~> 8.1)
- GoogleUtilities/UserDefaults (~> 8.1)
- PromisesObjC (~> 2.4)
- FirebaseMessaging (11.15.0):
- FirebaseCore (~> 11.15.0)
- FirebaseInstallations (~> 11.0)
- GoogleDataTransport (~> 10.0)
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
- GoogleUtilities/Environment (~> 8.1)
- GoogleUtilities/Reachability (~> 8.1)
- GoogleUtilities/UserDefaults (~> 8.1)
- nanopb (~> 3.30910.0)
- Flutter (1.0.0)
- fluttertoast (0.0.2):
- Flutter
- GoogleDataTransport (10.1.0):
- nanopb (~> 3.30910.0)
- PromisesObjC (~> 2.4)
- GoogleUtilities/AppDelegateSwizzler (8.1.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Privacy
- GoogleUtilities/Environment (8.1.0):
- GoogleUtilities/Privacy
- GoogleUtilities/Logger (8.1.0):
- GoogleUtilities/Environment
- GoogleUtilities/Privacy
- GoogleUtilities/Network (8.1.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Privacy
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (8.1.0)":
- GoogleUtilities/Privacy
- GoogleUtilities/Privacy (8.1.0)
- GoogleUtilities/Reachability (8.1.0):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GoogleUtilities/UserDefaults (8.1.0):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- nanopb (3.30910.0):
- nanopb/decode (= 3.30910.0)
- nanopb/encode (= 3.30910.0)
- nanopb/decode (3.30910.0)
- nanopb/encode (3.30910.0)
- netmera_flutter_sdk (3.1.0):
- Flutter
- NetmeraAdvertisingId (= 4.19.1)
- NetmeraAnalytic (= 4.19.1)
- NetmeraAnalyticAutotracking (= 4.19.1)
- NetmeraGeofence (= 4.19.1)
- NetmeraLiveActivity (= 4.19.1)
- NetmeraLocation (= 4.19.1)
- NetmeraNotification (= 4.19.1)
- NetmeraNotificationInbox (= 4.19.1)
- NetmeraAdvertisingId (4.19.1):
- NetmeraAnalytic (= 4.19.1)
- NetmeraAnalytic (4.19.1):
- NetmeraSwiftCore (= 4.19.1)
- NetmeraAnalyticAutotracking (4.19.1):
- NetmeraAnalytic (= 4.19.1)
- NetmeraGeofence (4.19.1):
- NetmeraLocation (= 4.19.1)
- NetmeraLiveActivity (4.19.1):
- NetmeraSwiftCore (= 4.19.1)
- NetmeraLocation (4.19.1):
- NetmeraAnalytic (= 4.19.1)
- NetmeraNotification (4.19.1):
- NetmeraNotificationCore (= 4.19.1)
- NetmeraNotificationContentExtension (4.19.1):
- NetmeraNotificationCore (= 4.19.1)
- NetmeraNotificationCore (4.19.1):
- NetmeraAnalytic (= 4.19.1)
- NetmeraNotificationInbox (4.19.1):
- NetmeraNotificationCore (= 4.19.1)
- NetmeraNotificationServiceExtension (4.19.1):
- NetmeraNotificationCore (= 4.19.1)
- NetmeraSwiftCore (4.19.1):
- Swinject (= 2.8.4)
- PromisesObjC (2.4.0)
- Swinject (2.8.4)

DEPENDENCIES:
- app_links (from `.symlinks/plugins/app_links/ios`)
- firebase_core (from `.symlinks/plugins/firebase_core/ios`)
- firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`)
- Flutter (from `Flutter`)
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
- netmera_flutter_sdk (from `.symlinks/plugins/netmera_flutter_sdk/ios`)
- NetmeraNotificationContentExtension (= 4.19.1)
- NetmeraNotificationServiceExtension (= 4.19.1)

SPEC REPOS:
trunk:
- Firebase
- FirebaseCore
- FirebaseCoreInternal
- FirebaseInstallations
- FirebaseMessaging
- GoogleDataTransport
- GoogleUtilities
- nanopb
- NetmeraAdvertisingId
- NetmeraAnalytic
- NetmeraAnalyticAutotracking
- NetmeraGeofence
- NetmeraLiveActivity
- NetmeraLocation
- NetmeraNotification
- NetmeraNotificationContentExtension
- NetmeraNotificationCore
- NetmeraNotificationInbox
- NetmeraNotificationServiceExtension
- NetmeraSwiftCore
- PromisesObjC
- Swinject

EXTERNAL SOURCES:
app_links:
:path: ".symlinks/plugins/app_links/ios"
firebase_core:
:path: ".symlinks/plugins/firebase_core/ios"
firebase_messaging:
:path: ".symlinks/plugins/firebase_messaging/ios"
Flutter:
:path: Flutter
fluttertoast:
:path: ".symlinks/plugins/fluttertoast/ios"
netmera_flutter_sdk:
:path: ".symlinks/plugins/netmera_flutter_sdk/ios"

SPEC CHECKSUMS:
app_links: a754cbec3c255bd4bbb4d236ecc06f28cd9a7ce8
Firebase: d99ac19b909cd2c548339c2241ecd0d1599ab02e
firebase_core: 995454a784ff288be5689b796deb9e9fa3601818
firebase_messaging: f4a41dd102ac18b840eba3f39d67e77922d3f707
FirebaseCore: efb3893e5b94f32b86e331e3bd6dadf18b66568e
FirebaseCoreInternal: 9afa45b1159304c963da48addb78275ef701c6b4
FirebaseInstallations: 317270fec08a5d418fdbc8429282238cab3ac843
FirebaseMessaging: 3b26e2cee503815e01c3701236b020aa9b576f09
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
fluttertoast: 2c67e14dce98bbdb200df9e1acf610d7a6264ea1
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
netmera_flutter_sdk: c466e9ac2f062782a2739f19328a6937418ff74e
NetmeraAdvertisingId: 625be399a1080d4f070fd25d396221dab711032b
NetmeraAnalytic: bb4a0e6e8395829df8dbfd2e68a08059f7554d04
NetmeraAnalyticAutotracking: 120150b16a477c8e1f5be51fa11c7f2fd441bcd5
NetmeraGeofence: 249946aa2d3338fb895e422a02f1f7c2a4b9337d
NetmeraLiveActivity: 190a67588a1fb3b4027838df4ba5b6a366b0a4e6
NetmeraLocation: 0111099ba9b4c3a127d9f8c4e4ebbdc5183025c4
NetmeraNotification: 1457725aafd46d2aa6fd41be034d9032a0b0ce0e
NetmeraNotificationContentExtension: d8b020853b6a125b7fcabad03b51b6f795497512
NetmeraNotificationCore: f7bbc051577d9ce966972b2850a4773aa0ae610a
NetmeraNotificationInbox: f5e0175b84f2458f95eae4e777dad26e99acd880
NetmeraNotificationServiceExtension: 9a9b874289d027d353d652e345453c6f13c39fcb
NetmeraSwiftCore: 63da8fb018abc664c23b3595edaf1a579c601be6
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
Swinject: 6ba81f58fd769c9fd4b8ceced9e25a9cb137cb3c

PODFILE CHECKSUM: 93406c8ee7b44b153fdcb74021d103e456ab5cd3
PODFILE CHECKSUM: 50f017caf6021b1e68108e00bd67dcadfc611974

COCOAPODS: 1.16.2
Loading