@capacitor/splash-screen 1.1.6 → 1.2.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 +16 -0
- package/ios/Plugin/SplashScreen.swift +11 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
# [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
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **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))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* **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))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.1.6](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/splash-screen@1.1.5...@capacitor/splash-screen@1.1.6) (2021-11-03)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @capacitor/splash-screen
|
|
@@ -117,16 +117,21 @@ 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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
120
|
+
var window: UIWindow? = UIApplication.shared.delegate?.window as? UIWindow
|
|
121
|
+
|
|
122
|
+
if #available(iOS 13, *), window == nil {
|
|
123
|
+
let scene: UIWindowScene? = UIApplication.shared.connectedScenes.first as? UIWindowScene
|
|
124
|
+
window = scene?.windows.filter({$0.isKeyWindow}).first
|
|
125
|
+
if window == nil {
|
|
126
|
+
window = scene?.windows.first
|
|
127
|
+
}
|
|
123
128
|
}
|
|
124
129
|
|
|
125
|
-
|
|
130
|
+
if let unwrappedWindow = window {
|
|
131
|
+
viewController.view.frame = CGRect(origin: CGPoint(x: 0, y: 0), size: unwrappedWindow.bounds.size)
|
|
132
|
+
} else {
|
|
126
133
|
CAPLog.print("Unable to find root window object for SplashScreen bounds. Please file an issue")
|
|
127
|
-
return
|
|
128
134
|
}
|
|
129
|
-
viewController.view.frame = CGRect(origin: CGPoint(x: 0, y: 0), size: window.bounds.size)
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
override public func observeValue(forKeyPath keyPath: String?, of object: Any?, change _: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/splash-screen",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.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",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "d378c00d51b1c9fb978772906448fa0ec9cb81d0"
|
|
84
84
|
}
|