@capacitor/splash-screen 1.2.0 → 4.0.0-beta.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 +57 -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/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.js.map +1 -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,63 @@
|
|
|
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
|
+
|
|
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)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* 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))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
6
63
|
# [1.2.0](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/splash-screen@1.1.6...@capacitor/splash-screen@1.2.0) (2021-12-08)
|
|
7
64
|
|
|
8
65
|
|
|
@@ -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,14 +36,13 @@ 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
|
-
jcenter()
|
|
47
46
|
mavenCentral()
|
|
48
47
|
}
|
|
49
48
|
|
|
@@ -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;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC"}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n /**\n * These config values are available:\n */\n SplashScreen?: {\n /**\n * How long to show the launch splash screen when autoHide is enabled (in ms)\n *\n * @since 1.0.0\n * @default 500\n * @example 3000\n */\n launchShowDuration?: number;\n\n /**\n * Whether to auto hide the splash after launchShowDuration.\n *\n * @since 1.0.0\n * @default true\n * @example true\n */\n launchAutoHide?: boolean;\n\n /**\n * Color of the background of the Splash Screen in hex format, #RRGGBB or #RRGGBBAA.\n * Doesn't work if `useDialog` is true.\n *\n * @since 1.0.0\n * @example \"#ffffffff\"\n */\n backgroundColor?: string;\n\n /**\n * Name of the resource to be used as Splash Screen.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @default splash\n * @example \"splash\"\n */\n androidSplashResourceName?: string;\n\n /**\n * The [ImageView.ScaleType](https://developer.android.com/reference/android/widget/ImageView.ScaleType) used to scale\n * the Splash Screen image.\n * Doesn't work if `useDialog` is true.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @default FIT_XY\n * @example \"CENTER_CROP\"\n */\n androidScaleType?:\n | 'CENTER'\n | 'CENTER_CROP'\n | 'CENTER_INSIDE'\n | 'FIT_CENTER'\n | 'FIT_END'\n | 'FIT_START'\n | 'FIT_XY'\n | 'MATRIX';\n\n /**\n * Show a loading spinner on the Splash Screen.\n * Doesn't work if `useDialog` is true.\n *\n * @since 1.0.0\n * @example true\n */\n showSpinner?: boolean;\n\n /**\n * Style of the Android spinner.\n * Doesn't work if `useDialog` is true.\n *\n * @since 1.0.0\n * @default large\n * @example \"large\"\n */\n androidSpinnerStyle?:\n | 'horizontal'\n | 'small'\n | 'large'\n | 'inverse'\n | 'smallInverse'\n | 'largeInverse';\n\n /**\n * Style of the iOS spinner.\n * Doesn't work if `useDialog` is true.\n *\n * Only available on iOS.\n *\n * @since 1.0.0\n * @default large\n * @example \"small\"\n */\n iosSpinnerStyle?: 'large' | 'small';\n\n /**\n * Color of the spinner in hex format, #RRGGBB or #RRGGBBAA.\n * Doesn't work if `useDialog` is true.\n *\n * @since 1.0.0\n * @example \"#999999\"\n */\n spinnerColor?: string;\n\n /**\n * Hide the status bar on the Splash Screen.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @example true\n */\n splashFullScreen?: boolean;\n\n /**\n * Hide the status bar and the software navigation buttons on the Splash Screen.\n *\n * Only available on Android.\n *\n * @since 1.0.0\n * @example true\n */\n splashImmersive?: boolean;\n\n /**\n * If `useDialog` is set to true, configure the Dialog layout.\n * If `useDialog` is not set or false, use a layout instead of the ImageView.\n *\n * Only available on Android.\n *\n * @since 1.1.0\n * @example \"launch_screen\"\n */\n layoutName?: string;\n\n /**\n * Use a Dialog instead of an ImageView.\n * If `layoutName` is not configured, it will use\n * a layout that uses the splash image as background.\n *\n * Only available on Android.\n *\n * @since 1.1.0\n * @example true\n */\n useDialog?: boolean;\n };\n }\n}\n\nexport interface ShowOptions {\n /**\n * Whether to auto hide the splash after showDuration\n *\n * @since 1.0.0\n */\n autoHide?: boolean;\n /**\n * How long (in ms) to fade in.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeInDuration?: number;\n /**\n * How long (in ms) to fade out.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeOutDuration?: number;\n /**\n * How long to show the splash screen when autoHide is enabled (in ms)\n *\n * @since 1.0.0\n * @default 3000\n */\n showDuration?: number;\n}\n\nexport interface HideOptions {\n /**\n * How long (in ms) to fade out.\n *\n * @since 1.0.0\n * @default 200\n */\n fadeOutDuration?: number;\n}\n\nexport interface SplashScreenPlugin {\n /**\n * Show the splash screen\n *\n * @since 1.0.0\n */\n show(options?: ShowOptions): Promise<void>;\n /**\n * Hide the splash screen\n *\n * @since 1.0.0\n */\n hide(options?: HideOptions): Promise<void>;\n}\n\n/**\n * @deprecated Use `ShowOptions`.\n * @since 1.0.0\n */\nexport type SplashScreenShowOptions = ShowOptions;\n\n/**\n * @deprecated Use `HideOptions`.\n * @since 1.0.0\n */\nexport type SplashScreenHideOptions = HideOptions;\n"]}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { SplashScreenPlugin } from './definitions';\n\nconst SplashScreen = registerPlugin<SplashScreenPlugin>('SplashScreen', {\n web: () => import('./web').then(m => new m.SplashScreenWeb()),\n});\n\nexport * from './definitions';\nexport { SplashScreen };\n"]}
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,KAAK,CAAC,IAAI,CAAC,QAAsB;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAsB;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,KAAK,CAAC,IAAI,CAAC,QAAsB;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,QAAsB;QAC/B,OAAO,SAAS,CAAC;IACnB,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n HideOptions,\n ShowOptions,\n SplashScreenPlugin,\n} from './definitions';\n\nexport class SplashScreenWeb extends WebPlugin implements SplashScreenPlugin {\n async show(_options?: ShowOptions): Promise<void> {\n return undefined;\n }\n\n async hide(_options?: HideOptions): Promise<void> {\n return undefined;\n }\n}\n"]}
|
|
@@ -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-beta.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": "fd7db8285f72990522da0adc889514c9804b6dae"
|
|
84
84
|
}
|