Post not yet marked as solved
how to check the content present in the assets.car and unix executable file .ipa.
Post not yet marked as solved
Hi ,
I have a problem with observing call status in iPadOS 14.
callObserver:callChanged:
method not invoked when I initiate a cellular call from iPad ( using url as tel://). But same code working fine in iPhone - iOS 14.
My Code ,
import UIKit
import CallKit
class ViewController: UIViewController, CXCallObserverDelegate {
private lazy var callObserver = CXCallObserver()
override func viewDidLoad() {
super.viewDidLoad()
configureCallButton()
view.backgroundColor = .gray
self.callObserver.setDelegate(self, queue: nil)
// Do any additional setup after loading the view.
}
func configureCallButton() {
let button = UIButton(type: .system)
button.setTitle("Call", for: .normal)
let attStr = NSMutableAttributedString(string: "Call", attributes: [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 25), NSAttributedString.Key.foregroundColor: UIColor.blue]);
button.setAttributedTitle(attStr, for: .normal)
button.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(button)
button.centerXAnchor.constraint(equalTo: view.centerXAnchor).isActive = true
button.centerYAnchor.constraint(equalTo: view.centerYAnchor).isActive = true
button.addTarget(self, action: #selector(initiateCall), for: .touchUpInside)
}
@objc func initiateCall() {
if let url = URL(string: "tel://*********") {
UIApplication.shared.openURL(url)
}
}
func callObserver(_ callObserver: CXCallObserver, callChanged call: CXCall) {
if call.isOutgoing {
print("Call outgoing")
}
else if call.hasConnected {
print("Call has connected")
}
else if call.hasEnded {
print("Call has ended")
}
}
}
Note: Observer method invoked for FaceTime calls in iPadOS 14.( using url as facetime:// )
We check [UIApplication sharedApplication].keyWindow.traitCollection.forceTouchCapability = UIForceTouchCapabilityAvailable to find the 3D touch support. If supported we added shortcut items to the application.But in iPhone XR above check always return false. How to validate whether the device has supported Haptic Touch or not ?
Post not yet marked as solved
I used VNDocumentCameraViewController for scanning a document.Whenever open a scanned images and then click the 'Done' button ,application got crashed.Crash log:*** Assertion failure in -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3898.7/UIApplication.m:52372019-07-19 18:05:41.369581+0530 Doc-Scan Swift[398:76718] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.'