Category "swift"

How to fix "Invalid API key format" while implement the comet-chat in iOS

The problem is that when I am going to initialize the comet-chat then they generate the error like - "Terminating app due to uncaught exception 'NSInvalidA

RealityKit – Getting runtime warning when placing a model in ARView

I get the following warning during runtime when I tap to load the model in ARView: Warning (secondary thread): in AppendProperty at line 859 of sdf/path.cpp --

How to implement a regex for password validation in Swift?

I want to implement a regex validaton for passwords in Swift? I have tried the following regex, but not successful ([(0-9)(A-Z)(!@#$%ˆ&*+-=<>)]+

How to change the color of `color set` programmatically in iOS?

There is any way to change the color of color set programmatically. I use theme color in Xcode and now I want this color come from API. Anyone can solve my

iOS constraints doesn't allow to use multiplier

I am trying to layout some custom views and when I try to activate the constraints, Xcode says that I can't use multiplier. Here is an example of the code: cla

Firebase Storage Error - FIRStorageErrorDomain Code=-13021 "User does not have permission to access"

Im having a problem Iv been dealing with for a while. Basically im trying to grab images from Firebase Storage into my UICollectionView. When i segue to that V

onDelete causing NSRangeException

In this app, there is a main screen (WorkoutScreen) that displays the contents of a list one at a time as it iterates through the list (current workout in a lis

No such module 'FirebaseFirestore'

Trying to build my app but can't it always gives me problems with FirebaseFirestore. It seems to recognize FirebaseStorage and Firebase fine but not FireStore.

Big configuration object as a parameter in Swift?

In JavaScript/TypeScript, we have this pattern that is often used in libraries where you have one optional parameter as the last function argument which default

Swift: Triggering sound effects during a timer

I've created a super simple count down application. You press a button, and the count down runs. The end result calculating looks like this: 10.0 9.999 9.998 .

Lazy initialisation and retain cycle

While using lazy initialisers, is there a chance of having retain cycles? In a blog post and many other places [unowned self] is seen class Person { var

LottieAnimationView size won't change/is too small (iOS/Swift)

Whether the view I'm creating is a LOTAnimatedSwitch or View, the image of the animation always appears very small. The lottie animation doesn't take up the siz

MEMixerChannel.cpp:1577 Spatialization not supported on this platform (err=-4)

I'm playing a sound in my watch only app, but every time the sound plays the debugger shows an error: "MEMixerChannel.cpp:1577 Spatialization not supported on

MEMixerChannel.cpp:1577 Spatialization not supported on this platform (err=-4)

I'm playing a sound in my watch only app, but every time the sound plays the debugger shows an error: "MEMixerChannel.cpp:1577 Spatialization not supported on

Swift Combine HTTP request

Trying to figure out how to make quick http requests using combine. I've mostly been looking at this doc by Apple. I haven't made any progress though and it see

SwiftUI TabBar: Action for tapping TabItem of currently selected Tab to reset view

The app I am working on is based around a TabBar, and when I am on a tab I want to be able to click the tabItem again to reset the view, similar to how Twitter

How to use environment map in ARKit?

ARKit 2.0 added a new class named AREnvironmentProbeAnchor. Reading it's instructions, it seems that ARKit can automatically collect environment texture (cubema

Pass data from ViewController to Representable SwiftUI

I am doing an object detection and used UIViewControllerRepresentable to add my view controller. The thing is that I can't pass data from my ViewController to m

Adding 3D object to ARGeoAnchor

Please forgive me if this question is not that great. I've hit a bit of a road block on Apple's documentation of ARGeoAnchor. Currently ARGeoAnchor just shows a

A Swift protocol requirement that can only be satisfied by using a final class

I'm modeling a owner/ownee scheme on Swift: class Owner<T: Ownee> { // ... } protocol Ownee { var owner: Owner<Self> { get } } Then I h