Category "swift"

Execution of combined Booleans in swift

I'm having a question about a computed property where I'm using a combination of computed Booleans to get a result. I understand the logic behind the code, but

Xcode swift iOS project gives "usr/bin/python no such file or directory" error when try to build project

I am experiencing the problem after the macOS 12.3 Monterey update. I get the following error when I want to run the project. There is a code looking for "/usr/

Am unable to receive HTTP responses with UIViewController set as URLSessionDelegate

Wed 5/18 Additional Info added at Step 5 I am able to create a URLSesion, build a request with a file to upload and successfully call it from my app. On my serv

Xcode randomly modifies my schemes content

Whenever I switch branch or trigger a build, I'm getting my xschemes modified by Xcode, it seemed to happens since the last OS version. My schemes are shared am

How to rotate the Drag&Drop preview in Swift

I have a problem rotating the preview when I drag a button. In this project I drag a button that represents a street that you can rotate, so when the user rotat

Understanding MetricKit...didRecieve?

I recently added MetricKit to my app, and I've done the research and think I understand how this works by using the documentation example. I've added the Metri

Is there a way in SwiftUI to transport and handle data from an property to the class?

I have two classes here. Music which is used to store music url and load metadata, and MusicManager which is used to store a list of music and sort them after l

How to open google map links on apple map in wkwebview Swift?

I have an application and i am working with WKWebView. In WkWebView i have "get directions" links. When i press the "get directions" link, it must open a map. B

Auto flash on/off behaving weird with ambientIntensity of ARKit

I've implemented auto flash on-off using ARKit because I'm using ARKit on the same screen. Implementation: func session(_ session: ARSession, didUpdate frame: A

3D point cloud from AVDepthData / CVPixelBuffer iOS

i'm new to iOS development so apologies if this is something basic. I want to create a point cloud having [x, y, z, r, g, b] values using the AVDepthData / CVPi

How to test receipt when Migrating iOS app from Paid to Freemium/Free in SwiftUI

I'm planning to update my app from a Paid app to a Free app with possible IAPs. I've come across the Receipt Validation, but I'm finding it very confusing. All

Change userLocation puck color using MapBox v10

I’m working on migrating my MapBox version from v6.4 to v10. I have been able to migrate almost everything, only issue I have at the moment is changing th

Instance member '....' cannot be used on type 'CustomTextField'; did you mean to use a value of this type instead?

I want to change the 'leftIcon' variable in the CustomTextField class from the ViewController. however, I get the following error in the CustomTextField class.

Conditional cast always succeed in swift dict

Hello I have a little problem. I am triying to build a swift dictionnary that will later be translated to json for a network code. A simpliflied version of the

How to draw polyline over map in apple watchOS

We have tried with apple map but apple map SDK does not allow us to draw polyline over the map so we have seen one application that is doing a similar thing usi

Swift await/async - how to wait synchronously for an async task to complete?

I'm bridging the sync/async worlds in Swift and doing incremental adoption of async/await. I'm trying to invoke an async function that returns a value from a n

Error 'cannot find type 'UIHostingController' in scope'

Why could a distribution build be failed with SwiftUI? I added SwiftUI into my iOS 10+ project, and build it locally with @available(iOS 13.0, *) prefix, but wh

Core data creates keeps populating with default values and doesn't save on close

I am fairly new to core data. I am trying to make a form where each time I add a section header and text from a sheet view, it appears within a new section. The

Cmd+B in UIKeyComands not displaying first typed "b" afetr using the command - swift

I'm using UIKeyCommands - Cmd+B to bold text. The code works fine to bold the text. But after i use the Cmd+B and when I type "b" the first time it doesn't disp

Cmd+B in UIKeyComands not displaying first typed "b" afetr using the command - swift

I'm using UIKeyCommands - Cmd+B to bold text. The code works fine to bold the text. But after i use the Cmd+B and when I type "b" the first time it doesn't disp