Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ios-build-custom-dev-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ jobs:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}

- name: bundle install
run: bundle install
working-directory: ./ios

- name: pod install
run: pod install
run: bundle exec pod install
working-directory: ./ios

- name: appcenter prebuilt script test
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20
24
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,12 @@ PLATFORMS

DEPENDENCIES
activesupport (>= 6.1.7.5, != 7.1.0)
benchmark
bigdecimal
cocoapods (= 1.16.2)
concurrent-ruby (< 1.3.4)
logger
mutex_m
xcodeproj (>= 1.27.0)

RUBY VERSION
Expand Down
4 changes: 2 additions & 2 deletions ios/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class AppDelegate: ReactAppProvider {
var shouldOpenInLastApp = false
var hasHandledLaunchAppWithOptions = false

override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {

MendixAppDelegate.application(application, didFinishLaunchingWithOptions: launchOptions)
setupApp(application: application, launchOptions: launchOptions)
Expand Down Expand Up @@ -48,7 +48,7 @@ class AppDelegate: ReactAppProvider {
return true
}

override func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
return MendixAppDelegate.application(app, openURL: url, options: options)
}

Expand Down
1 change: 1 addition & 0 deletions ios/Config/config.release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-nativeTemplate/Pods-nativeTemplate.release.xcconfig"
#include "Pods/Target Support Files/Pods-nativeTemplate/Pods-nativeTemplate.releasedevapp.xcconfig"
#include "config.xcconfig"
8 changes: 4 additions & 4 deletions ios/Dev/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class AppDelegate: ReactAppProvider {
var shouldOpenInLastApp = false
var hasHandledLaunchAppWithOptions = false

override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {

MendixAppDelegate.application(application, didFinishLaunchingWithOptions: launchOptions)
setupApp(application: application, launchOptions: launchOptions)
Expand All @@ -29,7 +29,7 @@ class AppDelegate: ReactAppProvider {
#endif
}

override func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
override func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {

let handled = MendixAppDelegate.application(app, openURL: url, options: options)

Expand All @@ -47,8 +47,8 @@ class AppDelegate: ReactAppProvider {
)

let launchOptions = NSMutableDictionary(dictionary: options)
launchOptions[UIApplicationLaunchOptionsKey.url] = url
launchOptions[UIApplicationOpenURLOptionsKey.annotation] = options[UIApplicationOpenURLOptionsKey.annotation]
launchOptions[UIApplication.LaunchOptionsKey.url] = url
launchOptions[UIApplication.OpenURLOptionsKey.annotation] = options[UIApplication.OpenURLOptionsKey.annotation]

let mxApp = MendixApp.init(
identifier: nil,
Expand Down
1 change: 1 addition & 0 deletions ios/Dev/Config/config.release.xcconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#include "Pods/Target Support Files/Pods-dev/Pods-dev.release.xcconfig"
#include "Pods/Target Support Files/Pods-dev/Pods-dev.releasedevapp.xcconfig"
#include "config.xcconfig"
20 changes: 10 additions & 10 deletions ios/Dev/LaunchApp/LaunchAppViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class LaunchAppViewController: UIViewController, QRViewDelegate {

textField.layer.cornerRadius = 30
if let placeHolderText = textField.placeholder {
textField.attributedPlaceholder = NSAttributedString(string: placeHolderText, attributes: [NSAttributedStringKey.foregroundColor: UIColor.lightGray])
textField.attributedPlaceholder = NSAttributedString(string: placeHolderText, attributes: [NSAttributedString.Key.foregroundColor: UIColor.lightGray])
}
}

Expand Down Expand Up @@ -163,22 +163,22 @@ extension LaunchAppViewController {
}

private func registerNotificationObservers() {
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: .UIKeyboardWillShow, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: .UIKeyboardWillHide, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(deviceRotated), name: .UIDeviceOrientationDidChange, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: UIResponder.keyboardWillHideNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(deviceRotated), name: UIDevice.orientationDidChangeNotification, object: nil)
}

private func unregisterNotificationObservers() {
NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillShow, object: nil)
NotificationCenter.default.removeObserver(self, name: .UIKeyboardWillHide, object: nil)
NotificationCenter.default.removeObserver(self, name: .UIDeviceOrientationDidChange, object: self)
NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UIResponder.keyboardWillHideNotification, object: nil)
NotificationCenter.default.removeObserver(self, name: UIDevice.orientationDidChangeNotification, object: nil)
}

@objc func keyboardWillShow(_ notification: Notification) {
keyboardShowTask?.cancel()
keyboardShowTask = DispatchWorkItem {
if let keyboardRect = notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? CGRect {
let duration = notification.userInfo?[UIKeyboardAnimationDurationUserInfoKey] as? Double
if let keyboardRect = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect {
let duration = notification.userInfo?[UIResponder.keyboardAnimationDurationUserInfoKey] as? Double
self.view.frame.size.height = UIScreen.main.bounds.height - keyboardRect.height
self.qrView.stopScanning()
self.qrView.layer.opacity = 0
Expand All @@ -191,7 +191,7 @@ extension LaunchAppViewController {
}

@objc func keyboardWillHide(_ notification: Notification) {
let duration = notification.userInfo?[UIKeyboardAnimationDurationUserInfoKey] as? Double
let duration = notification.userInfo?[UIResponder.keyboardAnimationDurationUserInfoKey] as? Double
view.frame.size.height = UIScreen.main.bounds.height
self.qrView.startScanning()
self.qrView.layer.opacity = 1
Expand Down
2 changes: 1 addition & 1 deletion ios/Dev/LaunchApp/QRMaskView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class QRMaskView: UIView {
let path = UIBezierPath(roundedRect: userRect!, cornerRadius: 20)
let multiplier = CGFloat(3)
path.append(UIBezierPath(rect: CGRect(x: 0 - self.bounds.width, y: 0 - self.bounds.height, width: self.bounds.width * multiplier, height: self.bounds.height * multiplier)))
mask.fillRule = kCAFillRuleEvenOdd
mask.fillRule = .evenOdd
mask.path = path.cgPath
self.layer.mask = mask
}
Expand Down
2 changes: 1 addition & 1 deletion ios/Dev/LaunchApp/QRView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Foundation
import AVFoundation
import UIKit

@objc protocol QRViewDelegate: class {
@objc protocol QRViewDelegate: AnyObject {
@objc optional func qrScanningFailed()
@objc optional func qrScanningSucceeded(_ str: String?)
@objc optional func qrScanningStopped()
Expand Down
18 changes: 12 additions & 6 deletions ios/Dev/MendixApp/MendixAppViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,24 @@ class MendixAppViewController: UIViewController, ReactNativeDelegate {
ReactNative.shared.start()
}

override var preferredStatusBarStyle: UIStatusBarStyle {
return isAppeared ? .darkContent : .lightContent
}

private var isAppeared = false {
didSet {
setNeedsStatusBarAppearanceUpdate()
}
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
if #available(iOS 13.0, *) {
UIApplication.shared.statusBarStyle = .darkContent
} else {
UIApplication.shared.statusBarStyle = .default
}
isAppeared = true
}

override func viewWillDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
UIApplication.shared.statusBarStyle = .lightContent
isAppeared = false
}

func onAppClosed() {
Expand Down
2 changes: 1 addition & 1 deletion ios/Dev/MendixApp/MendixReactWindowExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extension MendixReactWindow {
return true
}

open override func motionEnded(_ motion: UIEventSubtype, with event: UIEvent?) {
open override func motionEnded(_ motion: UIEvent.EventSubtype, with event: UIEvent?) {
if (motion == .motionShake && ReactAppProvider.isReactAppActive()) {
DevHelper.showAppMenu();
}
Expand Down
19 changes: 0 additions & 19 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,6 @@ post_install do |installer|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] |= ['$(inherited)', "DEBUG=1"]
end
end
# Specify 'Swift Version: 5.0' for resolving archieve errors.
if target.name == 'react-native-video' || target.name == 'MendixNative'
config.build_settings['SWIFT_VERSION'] = '5.0'
end
if target.name == 'VisionCamera'
config.build_settings['SWIFT_VERSION'] = '5.2'
end
end
end

# Ensure deployment_target is set correctly for all projects
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
end
end
project.build_configurations.each do |bc|
bc.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = deployment_target
end
end
end
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2551,7 +2551,7 @@ SPEC CHECKSUMS:
MendixNative: a55e00448d33a66d59bd4b5c5d3057123d34337c
op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855
OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2
RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
RCTDeprecation: be794de7dc6ed8f9f7fbf525f86e7651b8b68746
RCTRequired: a83787b092ec554c2eb6019ff3f5b8d125472b3b
RCTTypeSafety: 48ad3c858926b1c46f46a81a58822b476e178e2c
Expand Down Expand Up @@ -2636,6 +2636,6 @@ SPEC CHECKSUMS:
SSZipArchive: 8a6ee5677c8e304bebc109e39cf0da91ccef22ea
Yoga: e14bad835e12b6c7e2260fc320bd00e0f4b45add

PODFILE CHECKSUM: 532b439839464076449499a1a589dce62fdeb5e5
PODFILE CHECKSUM: b234d1af9b2f93d0707d97b1f37c0fbb8e2cfcb8

COCOAPODS: 1.16.2
Loading