Category "swift"

UICollectionView compositional layout supplementary crash

I want to add separators on list-like collection view built with compositional layout. I know there is a solution in iOS 14, but I support iOS 13. I try to add

SceneKit – Two SCNFloor in a single scene

I have made two mirrors using SCNFloor in SceneKit. But when I run the code, only one of the two mirrors work randomly. Why is that so? Hope someone can enlight

self is not available in swift project

I am trying to run an image comparison in swift. However i am getting an error that states Cannot use instance member 'featureprintObservationForImage' within p

Parse external JSON using Firebase Functions

I just started using Firebase a couple of days ago for my mobile app, so I’m sorry if this might come off as a stupid question, I’m still learning :

View is not updated when the data is changed with ForEach

I want to change rate parameter and display in ForEach. // ViewModel.swift @MainActor final class ViewModel: ObservableObject { let serviceContainer: Servi

ITMS-90426: Invalid Swift Support

ITMS-90426: Invalid Swift Support, Dear Developer, We identified one or more issues with a recent delivery for your app, "KxSwift" 1.0.0 (58). Please correct t

Replaykit - Recording not starting Error- 5803

I want to start recording in my App, I am using ReplayKit func startRecordn(){ recorder.startRecording{ [unowned self] (error) in //2

How to dynamically create or delete a realm class in swift

When a user purchases a subscription they can download the data into Realm Class. Below we is a Realm for SubscriptionOne. However, if they later purchase Subsc

Why am i getting an error after resetting the default keychains

I keep on getting this error when i try to deploy my app onto my iPhone from Xcode. I tried a lot of the solutions on stack overflow but nothing seems to work.

Leading zeros cut from JSON response when using enum

Essentially I am using enum to account for instances where code is either and int or string - but it appears when the JSON value is simply an int with leading 0

Use also the option allow access to all photos in limited access dialog

I want to show the option to give access to all photos also in the limited photo library picker. I now go to the settings, but when returning to my app, it's ki

HLS player is not streaming

I have a stream url which is getting from server. The streaming url is working in android and web, but whenever I try to play that ham getting a black screen wi

Health Kit: How to set 'totalEnergyBurned' for workout?

Today I worked for the first time with Apple Health Kit and successfully saved a workout in Health with the basic informations (activityType, start and end). My

Why does SwiftUI View background extend into safe area?

Here's a view that navigates to a 2nd view: struct ContentView: View { var body: some View { NavigationView { NavigationLink {

My view doesn't update after modifying an object of a list inside an ObservableObject

I am new to SwiftUI. Imagine I am building an app for a shop. I have a view that is a list of the details of a product, and two buttons: Pin (add to favorites)

Access health sensors on Apple Watch

Can I access the health sensors of the apple watch? I want to get SpO2 measurements or heartbeat intervals when I start a measurement. Is this feasible? I can s

Passing All type of enum to a UIPicker ViewController

i wanted to built an picker ViewController, this vc requires an enum data that's inherit the CaseIterable protocol. Tried looking for it here Swift - Passing di

Xcode version 13.3.1: Update to recommended settings

I'm using the newest version of Xcode, version 13.3.1 (13E500a). Xcode currently shows a yellow warning sign Update to recommended settings. When I click on thi

Views at depth with root view - recursive?

I am trying to write a function to return all children of a view at a given depth : /// Write the body of the function `views(atDepth:withRootView:)` /// which

App works fine on device and simulator, but Apple review sends me this crash log

Here is the crash log Apple Review sent me. I've never had this issue previously, and it seems like the issue is coming from old code I've been using for months