@allboatsrise/expo-marketingcloudsdk 47.0.0-android.26 → 47.0.0-android.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,9 @@ import ExpoModulesCore
2
2
  import SFMCSDK
3
3
  import MarketingCloudSDK
4
4
 
5
- public class ExpoMarketingCloudSdkAppDelegateSubscriber : ExpoAppDelegateSubscriber, EXNotificationsDelegate {
5
+ public class ExpoMarketingCloudSdkAppDelegateSubscriber : ExpoAppDelegateSubscriber {
6
+ private var notificationDelegate: ExpoMarketingCloudSdkNotificationsDelegate?
7
+
6
8
  public func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
7
9
 
8
10
  // Enable logging for debugging early on. Debug level is not recommended for production apps, as significant data
@@ -39,9 +41,10 @@ public class ExpoMarketingCloudSdkAppDelegateSubscriber : ExpoAppDelegateSubscri
39
41
  let completionHandler: (OperationResult) -> () = { result in
40
42
  if result == .success {
41
43
  // module is fully configured and ready for user
42
- var notificationCenterDelegate = ModuleRegistryProvider.getSingletonModule(for: EXNotificationCenterDelegate.self) as! EXNotificationCenterDelegate
44
+ let notificationCenterDelegate = ModuleRegistryProvider.getSingletonModule(for: EXNotificationCenterDelegate.self) as! EXNotificationCenterDelegate
43
45
 
44
- notificationCenterDelegate.add(self)
46
+ self.notificationDelegate = ExpoMarketingCloudSdkNotificationsDelegate()
47
+ notificationCenterDelegate.add(self.notificationDelegate!)
45
48
 
46
49
  } else if result == .error {
47
50
  // module failed to initialize, check logs for more details
@@ -59,9 +62,4 @@ public class ExpoMarketingCloudSdkAppDelegateSubscriber : ExpoAppDelegateSubscri
59
62
 
60
63
  return true
61
64
  }
62
-
63
- public func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) async -> UIBackgroundFetchResult {
64
- SFMCSdk.mp.setNotificationUserInfo(userInfo)
65
- return UIBackgroundFetchResult.newData
66
- }
67
65
  }
@@ -2,7 +2,7 @@ import ExpoModulesCore
2
2
  import SFMCSDK
3
3
  import MarketingCloudSDK
4
4
 
5
- class ExpoMarketingCloudSdkNotificationsDelegate : EXNotificationsDelegate {
5
+ class ExpoMarketingCloudSdkNotificationsDelegate : NSObject, EXNotificationsDelegate {
6
6
  @objc
7
7
  public func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) async -> UIBackgroundFetchResult {
8
8
  SFMCSdk.mp.setNotificationUserInfo(userInfo)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@allboatsrise/expo-marketingcloudsdk",
3
3
  "author": "All Boats Rise Inc.",
4
- "version": "47.0.0-android.26",
4
+ "version": "47.0.0-android.27",
5
5
  "description": "Expo module for Salesforce Marketing Cloud SDK",
6
6
  "homepage": "https://github.com/allboatsrise/expo-marketingcloudsdk",
7
7
  "keywords": [