Category "swift"

Firestore query with inequality filters on multiple fields

I am building a calendar on IOS using Swift, with a Firestore back-end. I am retrieving all the events for each day in a month at one time. Currently I can only

SwiftUI Toolbar item getting clipped when back button is pressed

I've run in to a strange behavior in SwiftUI that I can't seem to work around. Given the following simple example app I experience this behavior: The toolbar it

Is there any way to load the GLTF file which is compressed by Draco?

I am looking for a way how to load the draco compressed .gltf on iOS. I am using GLTFSceneKit to render the gltf file which is exported by Blender. But if I com

Setting UIView.isAccessibleElement to true disables clicking of subview in voiceovermode

So I have a custom view controller that displays a dialog with a couple of buttons. When the view appears I want voiceover to read out some basic information d

Simple way to run SwiftLint for our Swift package

So far what I found is this blog article: It's time to use Swift Package Manager which recommends integrate SwiftLint and other tools with Package.swift. I was

Simple way to run SwiftLint for our Swift package

So far what I found is this blog article: It's time to use Swift Package Manager which recommends integrate SwiftLint and other tools with Package.swift. I was

How to animate collection view layout change while using `layoutAttributesForElements`?

I made a custom collection view flow layout that can toggle (with animation) between "film-strip" and "list" layouts. But after adding some fancy animations to

Re-authenticate with provider in Firebase and SwiftUI

I managed to re-authenticate the users with Apple, Facebook, Google, Email, and Phone in Firebase with SwiftUI, but when the users re-authenticate with Facebook

Add a xib file to a Swift Package

I want to start using modular code with the new Swift Package Manager integration with Xcode 11. The problem is that I can't seem to add any kind of UI files t

Unique Integer Value

I need a way to generate unique integer values in swift //string let g = NSUUID().UUIDString How can I accomplish the above in int format?

SwiftUI TextField doesn't commit change when tapping another TextField

I am building some basic form functionality in my app at the moment and I am having trouble with TextFields not changing the value in the relevant binded variab

Difference between creating ViewModifier and View extension in SwiftUI

I'm trying to find out what is practical difference between these two approaches. For example: struct PrimaryLabel: ViewModifier { func body(content: Conte

NSString.boundingRect fails with "[NSNull renderingMode]: unrecognized selector sent to instance" when specifying font

I'm trying to make a collection view where the cells just consist of a label, and I want the width of each cell to match the width of the text. In order to find

Swift: task {} before iOS 15?

I am following tutorials to understand SwiftUI, and specifically how to call an API when a view appears. I saw this: List(results, id: \.trackId) { item in

How to fix memory issues given by Instrument tools in Swift?

I have memory issues, especially for the error XPC connection interrupted The screen is freezing for a few seconds.. So, I've been learning how to use th

Detect if the active keyboard has a physical `Fn` key in Swift

I want to use the Fn modifier key if available, and if not, offer the user a different modifier. But only offer it to users without a Fn key. Some external keyb

UNNotificationRequest requires unique identifier, but fires on duplicates too

I call local Notifications like so let center = UNUserNotificationCenter.current() let content = UNMutableNotificationContent() content.title = title content.bo

Could not get GOOGLE_APP_ID in Google Services file from build environment

For setting up firebase i am using two config 1.GoogleService-Info-test.plist, 2.GoogleService-Info-prdn.plist for UAT and Production. For installing crashlytic

WheelDatePicker is invisible in iOS 15.0

I'm building an app in SwiftUI that needs DatePicker in the custom alert. Each time I use DatePicker with a WheelDatePickerStyle, it is invisible in IOS 15.0 (a

Could not find module for target 'x86_64-apple-ios-simulator'

I have my custom framework and it works properly in XCode 10. I rebuild it in XCode 11 beta 3, then integrated into the app, and get the following error: Could