Category "swift"

CVBuffer is nil in call back of h264 decoder

When i try to decode the raw h264 stream , CVBuffer gives me nil on callback, and this only happen on the real device(iPhone , iPad) and not on the simulator. A

Add tooltip pointer in Swift iOS

On button click, I want to create tooltip. and now I am getting a rectangle. How do I add a pointer as below image? Expected: Current: Following is the co

Check if iCloud has two-factor authentication? Swift/iOS

Is there a way to check if a user's iCloud account has two-factor authentication enabled? I am adding iCloud functionality to my app using CloudKit and for add

iOS - Make WhatsApp voice/video call programmatically from my application

I have a requirement to make WhatsApp calls from my application. When I click the mobile number in my app then it should redirect to WhatsApp and initiate voice

Swift 4.2) Mutate array of struct with for_in/forEach vs. access by index

I am trying to modify struct element in array. I found that you can do that by accessing(iterate) the struct by index, but you can't if you use 'for in' loop or

Rectangle progress bar swiftUI

Hey does someone know how can I create rectangle progress bar in swiftUI? Something like this? https://i.stack.imgur.com/CMwB3.gif I have tried this: struct

Swift 5.5 Concurrency: how to serialize async Tasks to replace an OperationQueue with maxConcurrentOperationCount = 1?

I’m currently migrating my app to use the concurrency model in Swift. I want to serialize Tasks to make sure they are executed one after the other (no par

Swift: What's the best way to pair up elements of an Array

I came across a problem that required iterating over an array in pairs. What's the best way to do this? Or, as an alternative, what's the best way of transformi

How do I show downloaded videos in iOS Storage settings

I've created a streaming video app that also downloads videos locally. How can I display downloaded videos in the iPhone/iPad Storage sections of settings? I'm

Swift Package Manager dependencies won't build: "Showing All Errors Only Command CompileSwiftSources failed with a nonzero exit code"

For some reason whenever I try to update my dependencies through SPM I get build errors. Others on my team can fetch fine, for some reason I have a hexed machin

SceneKit Custom Geometry Shape not showing up

I am pretty new to Swift, and SceneKit, and my current problem is that the custom shape I am trying to create is not showing up, even though the primitive shape

Get Shape for view dynamically in SwiftUI

Using Swift 5.2 I would like to create a function to dynamically change the Shape I have a view like import SwiftUI struct CardView: View { let suit : S

Swift 3: How to add watermark on video ? AVVideoCompositionCoreAnimationTool iOS 10 issue

This code used to work on iOS9 to add a watermark and text to a video but since iOS10 it's not working anymore. There is a iOS 10 bug that has been filed but no

SwiftUI DatePicker breaks sheet dismiss?

Scenario: RootScreen presents DateScreen modally though .sheet DateScreen has a DatePicker with CompactDatePickerStyle() and a button to dismiss the modal User

How to use camera in background in iOS

I need to use the camera in background mode for continuous taking images.but as per apple documentation, we could not use the camera in background mode. Is ther

unable to align multiple controls in SwiftUI

I'm trying to align controls as shown in "Storyboard" pic using the SwiftUI but not sure why still there is distance between segment control and search-Bar, and

How do you cluster annotations with v10 of the MapBox iOS SDK?

How is clustering done with v10 of the Mapbox iOS SDK? And can I use ViewAnnotations to show custom views for clusters? In short, I am trying to cluster annotat

Swipe to delete function

using my code below how can I swipe right to left on a Task to have an option to be able to delete it. I have tried using .SwipeAction but have gotten no luck w

SwiftUI - how to avoid navigation hardcoded into the view?

I try to do the architecture for a bigger, production ready SwiftUI App. I am running all the time into the same problem which points to a major design flaw in

How to apply a context menu to buttons in a SwiftUI list row?

When I'm long-pressing on a button in list row, all of context menus for all buttons are shown. It looks like the whole list row is selected. How can I make it