Xcode Swift 5 MacOs app empty window when archived but works when running it from Xcode - swift

I am building an app for Mac which logs into a website based on login and password collected from textfield and secure text field, then app opens an url which is created in my app based on date range selection with use of two date picker cell calendars. Next app displays html data in webWiev (using WKWebView), converts html to string using extension NSAttributedString and then saves retrieved data as txt file. Everything works as expected as long as app is run from Xcode "play" button. Problem is if I archive this app and launch it, it will bring up an empty window without any button, calendar or textfield. There are no errors, no crash logs on organizer, nothing.
I decided to perform a little test. I build another view controller with only one button which upon clicking will show my app main view controller. After archiving this modified app and running it outside of Xcode a window shows view controller with one button which is correct. But after clicking it nothing happens. App works great if running "inside" Xcode, a pushbutton shows main ViewController correctly. Do You have any clue what can be wrong? thank You!
Edit 1. So I found a discussion on apple which mention this problem. It is associated with IB WKWebView and problem is already known since some time. Now I have to get around the problem. Apple forum link: https://forums.developer.apple.com/thread/116047

Did you embed WebKit.framework to your app?
After comment that I wrote, I founded a solution and solved with this method.
Please check it out.

Related

Flutter Firebase DebugView not sending events

Initially the person before me set up a screen observer so that whenever the page changes, setCurrentScreen is triggered to send a event and log the screen. Because we use a bunch of open containers to animate page opening, the screen observer doesnt get triggered. So I went through the app and added some setCurrentScreen for those that the screenObserver missed, and while there I also added some logEvents to see if people are using specific parts of the app.
The way I set enabled debug view was in xcode, going to Product -> Scheme -> Edit Scheme and adding -FIRAnalyticsDebugEnabled and -FIRDebugEnabled Edit scheme
After ticking both of the above (or just one or the other), only these events are being triggered then the app stops sending events. Completely. What am I missing? output
I cannot find another issue about this. I am using the same package name in the app and firebase, otherwise I would have no output. All other issues are talking about no output at all. I have tried to do this on simulator and on actual iPhone and they both yield the same result. I have also set up a android emulator and have an actual phone. Tried it on both and same result. The above screenshot is from iPhone as I am on Mac and more comfortable working on a iPhone.
i have set IS_ANALYTICS_ENABLED to true in the .plist file and this did not work

MacOS SDL application, hide titlebar in appleID login prompt

I have a MacOS application written in Swift, which launches an SDL application under the hood. The software has a "login with AppleID" feature. However, when the user is prompted to login, the popup has a nasty titlebar attached to it, with "Window" in the title. See attached screenshot. Is there any way I can remove this?
I suspect this has to do with the SDL app not being set up properly. In case I am wrong though, on the second screenshot you can see the structure of the Swift UI components of the wrapper app. Here I correctly named the application, tried setting the ViewController title, tried changing calling NSApplication.shared.mainWindow?.title = "" in the AppDelegate, nothing seems to have any effect.

Resetting iPhone Application

I have an application that is currently named "xxxx". The app runs and works perfectly without any problems. However, I have reached a stumbling point. When I try to load the application onto my iPhone, the pictures on my picker view seemed to have disappeared for some strange reason. I've done multiple hours of debugging and everything checks out normal. I then decided I wanted to change the product name from "xxxx" to "xxxx Redo". As soon as I did that, the application loaded perfectly normal (with the pictures in the Picker View as it should be).
In conclusion, it comes to find out that there is no actual bug in the programming aspect of it. However, my question comes up as to why does it not load the correct way with the original product name but then loads the right way when the product name is changed?
The second part of my question is if anyone knows of a way to fix the original application so that way it displays correctly again with the original name?
I have tried the following:
Cleaning the app
Trashing the .app file and rebuilding
Deleting the app on the iPhone and rebuilding.
These things sometimes just happen, you can try the following extra steps:
clean build folder in XCode (press alt while clicking Product menu)
reboot the phone (poweroff/poweron)
I have seen cases where it made a difference.

mobile web app - keyboard not appearing

I have a mobile web application, working well on simulator 5.1/6.0, xcode 4.5 for iphone.
But when I test on a real device (3gs, ios 5.1), I get a strange behavior: anywhere I place an input field html element, where I need the user to fill in something, I tap the field, it gains focus (I see the cursor), but the touch-keyboard does not come up and I can't type anything. If I try it on the sim, all is fine, the kb comes up.
I am not sure how to diagnose this... tried googling for some answers, haven't found any :(
any ideas?
thanks...
ok found the issue, seems like the app was not created using the latest Xcode template (it is a legacy app), so I removed the MainWindowxxx.xibs which I don't need, and used the code from a new XCode app template to initialize the app by programmatically creating the main view controller, and setting it as the window's rootViewController. And, of course, call [self.window makeKeyAndVisible]

SA_OAuthTwitterEngine login keyboard doesn't show after first launch

I'm using the SA_OAuthTwitterEngine to integrate Twitter into on of my iPhone apps. Loggin in and sending tweets are working fine. But, when I completely terminate my app so it will start up from the beginning, I can't login again using the SA_OAuthTwitterController because the keyboard will not show up. The input field also doesn't respond to the Mac keyboard when using the simulator.
I've searched for similar problems, but they don't help me out. I've found a lot of similar problems, where calling makeKeyAndVisible for the app delegate window solved it. This doesn't work for me. If I set the modalview's alpha to .2, I also don't see the keyboard behind the view controller.
Weirdest thing is that everything works after a fresh reinstall for as many times as I want, but after I've terminated the app, the keyboard doesn't show op anymore.
Can anyone point me in the right direction?
Thanks in advance!