Category "swift"

How to change toggle on just one Core Data item using ForEach in SwiftUI?

How to change just one toggle in a list without subviews? I know how to make it work if I extract Subview from everything inside ForEach, but how to do it on on

Gitlab CI-CD using Fastlane An error occurred while installing rake (13.0.6), and Bundler cannot continue

I am trying to integrate CI-CD using Fastlane all the lanes are working fine in my personal laptop but when I try to push it on my repo and after the job starts

Main thread blocking on scroll and Kingfisher setting the image

I've been running down slow scroll performance and I've noticed that when I scroll and setImage gets called with non-cached images, the performance lags while t

I am working on a VPN app which used Open VPN and I am not sure how to call the tunnel

I don't understand how does packet tunnel work and also don't understand where use packet tunnel in view controller. My .ovpn file is working fine but not conne

Save a PDF from a WKWebView

This questions pertains to macOS, not iOS. Note that this question is being reported as a duplicate of this question. The answers on that page pertain either t

Create Random Pixel Images in Swift

I want to create a random pixel generator in swift. How would I be able to create something like the below codes in swift? Java program to demonstrate creatio

NEHotspotConfigurationManager getting this alert:"Unable to join the network<name of network>" while error is nil

So i am trying to monitor the connection status by closers : func reconnect(success: @escaping () -> Void, failure: @escaping () -> Void) { let ma

prevent table view to scrolling top after insertRows

I have viewController with tableView inside it. this tableView has many sections and rows. when I try to add a new row in the last section using TableView.inse

NSDocumentController.openDocument not allowing selection of custom file type

I suspect this is a finicky configuration issue that I'm getting wrong with Document Type / UTI declarations in my Info.plist, but have tried several things and

NSUbiquitousKeyValueStore Unavailable on Watch OS 3.1.3

After unsuccessfully trying to get iCloud document storage to work on the watch Watchkit Extension Cannot Read from iCloud I tried to simply use the keystore.

Binding to an associated value of an enum

Is there a standard way to bind, say, a TextField to an associated value of an enum? So, given this: enum Choice { case one(String) case two(String) } C

Flip image vertically (Swift)

How to flip an UIImage vertically (up/down)? This is a question that is asked before... Flip UIImage Along Either Axis How to flip UIImage horizontally? How to

Enum of structs in Swift 3.0

I am trying to create an enum of a struct that I would like to initialize: struct CustomStruct { var variable1: String var variable2: AnyClass var

The data from Firestore database is not displayed in the tableview

I'm using Swift and Firestore database to implement an app like Twitter. I want to add sweet (it's like tweet) when button is clicked to the database. And then

Xcode10 - dyld: Library not loaded for pod installed in framework

I have a project with target frameworks. MainAppTarget FrameworkA FrameworkA is the only one to use a certain pod, hence in my pod file I have something like

Cannot find type 'ASAuthorizationControllerDelegate' in scope when archiving

macOS Monterrey 12.0.1 (21A559) Xcode 13.3.1 (13E500a) iOS app deployment target 10.0 I have been working with this app for a few years now, when the Apple auth

CoreLocation - significant change

Is it possible to use more than one coreLocation service at the same time? For example, significantLocationChange and visits together

WKWebView - Update HTML Tags from SwiftUI TextFields

In my SwiftUI App, i used a WKWebView to update some html tags from native side, using SwiftUI TextFields and a TextEditor. To get the communication working, i

"Unexpected token stripe" when trying to deploy Firebase Functions

I'm trying to incorporate Stripe into an iOS app using Firebase Functions. I'm following the Stripe documentation for "Accepting a payment" in Swift with Node b

Positioning SKTileMapNode in Swift Spritekit

I tried to position the Tile Map so that the bottom left of it is attached to the bottom left of the screen. Below is the code i tried to use: func setUpSceneW