@rollershop/capacitor-emarsys-sdk 1.3.0 → 1.5.0

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.
package/README.md CHANGED
@@ -69,7 +69,7 @@ This Plugin is used as a wrapper for the [Emarsys SDK](https://help.emarsys.com/
69
69
 
70
70
  ## SDK Versions
71
71
 
72
- - iOS: [`3.8.0`](https://github.com/emartech/ios-emarsys-sdk/releases/tag/3.8.0)
72
+ - iOS: [`3.9.0`](https://github.com/emartech/ios-emarsys-sdk/releases/tag/3.9.0)
73
73
  - Android: Not implemented
74
74
 
75
75
  ## Install
@@ -11,8 +11,8 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '14.0'
14
+ s.ios.deployment_target = '17.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'EmarsysSDK', '3.8.0'
16
+ s.dependency 'EmarsysSDK', '3.9.0'
17
17
  s.swift_version = '5.1'
18
18
  end
@@ -141,10 +141,21 @@ public class EmarsysPlugin: CAPPlugin {
141
141
  if(self.savedRegisterCall != nil) {
142
142
  return
143
143
  }
144
+
144
145
  self.savedRegisterCall = call;
145
- DispatchQueue.main.async {
146
- UIApplication.shared.registerForRemoteNotifications()
147
- }
146
+
147
+ #if targetEnvironment(simulator)
148
+ // Simulator detected - resolve immediately with mock token
149
+ call.resolve([
150
+ "value": "SIMULATOR_TOKEN_FOR_TESTING"
151
+ ])
152
+ self.savedRegisterCall = nil
153
+ #else
154
+ // Real device - proceed normally
155
+ DispatchQueue.main.async {
156
+ UIApplication.shared.registerForRemoteNotifications()
157
+ }
158
+ #endif
148
159
  }
149
160
 
150
161
  @objc func setContact(_ call: CAPPluginCall) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rollershop/capacitor-emarsys-sdk",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Capacitor Plugin that wraps the Emarsys SDK",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",