Unable to build Xcode project in iOS simulator
I wrote an app for visionOS and I decided I want to add iOS and iPadOS support for the app. I added iPad and iPhone for supported destinations, but when I try to build it via the iPhone or iPad…
I wrote an app for visionOS and I decided I want to add iOS and iPadOS support for the app. I added iPad and iPhone for supported destinations, but when I try to build it via the iPhone or iPad…
extension UIViewController { static func takeScreenshot() -> UIImage? { guard let topController = UIApplication.getTopController() else { return nil } if let view = topController.view { UIGraphicsBeginImageContextWithOptions(view.bounds.size, false, UIScreen.main.scale) defer { UIGraphicsEndImageContext() } if let context = UIGraphicsGetCurrentContext() { view.layer.render(in: context)…
I have been messing with this code for a while. My UIViews are not showing up after looping through. I have tried this with out constraints, and the result was each of the UIViews were being rendered on top of…
I'm trying to schedule local notifications on only weekdays, between the 8am to 5pm. Need to trigger a local notification on given time interval. func scheduleNotifications(timeInterval: Int) { let notificationCenter = UNUserNotificationCenter.current() notificationCenter.removeAllDeliveredNotifications() notificationCenter.removeAllPendingNotificationRequests() let startHour = 8 let totalHours…
I was exploring if-case-let statements that work with Result type and do not want to use switch-case for this Consider the following code: import Foundation enum CustomError: Error { case missingData } func somethingThatMightReturnError() -> Result<Data,CustomError> { .failure(.missingData) } func…
I have a string with URLs inside and I show it like this: Text(LocalizedStringKey( "Multiple URLs here, such as https://stackoverflow.com" + " or https://www.google.com" )) The URLs are highlighted correctly and I can tap to open them, but I can't…
I've been having this issue for several days now. I've successfully moved my code base to a new MacBook (M1), removed all CocoaPods & swapped them out for Swift packages. All the code successfully compiles without issue now (Xcode 14.2…
I am getting this error right here after upgrading to XCode 15 with react native version 0.72.4 in Macbook M1: ld: warning: could not create compact unwind for _fa3d73c773a947d51: does not use RBP or RSP based frame ld: warning: Could…
I have a requirement where I have multiple struct conforming to protocol P, which I later make a collection of and execute methods like compute() via a Computer struct which helps in creating an instance of each conforming type Why…
The screens in my IOS device doesn't reload after clicking the back button. It works using PC and android devices. Is there specific reload code for IOS device? here is my code ``` <script> document.addEventListener("DOMContentLoaded", function() { var goBackButton =…