@applicaster/quick-brick-native-apple 5.11.2 → 5.13.1-alpha.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "QuickBrickApple",
3
- "version": "5.11.2",
3
+ "version": "5.13.1-alpha.1",
4
4
  "platforms": {
5
5
  "ios": "12.0",
6
6
  "tvos": "12.0"
@@ -16,7 +16,7 @@
16
16
  "authors": "Applicaster LTD.",
17
17
  "source": {
18
18
  "git": "https://github.com/applicaster/Zapp-Frameworks.git",
19
- "tag": "@@applicaster/quick-brick-native-apple/5.11.2"
19
+ "tag": "@@applicaster/quick-brick-native-apple/5.13.1-alpha.1"
20
20
  },
21
21
  "requires_arc": true,
22
22
  "source_files": "universal/**/*.{m,swift}",
@@ -15,7 +15,7 @@ public let kQBModuleName = "QuickBrickApp"
15
15
  public let suspendApp = "suspend"
16
16
 
17
17
  /// React Native Manager class for Quick Brick
18
- open class ReactNativeManager: NSObject, UserInterfaceLayerProtocol, UserInterfaceLayerDelegate {
18
+ open class ReactNativeManager: NSObject, UserInterfaceLayerProtocol {
19
19
  lazy var logger = Logger.getLogger(for: ReactNativeManagerLogs.subsystem)
20
20
 
21
21
  public var applicationDelegate: UIApplicationDelegate?
@@ -28,20 +28,6 @@ open class ReactNativeManager: NSObject, UserInterfaceLayerProtocol, UserInterfa
28
28
 
29
29
  var completion: ((_ viewController: UIViewController?, _ error: Error?) -> Void)?
30
30
 
31
- public required init(launchOptions: [UIApplication.LaunchOptionsKey: Any]?,
32
- applicationData: [String: Any] = [:]) {
33
- super.init()
34
- self.launchOptions = launchOptions
35
-
36
- if let reactNativePackagerRoot = applicationData["reactNativePackagerRoot"] as? String {
37
- self.reactNativePackagerRoot = reactNativePackagerRoot
38
- }
39
- applicationDelegate = self
40
- userNotificationCenterDelegate = self
41
-
42
- ReactNativeManager.applicationData = applicationData
43
- }
44
-
45
31
  /// url of the react server
46
32
  private var jsBundleUrl: URL? {
47
33
  RCTBundleURLProvider.sharedSettings()?.jsLocation = reactNativePackagerRoot
@@ -81,6 +67,22 @@ open class ReactNativeManager: NSObject, UserInterfaceLayerProtocol, UserInterfa
81
67
  return retVal
82
68
  }
83
69
 
70
+ // MARK: UserInterfaceLayerProtocol
71
+
72
+ public required init(launchOptions: [UIApplication.LaunchOptionsKey: Any]?,
73
+ applicationData: [String: Any] = [:]) {
74
+ super.init()
75
+ self.launchOptions = launchOptions
76
+
77
+ if let reactNativePackagerRoot = applicationData["reactNativePackagerRoot"] as? String {
78
+ self.reactNativePackagerRoot = reactNativePackagerRoot
79
+ }
80
+ applicationDelegate = self
81
+ userNotificationCenterDelegate = self
82
+
83
+ ReactNativeManager.applicationData = applicationData
84
+ }
85
+
84
86
  public func prepareLayerForUse(completion: @escaping (_ viewController: UIViewController?, _ error: Error?) -> Void) {
85
87
  setRightToLeftFlag {
86
88
  self.mountReactApp(self.launchOptions)
@@ -88,6 +90,12 @@ open class ReactNativeManager: NSObject, UserInterfaceLayerProtocol, UserInterfa
88
90
  }
89
91
  }
90
92
 
93
+ public func currentOrientationMask() -> UIInterfaceOrientationMask? {
94
+ return rootViewController?.orientationStack.last
95
+ }
96
+
97
+ // MARK: Public methods
98
+
91
99
  /**
92
100
  Creates the react bridge and the react root view. At this point, React execution starts
93
101
  - Parameter launchOptions: launchOptions coming from AppDelegate which need to be passed to React
@@ -172,7 +180,6 @@ extension ReactNativeManager: QuickBrickManagerDelegate {
172
180
  }
173
181
  }
174
182
 
175
-
176
183
  public func setPrefersHomeIndicatorAutoHidden(_ payload: Dictionary<String, Any>) {
177
184
  FacadeConnector.connector?.uiLayer?.setPrefersHomeIndicatorAutoHidden(autoHidden: payload["autoHidden"] as? Bool ?? true)
178
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applicaster/quick-brick-native-apple",
3
- "version": "5.11.2",
3
+ "version": "5.13.1-alpha.1",
4
4
  "description": "iOS and tvOS native code for QuickBrick applications. This package is used to provide native logic for QuickBrick",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"