surveysparrow-ionic-plugin 1.0.5-beta.1 → 1.0.5-beta.3

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/Package.swift CHANGED
@@ -3,14 +3,14 @@ import PackageDescription
3
3
 
4
4
  let package = Package(
5
5
  name: "SurveysparrowIonicPlugin",
6
- platforms: [.iOS(.v13)],
6
+ platforms: [.iOS(.v14)],
7
7
  products: [
8
8
  .library(
9
9
  name: "SurveysparrowIonicPlugin",
10
10
  targets: ["SurveySparrowIonicPluginPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "main")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
14
14
  ],
15
15
  targets: [
16
16
  .target(
package/README.md CHANGED
@@ -15,6 +15,17 @@ To use this plugin, ensure the following permissions are added to your app:
15
15
 
16
16
  ### Android
17
17
 
18
+ Add this in your **root** `build.gradle` at the end of repositories:
19
+
20
+ ```gradle
21
+ allprojects {
22
+ repositories {
23
+ ...
24
+ maven { url 'https://jitpack.io' }
25
+ }
26
+ }
27
+ ```
28
+
18
29
  Add these permissions to your `AndroidManifest.xml`:
19
30
 
20
31
  ```xml
@@ -11,7 +11,7 @@ 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/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '13.0'
14
+ s.ios.deployment_target = '14.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.swift_version = '5.1'
17
17
  end
@@ -1,8 +1,8 @@
1
1
  ext {
2
2
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
4
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
5
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
6
6
  }
7
7
 
8
8
  buildscript {
@@ -11,7 +11,7 @@ buildscript {
11
11
  mavenCentral()
12
12
  }
13
13
  dependencies {
14
- classpath 'com.android.tools.build:gradle:8.2.1'
14
+ classpath 'com.android.tools.build:gradle:8.6.1'
15
15
  }
16
16
  }
17
17
 
@@ -19,10 +19,10 @@ apply plugin: 'com.android.library'
19
19
 
20
20
  android {
21
21
  namespace "com.surveysparrow.plugins.ionic"
22
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
22
+ compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
23
23
  defaultConfig {
24
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
25
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
24
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
25
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
26
26
  versionCode 1
27
27
  versionName "1.0"
28
28
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -57,13 +57,20 @@ import WebKit
57
57
  let config = WKWebViewConfiguration()
58
58
  config.preferences.javaScriptEnabled = true
59
59
  config.userContentController = surveyResponseHandler
60
- ssWebView = WKWebView(frame: bounds, configuration: config)
60
+ ssWebView = WKWebView(frame: .zero, configuration: config)
61
61
  surveyResponseHandler.add(self, name: "surveyResponse")
62
62
  ssWebView.navigationDelegate = self
63
63
  ssWebView.backgroundColor = .gray
64
64
  ssWebView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
65
+ ssWebView.translatesAutoresizingMaskIntoConstraints = false
65
66
  addSubview(ssWebView)
66
67
 
68
+ NSLayoutConstraint.activate([
69
+ ssWebView.topAnchor.constraint(equalTo: safeAreaLayoutGuide.topAnchor),
70
+ ssWebView.leadingAnchor.constraint(equalTo: safeAreaLayoutGuide.leadingAnchor),
71
+ ssWebView.trailingAnchor.constraint(equalTo: safeAreaLayoutGuide.trailingAnchor),
72
+ ssWebView.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor)
73
+ ])
67
74
  let isCloseButtonEnabled = properties?["isCloseButtonEnabled"] as? Bool
68
75
 
69
76
  if isCloseButtonEnabled ?? true == true {
@@ -97,8 +104,10 @@ import WebKit
97
104
  ssWebView.addSubview(loader)
98
105
  ssWebView.navigationDelegate = self
99
106
  loader.translatesAutoresizingMaskIntoConstraints = false
100
- loader.centerXAnchor.constraint(equalTo: ssWebView.centerXAnchor).isActive = true
101
- loader.centerYAnchor.constraint(equalTo: ssWebView.centerYAnchor).isActive = true
107
+ NSLayoutConstraint.activate([
108
+ loader.centerXAnchor.constraint(equalTo: ssWebView.centerXAnchor),
109
+ loader.centerYAnchor.constraint(equalTo: ssWebView.centerYAnchor)
110
+ ])
102
111
  loader.hidesWhenStopped = true
103
112
  }
104
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "surveysparrow-ionic-plugin",
3
- "version": "1.0.5-beta.1",
3
+ "version": "1.0.5-beta.3",
4
4
  "description": "SurveySparrow SDK enables you to collect feedback from your mobile app. Embed the Classic, Chat & NPS surveys in your ionic application seamlessly with few lines of code.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -46,23 +46,23 @@
46
46
  "prepublishOnly": "npm run build"
47
47
  },
48
48
  "devDependencies": {
49
- "@capacitor/android": "^6.0.0",
50
- "@capacitor/core": "^6.0.0",
51
- "@capacitor/docgen": "^0.2.2",
52
- "@capacitor/ios": "^6.0.0",
49
+ "@capacitor/android": "^7.0.0",
50
+ "@capacitor/core": "^7.0.0",
51
+ "@capacitor/docgen": "^0.3.0",
52
+ "@capacitor/ios": "^7.0.0",
53
53
  "@ionic/eslint-config": "^0.4.0",
54
54
  "@ionic/prettier-config": "^4.0.0",
55
55
  "@ionic/swiftlint-config": "^2.0.0",
56
56
  "eslint": "^8.57.0",
57
- "prettier": "^3.3.3",
58
- "prettier-plugin-java": "^2.6.4",
57
+ "prettier": "^3.4.2",
58
+ "prettier-plugin-java": "^2.6.6",
59
59
  "rimraf": "^6.0.1",
60
- "rollup": "^4.24.0",
60
+ "rollup": "^4.30.1",
61
61
  "swiftlint": "^2.0.0",
62
62
  "typescript": "~4.1.5"
63
63
  },
64
64
  "peerDependencies": {
65
- "@capacitor/core": "^6.0.0"
65
+ "@capacitor/core": ">=7.0.0"
66
66
  },
67
67
  "prettier": "@ionic/prettier-config",
68
68
  "swiftlint": "@ionic/swiftlint-config",