@capacitor/splash-screen 1.2.1 → 4.0.0-nightly-f0c6414.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/CHANGELOG.md +46 -0
- package/CapacitorSplashScreen.podspec +1 -1
- package/android/build.gradle +10 -11
- package/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreenPlugin.java +2 -1
- package/ios/Plugin/SplashScreen.swift +1 -1
- package/ios/Plugin/SplashScreenPlugin.swift +8 -14
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,52 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 4.0.0-beta.0 (2022-06-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **splash-screen:** avoid conditional downcast warning ([#776](https://github.com/ionic-team/capacitor-plugins/issues/776)) ([87ed912](https://github.com/ionic-team/capacitor-plugins/commit/87ed9128f43f0be498601f0ba89cadeba7a339b4))
|
|
12
|
+
* **splash-screen:** pick first window when there is no key window ([#730](https://github.com/ionic-team/capacitor-plugins/issues/730)) ([0e335ad](https://github.com/ionic-team/capacitor-plugins/commit/0e335ad386da8ceadfdfaa3be982840547fc41b6))
|
|
13
|
+
* **splash-screen:** Use Locale.ROOT on toLowerCase ([#813](https://github.com/ionic-team/capacitor-plugins/issues/813)) ([ecc55e1](https://github.com/ionic-team/capacitor-plugins/commit/ecc55e172acfe066977a4aac5018a55beef64f53))
|
|
14
|
+
* add es2017 lib to tsconfig ([#180](https://github.com/ionic-team/capacitor-plugins/issues/180)) ([2c3776c](https://github.com/ionic-team/capacitor-plugins/commit/2c3776c38ca025c5ee965dec10ccf1cdb6c02e2f))
|
|
15
|
+
* correct addListeners links ([#655](https://github.com/ionic-team/capacitor-plugins/issues/655)) ([f9871e7](https://github.com/ionic-team/capacitor-plugins/commit/f9871e7bd53478addb21155e148829f550c0e457))
|
|
16
|
+
* export all TS definitions ([6cd2996](https://github.com/ionic-team/capacitor-plugins/commit/6cd299660fdeb27382ec7f45f0b3a55224cd0ad1))
|
|
17
|
+
* inline source code in esm map files ([#760](https://github.com/ionic-team/capacitor-plugins/issues/760)) ([a960489](https://github.com/ionic-team/capacitor-plugins/commit/a960489a19db0182b90d187a50deff9dfbe51038))
|
|
18
|
+
* remove postpublish scripts ([#656](https://github.com/ionic-team/capacitor-plugins/issues/656)) ([ed6ac49](https://github.com/ionic-team/capacitor-plugins/commit/ed6ac499ebf4a47525071ccbfc36c27503e11f60))
|
|
19
|
+
* **splash-screen:** launchAutoHide not working on iOS ([#319](https://github.com/ionic-team/capacitor-plugins/issues/319)) ([2a83fcb](https://github.com/ionic-team/capacitor-plugins/commit/2a83fcb536cdfc5b601f363212353201de40ca5b))
|
|
20
|
+
* **splash-screen:** Use configured storyboard instead of hardcoded value ([#548](https://github.com/ionic-team/capacitor-plugins/issues/548)) ([67dd67f](https://github.com/ionic-team/capacitor-plugins/commit/67dd67fc443ea5494e8482fd4346c5275a42841b))
|
|
21
|
+
* support deprecated types from Capacitor 2 ([#139](https://github.com/ionic-team/capacitor-plugins/issues/139)) ([2d7127a](https://github.com/ionic-team/capacitor-plugins/commit/2d7127a488e26f0287951921a6db47c49d817336))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* add commonjs output format ([#179](https://github.com/ionic-team/capacitor-plugins/issues/179)) ([8e9e098](https://github.com/ionic-team/capacitor-plugins/commit/8e9e09862064b3f6771d7facbc4008e995d9b463))
|
|
27
|
+
* set targetSDK default value to 31 ([#824](https://github.com/ionic-team/capacitor-plugins/issues/824)) ([3ee10de](https://github.com/ionic-team/capacitor-plugins/commit/3ee10de98067984c1a4e75295d001c5a895c47f4))
|
|
28
|
+
* set targetSDK default value to 32 ([#970](https://github.com/ionic-team/capacitor-plugins/issues/970)) ([fa70d96](https://github.com/ionic-team/capacitor-plugins/commit/fa70d96f141af751aae53ceb5642c46b204f5958))
|
|
29
|
+
* SplashScreen plugin ([#149](https://github.com/ionic-team/capacitor-plugins/issues/149)) ([c5f44be](https://github.com/ionic-team/capacitor-plugins/commit/c5f44bee46d06bd9a2623cd907862633ee5331eb))
|
|
30
|
+
* Upgrade gradle to 7.4 ([#826](https://github.com/ionic-team/capacitor-plugins/issues/826)) ([5db0906](https://github.com/ionic-team/capacitor-plugins/commit/5db0906f6264287c4f8e69dbaecf19d4d387824b))
|
|
31
|
+
* Use java 11 ([#910](https://github.com/ionic-team/capacitor-plugins/issues/910)) ([5acb2a2](https://github.com/ionic-team/capacitor-plugins/commit/5acb2a288a413492b163e4e97da46a085d9e4be0))
|
|
32
|
+
* **splash-screen:** add useDialog and layoutName options for Android ([#519](https://github.com/ionic-team/capacitor-plugins/issues/519)) ([f48733f](https://github.com/ionic-team/capacitor-plugins/commit/f48733fd42a49d718a70c2fd36d28355a64b7a88))
|
|
33
|
+
* **splash-screen:** Make splash work in apps that use scenes ([#631](https://github.com/ionic-team/capacitor-plugins/issues/631)) ([cf0d214](https://github.com/ionic-team/capacitor-plugins/commit/cf0d2143c225336984a6bc8fa7ef814a18b02bd1))
|
|
34
|
+
* **splash-screen:** Use Launch Storyboard for splash ([#516](https://github.com/ionic-team/capacitor-plugins/issues/516)) ([0292dab](https://github.com/ionic-team/capacitor-plugins/commit/0292dab65ac9c0f81e632eaf711b13b051f4da92))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## [1.2.2](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/splash-screen@1.2.1...@capacitor/splash-screen@1.2.2) (2022-02-10)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* **splash-screen:** avoid conditional downcast warning ([#776](https://github.com/ionic-team/capacitor-plugins/issues/776)) ([87ed912](https://github.com/ionic-team/capacitor-plugins/commit/87ed9128f43f0be498601f0ba89cadeba7a339b4))
|
|
46
|
+
* **splash-screen:** Use Locale.ROOT on toLowerCase ([#813](https://github.com/ionic-team/capacitor-plugins/issues/813)) ([ecc55e1](https://github.com/ionic-team/capacitor-plugins/commit/ecc55e172acfe066977a4aac5018a55beef64f53))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
6
52
|
## [1.2.1](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/splash-screen@1.2.0...@capacitor/splash-screen@1.2.1) (2022-01-19)
|
|
7
53
|
|
|
8
54
|
|
|
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
|
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] }
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'splash-screen/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '
|
|
14
|
+
s.ios.deployment_target = '13.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
16
|
s.swift_version = '5.1'
|
|
17
17
|
end
|
package/android/build.gradle
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
ext {
|
|
2
|
-
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
@@ -11,17 +11,17 @@ buildscript {
|
|
|
11
11
|
mavenCentral()
|
|
12
12
|
}
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:
|
|
14
|
+
classpath 'com.android.tools.build:gradle:7.2.1'
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
apply plugin: 'com.android.library'
|
|
19
19
|
|
|
20
20
|
android {
|
|
21
|
-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
21
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
|
|
22
22
|
defaultConfig {
|
|
23
|
-
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion :
|
|
24
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
23
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
|
24
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
|
|
25
25
|
versionCode 1
|
|
26
26
|
versionName "1.0"
|
|
27
27
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -36,15 +36,14 @@ android {
|
|
|
36
36
|
abortOnError false
|
|
37
37
|
}
|
|
38
38
|
compileOptions {
|
|
39
|
-
sourceCompatibility JavaVersion.
|
|
40
|
-
targetCompatibility JavaVersion.
|
|
39
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
40
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
repositories {
|
|
45
45
|
google()
|
|
46
46
|
mavenCentral()
|
|
47
|
-
jcenter()
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
|
|
@@ -7,6 +7,7 @@ import com.getcapacitor.PluginCall;
|
|
|
7
7
|
import com.getcapacitor.PluginMethod;
|
|
8
8
|
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
9
9
|
import com.getcapacitor.util.WebColor;
|
|
10
|
+
import java.util.Locale;
|
|
10
11
|
|
|
11
12
|
@CapacitorPlugin(name = "SplashScreen")
|
|
12
13
|
public class SplashScreenPlugin extends Plugin {
|
|
@@ -103,7 +104,7 @@ public class SplashScreenPlugin extends Plugin {
|
|
|
103
104
|
if (spinnerStyle != null) {
|
|
104
105
|
int spinnerBarStyle = android.R.attr.progressBarStyleLarge;
|
|
105
106
|
|
|
106
|
-
switch (spinnerStyle.toLowerCase()) {
|
|
107
|
+
switch (spinnerStyle.toLowerCase(Locale.ROOT)) {
|
|
107
108
|
case "horizontal":
|
|
108
109
|
spinnerBarStyle = android.R.attr.progressBarStyleHorizontal;
|
|
109
110
|
break;
|
|
@@ -117,7 +117,7 @@ import Capacitor
|
|
|
117
117
|
// Update the bounds for the splash image. This will also be called when
|
|
118
118
|
// the parent view observers fire
|
|
119
119
|
private func updateSplashImageBounds() {
|
|
120
|
-
var window: UIWindow? = UIApplication.shared.delegate?.window
|
|
120
|
+
var window: UIWindow? = UIApplication.shared.delegate?.window ?? nil
|
|
121
121
|
|
|
122
122
|
if #available(iOS 13, *), window == nil {
|
|
123
123
|
let scene: UIWindowScene? = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
|
@@ -58,30 +58,24 @@ public class SplashScreenPlugin: CAPPlugin {
|
|
|
58
58
|
private func splashScreenConfig() -> SplashScreenConfig {
|
|
59
59
|
var config = SplashScreenConfig()
|
|
60
60
|
|
|
61
|
-
if let backgroundColor =
|
|
61
|
+
if let backgroundColor = getConfig().getString("backgroundColor") {
|
|
62
62
|
config.backgroundColor = UIColor.capacitor.color(fromHex: backgroundColor)
|
|
63
63
|
}
|
|
64
|
-
if let spinnerStyle =
|
|
64
|
+
if let spinnerStyle = getConfig().getString("iosSpinnerStyle") {
|
|
65
65
|
switch spinnerStyle.lowercased() {
|
|
66
66
|
case "small":
|
|
67
|
-
config.spinnerStyle = .
|
|
67
|
+
config.spinnerStyle = .medium
|
|
68
68
|
default:
|
|
69
|
-
config.spinnerStyle = .
|
|
69
|
+
config.spinnerStyle = .large
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
if let spinnerColor =
|
|
72
|
+
if let spinnerColor = getConfig().getString("spinnerColor") {
|
|
73
73
|
config.spinnerColor = UIColor.capacitor.color(fromHex: spinnerColor)
|
|
74
74
|
}
|
|
75
|
-
|
|
76
|
-
config.showSpinner = showSpinner
|
|
77
|
-
}
|
|
75
|
+
config.showSpinner = getConfig().getBoolean("showSpinner", config.showSpinner)
|
|
78
76
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
if let launchAutoHide = getConfigValue("launchAutoHide") as? Bool {
|
|
83
|
-
config.launchAutoHide = launchAutoHide
|
|
84
|
-
}
|
|
77
|
+
config.launchShowDuration = getConfig().getInt("launchShowDuration", config.launchShowDuration)
|
|
78
|
+
config.launchAutoHide = getConfig().getBoolean("launchAutoHide", config.launchAutoHide)
|
|
85
79
|
return config
|
|
86
80
|
}
|
|
87
81
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/splash-screen",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-nightly-f0c6414.0",
|
|
4
4
|
"description": "The Splash Screen API provides methods for showing or hiding a Splash image.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"scripts": {
|
|
31
31
|
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
32
|
-
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
|
|
32
|
+
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
|
|
33
33
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
34
34
|
"verify:web": "npm run build",
|
|
35
35
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"publish:cocoapod": "pod trunk push ./CapacitorSplashScreen.podspec --allow-warnings"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@capacitor/android": "
|
|
49
|
-
"@capacitor/cli": "
|
|
50
|
-
"@capacitor/core": "
|
|
48
|
+
"@capacitor/android": "next",
|
|
49
|
+
"@capacitor/cli": "next",
|
|
50
|
+
"@capacitor/core": "next",
|
|
51
51
|
"@capacitor/docgen": "0.0.18",
|
|
52
|
-
"@capacitor/ios": "
|
|
52
|
+
"@capacitor/ios": "next",
|
|
53
53
|
"@ionic/eslint-config": "^0.3.0",
|
|
54
54
|
"@ionic/prettier-config": "~1.0.1",
|
|
55
55
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"typescript": "~4.1.5"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@capacitor/core": "
|
|
65
|
+
"@capacitor/core": "next"
|
|
66
66
|
},
|
|
67
67
|
"prettier": "@ionic/prettier-config",
|
|
68
68
|
"swiftlint": "@ionic/swiftlint-config",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "f0c64141855ef34ddd32cfb217d4de195b0ad095"
|
|
84
84
|
}
|