Post

Replies

Boosts

Views

Activity

I can't see a property on Safari after add an script on WKWebView
After insert this script I can't see the property window.app.isNative = true on Safari, What I'm missing here? Thanks in advance userContentController.addUserScript(WKUserScript(source: """function() { if (!window.app) { window.app = {}; } window.app.isAndroid = false; window.app.isIOS = true; window.app.isNative = true; originWhitelist={['*']} } """, injectionTime: .atDocumentStart, forMainFrameOnly: true))
0
0
675
Mar ’24
How to share image and text on Linkedin or Whassap using UIActivityViewController?
Hi team, using this implementation : @objc func shareImage(_ base64: String, title: String) { if let image = base64.imageFromBase64 { DispatchQueue.main.async { guard let appDelegate = UIApplication.shared.windows.first?.rootViewController else { return } let dataToShare = [title , image] as [Any] let activityViewController = UIActivityViewController(activityItems: dataToShare, applicationActivities: nil) activityViewController.excludedActivityTypes = [UIActivity.ActivityType.airDrop] if let popoverController = activityViewController.popoverPresentationController { popoverController.sourceRect = CGRect(x: UIScreen.main.bounds.width / 2, y: UIScreen.main.bounds.height / 2, width: 0, height: 0) popoverController.sourceView = appDelegate.view popoverController.permittedArrowDirections = UIPopoverArrowDirection(rawValue: 0) } appDelegate.present(activityViewController, animated: true, completion: nil) } } } I only share a text without an image. Should I need to add something on this implementation. I can confirm this implementation can share text and image on Facebook, Instagram, Telegram. Thanks in advance.
1
0
687
Jul ’23
The certificate for this server is invalid
Hi Team, I had this error. What should I check to be sure the certificate is ok. Could you please recommend a block or book or tutorial that help me to understand how the certificate in iOS works. Thanks in advance. <1> HTTP load failed, 0/0 bytes (error code: -1202 [3:-9813]) 2023-06-23 15:45:32.476192-0300 xxxx simu[50709:4219288] Task <05DCEFE2-BFB2-44EC-B2EB-F79D8DCFCF75>.<1> finished with error [-1202] Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “xxxx..com.ar” which could put your confidential information at risk." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=( "<cert(0x10b165600) s:xxxx..com.ar i: CA NoProd Intermedia xxxx xxxx>", "<cert(0x10b181400) s: CA NoProd Intermedia *** xxxx i: Root CA xxxx xxxx>", "<cert(0x10b028c00) s: Root CA *** xxxx i: Root CA xxxx xxxx>" ), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://hofficetoken.bancogalicia.com.ar/detect/public/registration/mobileServices.htm?code=6TMLTI5S, NSErrorFailingURLStringKey=https://xxxx.***.com.ar/detect/public/registration/mobileServices.htm?code=xxxxx, NSUnderlyingError=0x283d67930 {Error Domain=kCFErrorDomainCFNetwork Code=-1202 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x280376bc0>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9813, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9813, kCFStreamPropertySSLPeerCertificates=( "<cert(0x10b165600) s: xxxx.***.com.ar i: CA NoProd Intermedia xx xx>", "<cert(0x10b181400) s: CA NoProd Intermedia *** *** i: Root CA *** ***>", "<cert(0x10b028c00) s: Root CA xxxx xxxx i: Root CA xxxx xxxx>"
1
0
1.2k
Jun ’23
How to change StatusBar color in iOS 15
Hi Team, Im trying to change the statusBar color using override var preferredStatusBarStyle: UIStatusBarStyle {       return .lightContent } and setNeedsStatusBarAppearanceUpdate() but its not working on iOS 15. What I need to do to change the color using swift? Thanks In advance. Guillermo
0
0
454
Dec ’21
What are the steps to load crashlog using LLDB
I'm studying iOS crash analysis. Now, I need to import crashlog files into LLDB. As WWDC18 Session 414 said, I now have a copy of myApp, dSYM, ***.crash. Run the following command in a folder that I created:$ lldb(lldb) command script import lldb.macosx.crashlog(lldb) crashlog /xxxx.crashHowever, the stack trace file is not available and there is only a lot of error like:error: unable to locate any executables from the crash logDid I use it wrong? What is the correct stepts?Thanks in advance. For any question please just let me know.
1
0
2.0k
May ’19