id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_64624261 | stackoverflow | MOBILE_DEVELOPMENT | How can I change the "About View" in a macOS app | How can I change the "About View" in a macOS app
I am building a macOS-app using SwiftUI and the new App lifecycle.
I would love to change the contents of the "About Window" (that appears when you tap "About DemoApp" in the apps’ menu) but have no idea how:
How can I replace the About view with a custom one... | https://stackoverflow.com/questions/64624261/how-can-i-change-the-about-view-in-a-macos-app | swift, swiftui, menuitem, nsmenu, about-box | 1,604,163,337 |
se_79995564 | stackoverflow | MOBILE_DEVELOPMENT | Solving Liquid glass problems in UIToolbar | Solving Liquid glass problems in UIToolbar
I add a series of buttons in the UIToolbar of accessoryView.
Before liquidGlass (Xcode 26.6, iOS 26), I get this:
Buttons are properly stacked, allowing up to 8 buttons, which is what I need.
But with liquidGlass, buttons are now enclosed in a useless bubble, and thus take m... | https://stackoverflow.com/questions/79995564/solving-liquid-glass-problems-in-uitoolbar | swift, uikit, uitoolbar, liquid-glass | 1,786,883,939 |
se_45291536 | stackoverflow | MOBILE_DEVELOPMENT | How do you show a NSStatusBar item AND hide the dock icon? | How do you show a NSStatusBar item AND hide the dock icon?
I've tried setting "Application is Agent" to 1 but the status bar item disappears. When set to 0 both the status bar item and dock icon are showing. How do I show the status bar item but hide the dock icon?
I've tried the following in both awakeFromNib() and... | https://stackoverflow.com/questions/45291536/how-do-you-show-a-nsstatusbar-item-and-hide-the-dock-icon | swift, xcode, macos, user-interface, cocoa | 1,500,938,287 |
se_79993964 | stackoverflow | MOBILE_DEVELOPMENT | StoreKit 2 Sandbox: transaction.finish() logs requestEncodeFailed and replays subscription renewals on every launch | StoreKit 2 Sandbox: transaction.finish() logs requestEncodeFailed and replays subscription renewals on every launch
I’m testing an auto-renewable subscription using StoreKit 2 on a physical iOS device with a Sandbox account.
A fresh purchase succeeds, Transaction.currentEntitlements contains an active transaction, and... | https://stackoverflow.com/questions/79993964/storekit-2-sandbox-transaction-finish-logs-requestencodefailed-and-replays-su | swift, xcode, swiftui, storekit | 1,786,669,252 |
se_59025216 | stackoverflow | MOBILE_DEVELOPMENT | Disable button selection if scrolling within ScrollView | Disable button selection if scrolling within ScrollView
I'm in a pickle with SwiftUI to where I have a vertical ScrollView consisting of buttons stacked vertically. When I start scrolling, there's two outcomes:
If I started scrolling when my finger was on the button, when the scroll stops, the button action fires.
If... | https://stackoverflow.com/questions/59025216/disable-button-selection-if-scrolling-within-scrollview | swift, swiftui, scrollview, gesture | 1,574,655,797 |
se_47365906 | stackoverflow | MOBILE_DEVELOPMENT | How to compare doubles to another? | How to compare doubles to another?
I have 3 Doubles, their values are random, and I am trying to achieve a comparison between them
My code is
let double1 = 10.00 // Notes: they're all random between 1-100 so I don't know what this will be
let double2 = 7.66
let double3 = 6.43
I tried
if (double1?.isLess(than: 50.0))!... | https://stackoverflow.com/questions/47365906/how-to-compare-doubles-to-another | swift, max, swift4 | 1,511,007,019 |
se_79993911 | stackoverflow | MOBILE_DEVELOPMENT | Can you select all text in a SwiftUI TextField populated with a NumberFormatter on entering it? | Can you select all text in a SwiftUI TextField populated with a NumberFormatter on entering it?
I have a sheet in my application that collects various input values from the user. I have an enum for the current focus:
enum FocusedField {
case name
case width
case height
case multipli... | https://stackoverflow.com/questions/79993911/can-you-select-all-text-in-a-swiftui-textfield-populated-with-a-numberformatter | swift, swiftui, textfield, nsnumberformatter | 1,786,646,594 |
se_79993931 | stackoverflow | MOBILE_DEVELOPMENT | Is there a way to set the userInterfaceStyle of menus displayed by UIMainMenuSystem? | Is there a way to set the userInterfaceStyle of menus displayed by UIMainMenuSystem?
Nowadays iPadOS apps must have a menu structure, normally generated by UIMainMenuSystem.shared.setBuildConfiguration().
My app is themeable, and uses window.overrideUserInterfaceStyle to set the userInterfaceStyle independently from t... | https://stackoverflow.com/questions/79993931/is-there-a-way-to-set-the-userinterfacestyle-of-menus-displayed-by-uimainmenusys | swift, uikit, uimenucontroller, uimenu | 1,786,652,189 |
se_79555568 | stackoverflow | MOBILE_DEVELOPMENT | How to read/write to a folder from the iOS Files app across app restarts | How to read/write to a folder from the iOS Files app across app restarts
I'm developing a SwiftUI app that has to sync files to a folder in Dropbox, Google Drive or any file provider that exists on the iOS Files app. I cannot use the Dropbox or Google Drive APIs because I want to offer the app for free, and those APIs... | https://stackoverflow.com/questions/79555568/how-to-read-write-to-a-folder-from-the-ios-files-app-across-app-restarts | ios, swift, swiftui, files-app | 1,743,776,433 |
se_79989973 | stackoverflow | MOBILE_DEVELOPMENT | Weirdness with NSTextLists and {UI,NS}TextView undo TextKit2 | Weirdness with NSTextLists and {UI,NS}TextView undo TextKit2
NSTextList under TextKit2 is supposed to provide markers described in the Paragraph formats, but it has some problems - specifically on iOS numbering is broken in a few ways, while on the Mac, the same code is almost fully functional. Below I show how NSText... | https://stackoverflow.com/questions/79989973/weirdness-with-nstextlists-and-ui-nstextview-undo-textkit2 | c#, ios, swift, macos, textkit2 | 1,785,710,670 |
se_76071552 | stackoverflow | MOBILE_DEVELOPMENT | How to structure a Swift package(SPM)containing multiple packages(libraries/targets) and version them | How to structure a Swift package(SPM)containing multiple packages(libraries/targets) and version them
I would live to have a GitHub repo containing multiple swift packages.
How would that need to be structured? do I need multiple Package.swift? or one with multiple libraries and target?
The last one is what I have bee... | https://stackoverflow.com/questions/76071552/how-to-structure-a-swift-packagespmcontaining-multiple-packageslibraries-targ | ios, swift, monorepo, swift-package-manager | 1,682,067,409 |
se_79758221 | stackoverflow | MOBILE_DEVELOPMENT | SwiftUI How to Apply Shader "whatever" is behind the view | SwiftUI How to Apply Shader "whatever" is behind the view
I am writing a program that has some images where you can scroll through and I also have a rectangle-like view that is called PixeleteView where I want to pixelate the content behind, it is easy to apply my shader to the view and work however I want t... | https://stackoverflow.com/questions/79758221/swiftui-how-to-apply-shader-whatever-is-behind-the-view | ios, swift, swiftui, metal | 1,757,262,134 |
se_79992259 | stackoverflow | MOBILE_DEVELOPMENT | Not all line labels are shown / maplibre-native-distribution / iOS app | Not all line labels are shown / maplibre-native-distribution / iOS app
I am using https://github.com/maplibre/maplibre-native-distribution and am trying to develop an IOS app. I have ski runs on a mountain (ski runs are also called pistes). The runs have names. Some will display along the line but some not even pre... | https://stackoverflow.com/questions/79992259/not-all-line-labels-are-shown-maplibre-native-distribution-ios-app | advice, swift, maplibre-gl | 1,786,458,392 |
se_79991765 | stackoverflow | MOBILE_DEVELOPMENT | Timer.TimerPublisher behavior in Combine | Timer.TimerPublisher behavior in Combine
I’m trying to understand the behavior of Timer.TimerPublisher when using a manual connection.
For example:
let timer = Timer.publish(
every: 1,
on: .main,
in: .common
)
let subscription = timer
.sink { completion in
print("Completion:", completion)
} receiveValue: { value in
pr... | https://stackoverflow.com/questions/79991765/timer-timerpublisher-behavior-in-combine | ios, swift, timer, combine | 1,786,304,616 |
se_79990806 | stackoverflow | MOBILE_DEVELOPMENT | How can I pause a 'repeating forever' animation in Reality Composer Pro 2? | How can I pause a 'repeating forever' animation in Reality Composer Pro 2?
I'm creating an iOS AR experience with animated characters using RCP2.
Characters are imported USDA files with embedded animations. Getting a character's animation to 'repeat forever' is straightforward, but once repeating I can't get t... | https://stackoverflow.com/questions/79990806/how-can-i-pause-a-repeating-forever-animation-in-reality-composer-pro-2 | ios, swift, arkit, realitykit, reality-composer-pro | 1,785,957,820 |
se_51818874 | stackoverflow | MOBILE_DEVELOPMENT | regex with multiple group swift | regex with multiple group swift
im using swift 4 and got some problems with regex captured group.
so , i have regex here :
let regex = try! NSRegularExpression(pattern:"Tambah saldo via (merchant|transfer (online|bank)).(\\w+ \\.?)($)?(((\\w+\\.)?\\w+? (\\w+ )?\\.) No Rek:([0-9]+(.[0-9])*).[^0-9]+([0-9]+))?", options:... | https://stackoverflow.com/questions/51818874/regex-with-multiple-group-swift | swift, regex, swift4 | 1,534,151,384 |
se_31020054 | stackoverflow | MOBILE_DEVELOPMENT | Not getting Data from JSON Call | Not getting Data from JSON Call
I have created for learning purposes a small application which should take data from a JSON file and the display it in a tableview.
I am not correctly sure how to access my data from the JSON. Would be more then glad if some could help me.
[
{
"title": "dolore laboris ea adipisici... | https://stackoverflow.com/questions/31020054/not-getting-data-from-json-call | ios, json, swift | 1,435,129,991 |
se_29504712 | stackoverflow | MOBILE_DEVELOPMENT | How can I get XCTest to wait for async calls in setUp before tests are run? | How can I get XCTest to wait for async calls in setUp before tests are run?
I'm writing integration tests in Xcode 6 to go alongside my unit and functional tests. XCTest has a setUp() method that gets called before every test. Great!
It also has XCTestException's which let me write async tests. Also great!
However,... | https://stackoverflow.com/questions/29504712/how-can-i-get-xctest-to-wait-for-async-calls-in-setup-before-tests-are-run | xcode, unit-testing, swift, asynchronous, xctest | 1,428,459,195 |
se_79990523 | stackoverflow | MOBILE_DEVELOPMENT | How can I lock orientation for only one screen on iPad without disabling multitasking? | How can I lock orientation for only one screen on iPad without disabling multitasking?
I'm currently migrating from ML Kit to mobile_scanner for QR/barcode scanning because it is lighter and performs better on low-end Android devices.
However, mobile_scanner has a long-standing issue on Android where the camera previe... | https://stackoverflow.com/questions/79990523/how-can-i-lock-orientation-for-only-one-screen-on-ipad-without-disabling-multita | swift, flutter, ipad, screen-rotation, ipados | 1,785,875,711 |
se_60381026 | stackoverflow | MOBILE_DEVELOPMENT | How can I remove the text from the navigation bar back item | How can I remove the text from the navigation bar back item
I'm trying to remove the text "Back" from the navigation back button, leaving just the back chevron, but everything I'm trying is not working. For example if I add something like the following, obtained from previous answers to the same question, to viewDidLo... | https://stackoverflow.com/questions/60381026/how-can-i-remove-the-text-from-the-navigation-bar-back-item | ios, swift | 1,582,565,073 |
se_79989754 | stackoverflow | MOBILE_DEVELOPMENT | Append items to an array in an object in Swift | Append items to an array in an object in Swift
I am trying to append items to an array in Swift. As long as the array is located inside ContentView this works fine, but if I put the array inside an object, append() no longer works. Here is the ContentView.swift of the first case:
import SwiftUI
struct ContentView: V... | https://stackoverflow.com/questions/79989754/append-items-to-an-array-in-an-object-in-swift | ios, swift, swiftui | 1,785,611,175 |
se_24407203 | stackoverflow | MOBILE_DEVELOPMENT | NSTextView selection highlights all characters even paragraph indents | NSTextView selection highlights all characters even paragraph indents
Can't find any clue how to manage this.
By default, NSTextView selection highlights the whole size of its text container. It ignores line spacing, head or tail indents etc. But in Pages app selection doesn't highlight those ancillary parts, it high... | https://stackoverflow.com/questions/24407203/nstextview-selection-highlights-all-characters-even-paragraph-indents | objective-c, macos, cocoa, swift, nstextview | 1,403,695,064 |
se_50908884 | stackoverflow | MOBILE_DEVELOPMENT | Swift 4 · Data conversion | Swift 4 · Data conversion
I am creating an analogue clock display in iOS that also shows the difference between solar noon and clock noon, so I need to know the time of solar noon in order to calculate that difference.
This api call: http://api.usno.navy.mil/rstt/oneday?date=today&coords=51.1,-1.0&tz=1 yields th... | https://stackoverflow.com/questions/50908884/swift-4-data-conversion | ios, json, swift | 1,529,322,619 |
se_38970627 | stackoverflow | MOBILE_DEVELOPMENT | Swift Collection View custom layout change cell width in cell side | Swift Collection View custom layout change cell width in cell side
I have working collectionview custom layout codes but some cells I need to change cell width in cell side coming variable from json dynamically.
My CustomCollectionViewLayout
import UIKit
public var CELL_HEIGHT = 22.0
public var CELL_WIDTH = 40.0 // H... | https://stackoverflow.com/questions/38970627/swift-collection-view-custom-layout-change-cell-width-in-cell-side | ios, swift, uicollectionview | 1,471,337,961 |
se_79819697 | stackoverflow | MOBILE_DEVELOPMENT | SwiftUI: Button role: cancel doesn't show ("IOSurfaceClientSetSurfaceNotify failed") | SwiftUI: Button role: cancel doesn't show ("IOSurfaceClientSetSurfaceNotify failed")
I made the following confirmation dialog:
struct ContentView: View {
@State var isConfirmShown = false
var body: some View {
VStack {
Button("Display Confirm") {
isConfirm... | https://stackoverflow.com/questions/79819697/swiftui-button-role-cancel-doesnt-show-iosurfaceclientsetsurfacenotify-fail | ios, swift, swiftui | 1,763,101,310 |
se_79984005 | stackoverflow | MOBILE_DEVELOPMENT | Swift warning about possible isolated conformance of "some View" | Swift warning about possible isolated conformance of "some View"
This code:
import SwiftUI
@MainActor
func renderImage(_ view: some View) -> CGImage? {
let renderer = ImageRenderer(content: view)
return renderer.cgImage
}
let image = renderImage(
ZStack {
Image(systemName: "drop.fill").... | https://stackoverflow.com/questions/79984005/swift-warning-about-possible-isolated-conformance-of-some-view | swift, xcode, swift-concurrency | 1,784,763,419 |
se_26556408 | stackoverflow | MOBILE_DEVELOPMENT | How to check if code runs in Today Extension or App | How to check if code runs in Today Extension or App
As UIApplication.sharedApplication() isn't available in the an iOS8 today widget/extension, how can I dynamically check if the code is currently running as widget or as app? When running the app I'd like to call e.g.
UIApplication.sharedApplication().registerUserNot... | https://stackoverflow.com/questions/26556408/how-to-check-if-code-runs-in-today-extension-or-app | swift, ios8, ios8-today-widget | 1,414,185,462 |
se_59215358 | stackoverflow | MOBILE_DEVELOPMENT | Apple sign in get user data with access token | Apple sign in get user data with access token
I have a question about apple sign in. I just implemented an apple sign in, and I found that I received an identity token, access token, and refresh token. It seems that the identity token has user information in the json web token. I am wondering how I can use the access ... | https://stackoverflow.com/questions/59215358/apple-sign-in-get-user-data-with-access-token | ios, swift, apple-sign-in | 1,575,643,714 |
se_79973870 | stackoverflow | MOBILE_DEVELOPMENT | Is it even possible to send messages from macOS App to the background script of a Safari Extension | Is it even possible to send messages from macOS App to the background script of a Safari Extension
I'm working on an application.
My main intent for now is to make the App communicate with a Safari extension so that they could trigger things on the browser.
However I'm having an issue with the communication that happe... | https://stackoverflow.com/questions/79973870/is-it-even-possible-to-send-messages-from-macos-app-to-the-background-script-of | swift, macos, safari-extension | 1,783,057,766 |
se_79686854 | stackoverflow | MOBILE_DEVELOPMENT | SwiftUI sheet dismisses automatically on first appear (only in Form) | SwiftUI sheet dismisses automatically on first appear (only in Form)
I built OutdoorSection which is used in a bigger form to input a location, temperature and humidity. The location will be picked in a second LocationPicker view, which comes up as a sheet.
When the first time the Select button is clicked, the sheet a... | https://stackoverflow.com/questions/79686854/swiftui-sheet-dismisses-automatically-on-first-appear-only-in-form | ios, swift, swiftui | 1,751,433,276 |
se_28597627 | stackoverflow | MOBILE_DEVELOPMENT | How to get the user "Name" using Swift? | How to get the user "Name" using Swift?
I'm trying to create an app that when the user open the first view it will provide with a nice greeting.
For example depending on the time of the day it would say "Good Morning/Afternoon/Night - User Name".
How do I get the name that the User has on his iPhone? I n... | https://stackoverflow.com/questions/28597627/how-to-get-the-user-name-using-swift | ios, swift | 1,424,312,181 |
se_31036241 | stackoverflow | MOBILE_DEVELOPMENT | Populate table view from Struct | Populate table view from Struct
I have a Struct such as:
struct Test {
var name: String?
var value: Float?
var isfavorite:String?
init(name: String, value: Float, favorite: String){
self.name = name
self.value = rawRate
self.favorite = favorite
... | https://stackoverflow.com/questions/31036241/populate-table-view-from-struct | swift, uitableview, struct | 1,435,177,316 |
se_43806972 | stackoverflow | MOBILE_DEVELOPMENT | Download Firebase Storage Synchronously | Download Firebase Storage Synchronously
I am working on downloading an image from Firebase Storage and displaying it on a table view. I have been using this:
referenceOfImage.data(withMaxSize: 100 * 1024 * 1024) { data, error in
if let error = error {
print(error)
} else {
guard let data = data... | https://stackoverflow.com/questions/43806972/download-firebase-storage-synchronously | ios, swift, firebase, synchronization, firebase-storage | 1,493,992,837 |
se_59009775 | stackoverflow | MOBILE_DEVELOPMENT | How to pass a value from an EnvironmentObject to a class instance in SwiftUI? | How to pass a value from an EnvironmentObject to a class instance in SwiftUI?
I'm trying to assign the value from an EnvironmentObject called userSettings to a class instance called categoryData, I get an error when trying to assign the value to the class here ObserverCategory(userID: self.userSettings.id)
Error says... | https://stackoverflow.com/questions/59009775/how-to-pass-a-value-from-an-environmentobject-to-a-class-instance-in-swiftui | swift, swiftui, swift5 | 1,574,526,694 |
se_79986444 | stackoverflow | MOBILE_DEVELOPMENT | What are common SwiftUI based timers | What are common SwiftUI based timers
Swift provides a timer that is part of Combine framework. There is additional timer that can be executed with RunLoop, which is not encouraged because it may have bugs. What are commonly used timers which are more suitable for use with SwiftUI, and which can track UI focus mode.
le... | https://stackoverflow.com/questions/79986444/what-are-common-swiftui-based-timers | ios, swift, swiftui | 1,785,190,467 |
se_79989550 | stackoverflow | MOBILE_DEVELOPMENT | I don't understand what's causing my customTabBar to freeze | I don't understand what's causing my customTabBar to freeze
I created a tab bar in SwiftUI, but when I tap it for the first time, the app freezes completely. I isolated the code and found that the bug is indeed coming from the tab bar, because when I use a very simple one, the bug disappears.
If you can let me... | https://stackoverflow.com/questions/79989550/i-dont-understand-whats-causing-my-customtabbar-to-freeze | ios, swift, swiftui | 1,785,518,461 |
se_79989497 | stackoverflow | MOBILE_DEVELOPMENT | Bluetooth permissions on iOS 18 | Bluetooth permissions on iOS 18
I am trying to develop a Bluetooth scanner app for iOS 16+ using Xcode 26, but I can’t get Bluetooth permissions on the (iOS 18) phone. The app installs on the ‘phone and runs without error, but it never requests permission to use Bluetooth.
The value of CBCentralManager.state is alway... | https://stackoverflow.com/questions/79989497/bluetooth-permissions-on-ios-18 | ios, swift, bluetooth | 1,785,505,906 |
se_65588346 | stackoverflow | MOBILE_DEVELOPMENT | BLE: How can I get correct service UUID and characteristic UUID? | BLE: How can I get correct service UUID and characteristic UUID?
I am a new in Bluetooth connection, and I want to add a second device in my iOS project.
I already have one device, and the new device is very similar with first one, but a little bit different. I have one process for the two devices, and I did not chang... | https://stackoverflow.com/questions/65588346/ble-how-can-i-get-correct-service-uuid-and-characteristic-uuid | ios, objective-c, swift, bluetooth-lowenergy | 1,609,891,559 |
se_69417215 | stackoverflow | MOBILE_DEVELOPMENT | Error: Thread 1: "Impossible to set up layout with view hierarchy unprepared for constraint." when using auto layout | Error: Thread 1: "Impossible to set up layout with view hierarchy unprepared for constraint." when using auto layout
My code is down below, and I don't know what makes this error appear. Some ideas?
Thread 1: "Impossible to set up layout with view hierarchy unprepared for constraint."
import UIKit
class Vi... | https://stackoverflow.com/questions/69417215/error-thread-1-impossible-to-set-up-layout-with-view-hierarchy-unprepared-for | swift, xcode, autolayout | 1,633,180,230 |
se_25621120 | stackoverflow | MOBILE_DEVELOPMENT | Simple and clean way to convert JSON string to Object in Swift | Simple and clean way to convert JSON string to Object in Swift
I have been searching for days to convert a fairly simple JSON string to an object type in Swift but with no avail.
Here is the code for web service call:
func GetAllBusiness() {
Alamofire.request(.GET, "http://MyWebService/").responseString { ... | https://stackoverflow.com/questions/25621120/simple-and-clean-way-to-convert-json-string-to-object-in-swift | ios, json, swift, iphone | 1,409,653,396 |
se_79987651 | stackoverflow | MOBILE_DEVELOPMENT | Reliably reading the current tab's URL from Chrome and Safari via the macOS Accessibility API | Reliably reading the current tab's URL from Chrome and Safari via the macOS Accessibility API
I want to read the URL of the frontmost tab in the user's active browser
(Chrome, Safari, Edge, Brave, Arc, …) from a Swift macOS app, using the
Accessibility API (AXUIElement). The app already has Accessibility
permissio... | https://stackoverflow.com/questions/79987651/reliably-reading-the-current-tabs-url-from-chrome-and-safari-via-the-macos-acce | macos, safari, google-chrome, accessibility, swift | 1,785,235,434 |
se_64075495 | stackoverflow | MOBILE_DEVELOPMENT | CoreData + CloudKit only synching after minimizing and reopening app | CoreData + CloudKit only synching after minimizing and reopening app
I am currently making an app that needs it's CoreData storage to be synced via iCloud across devices.
Everything works fine except that it's not synching in real-time. (Or at least somewhat close to that). It's not syncing at all when I am doing noth... | https://stackoverflow.com/questions/64075495/coredata-cloudkit-only-synching-after-minimizing-and-reopening-app | swift, core-data, cloudkit | 1,601,108,712 |
se_78991765 | stackoverflow | MOBILE_DEVELOPMENT | How to let SwiftUI View know that ViewModel's computed property has changed? | How to let SwiftUI View know that ViewModel's computed property has changed?
Imagine you have ViewModel which computed property may change from time to time:
import Foundation
class ViewModel: ObservableObject {
private var val = 42;
var compProp: Int {
return val
}
func maybeChange(... | https://stackoverflow.com/questions/78991765/how-to-let-swiftui-view-know-that-viewmodels-computed-property-has-changed | swift, swiftui | 1,726,520,000 |
se_76395570 | stackoverflow | MOBILE_DEVELOPMENT | SwiftUI Formatting TextField for credit card input "xxxx-xxxx-xxxx-xxxx" | SwiftUI Formatting TextField for credit card input "xxxx-xxxx-xxxx-xxxx"
I want to write a custom TextField on SwiftUI to have an input with credit card format like this "xxxx-xxxx-xxxx-xxxx", I was looking at this answers https://stackoverflow.com/a/48252437, but I'm struggling with UIViewRepresentable, whe... | https://stackoverflow.com/questions/76395570/swiftui-formatting-textfield-for-credit-card-input-xxxx-xxxx-xxxx-xxxx | ios, swift, swiftui, uitextfield, uiviewrepresentable | 1,685,787,096 |
se_58068446 | stackoverflow | MOBILE_DEVELOPMENT | NSManagedObject changes do not trigger objectWillChange | NSManagedObject changes do not trigger objectWillChange
I have a Core Data model with an entity generated into class Task. I am trying to get the Combine publisher objectWillChange from the NSManagedObject to send (automatically, without manual work), but it won't. The task entity has a name attribute.
let task = Tas... | https://stackoverflow.com/questions/58068446/nsmanagedobject-changes-do-not-trigger-objectwillchange | swift, core-data, swiftui, combine | 1,569,264,466 |
se_56276964 | stackoverflow | MOBILE_DEVELOPMENT | Is it possible to create an Array of specific Objects in Parse? | Is it possible to create an Array of specific Objects in Parse?
I have made a QR scanner App, I have manually put some QR codes into parse for it to recognise, any QR codes scanned that I haven't put into parse don't get recognised.
The only thing to tell them apart is their (Info) i.e "restaurant", "nail salon" etc.... | https://stackoverflow.com/questions/56276964/is-it-possible-to-create-an-array-of-specific-objects-in-parse | swift, xcode, parse-platform | 1,558,620,040 |
se_46783527 | stackoverflow | MOBILE_DEVELOPMENT | How to change Apple Map (MKMapView) background colors? | How to change Apple Map (MKMapView) background colors?
I've Required an iOS application with a black theme, and would really like to make the displayed Apple Map also in black colors.
I see nothing in the native documentation that talks about changing look for MKMapView.
I've Googled the topic and tried to change MK... | https://stackoverflow.com/questions/46783527/how-to-change-apple-map-mkmapview-background-colors | ios, iphone, swift, mkmapview, background-color | 1,508,220,470 |
se_62842173 | stackoverflow | MOBILE_DEVELOPMENT | 'didRegisterForRemoteNotificationsWithDeviceToken' never called | 'didRegisterForRemoteNotificationsWithDeviceToken' never called
I have absolutely no clue why my notifications are not working.
My AppDelegate looks like this:
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
func application(_ appl... | https://stackoverflow.com/questions/62842173/didregisterforremotenotificationswithdevicetoken-never-called | ios, swift, push-notification, apple-push-notifications, ipados | 1,594,414,691 |
se_79984337 | stackoverflow | MOBILE_DEVELOPMENT | Tabview doesn't fade/blur properly behind navigation bar (iOS 26+) | Tabview doesn't fade/blur properly behind navigation bar (iOS 26+)
I'm targeting iOS 26+ and I can't get a consistent fade/blur effect on the top edge of the screen behind the navigation title bar when scrolling up in a tabView, which should actually happen by default from my understanding.
I'm attaching here the ... | https://stackoverflow.com/questions/79984337/tabview-doesnt-fade-blur-properly-behind-navigation-bar-ios-26 | swift, swiftui | 1,784,835,096 |
se_79184693 | stackoverflow | MOBILE_DEVELOPMENT | Swift Charts: overflowResolution on the X-axis only works on one side | Swift Charts: overflowResolution on the X-axis only works on one side
I am working on a project that displays the number of steps users have taken in the last 15 days on a chart. I implemented the chart selection behavior introduced in iOS 17, which shows a RuleMark with an annotation for the selected value.
struct Co... | https://stackoverflow.com/questions/79184693/swift-charts-overflowresolution-on-the-x-axis-only-works-on-one-side | ios, swift, swiftui, charts, swiftui-charts | 1,731,497,462 |
se_79984239 | stackoverflow | MOBILE_DEVELOPMENT | Is it possible to assign object value directly in Realm migration block? | Is it possible to assign object value directly in Realm migration block?
Below is the code:
final class ROAssetItem: Object, ObjectKeyIdentifiable {
@Persisted var deposit: RODepositItem? //new added
@Persisted var currentDeposit: RODepositItem? //old, to be deleted
@Persisted var timeDeposit: RODepos... | https://stackoverflow.com/questions/79984239/is-it-possible-to-assign-object-value-directly-in-realm-migration-block | swift, realm, realm-migration | 1,784,816,151 |
se_79977749 | stackoverflow | MOBILE_DEVELOPMENT | Migrating an existing SwiftData store (explicit SQLite URL) to an App Group with CloudKit after migrating from Core Data | Migrating an existing SwiftData store (explicit SQLite URL) to an App Group with CloudKit after migrating from Core Data
I have a production app that originally used Core Data + CloudKit and was later migrated to SwiftData.
The SwiftData migration preserved the existing SQLite store by explicitly pointing ModelConfigu... | https://stackoverflow.com/questions/79977749/migrating-an-existing-swiftdata-store-explicit-sqlite-url-to-an-app-group-with | swift, core-data, swiftdata, ios-app-group | 1,783,490,488 |
se_71724245 | stackoverflow | MOBILE_DEVELOPMENT | SwiftUI alert and confirmation dialog preferredColorScheme | SwiftUI alert and confirmation dialog preferredColorScheme
I've noticed when setting the preferredColorScheme in my SwiftUI app the .alert and .confirmationDialog modifiers don't use the colorScheme. Also the launch screen doesn't use the colorScheme either. It seems to be using system defaults, is this normal behavio... | https://stackoverflow.com/questions/71724245/swiftui-alert-and-confirmation-dialog-preferredcolorscheme | swift, swiftui | 1,648,974,750 |
se_79982153 | stackoverflow | MOBILE_DEVELOPMENT | Region of interest position effect bounding box values of detected object while using Vision Framework | Region of interest position effect bounding box values of detected object while using Vision Framework
We trained a model with Create ML object detection module.
Now we are using model in a Swift application and having no problem detecting objects at live camera feed .
Our problem is with area of interest.
While keepi... | https://stackoverflow.com/questions/79982153/region-of-interest-position-effect-bounding-box-values-of-detected-object-while | swift, createml, visionkit | 1,784,533,926 |
se_79982087 | stackoverflow | MOBILE_DEVELOPMENT | Can an iOS app rely on iCloud Drive to finish syncing files after the app is suspended or terminated? | Can an iOS app rely on iCloud Drive to finish syncing files after the app is suspended or terminated?
I am building an offline-first iOS application that stores searchable records along with photos and videos. A user may create or edit records, add or delete media, and then immediately lock the phone or leave the app.... | https://stackoverflow.com/questions/79982087/can-an-ios-app-rely-on-icloud-drive-to-finish-syncing-files-after-the-app-is-sus | advice, ios, swift, cloudkit, ckasset | 1,784,495,495 |
se_79981046 | stackoverflow | MOBILE_DEVELOPMENT | Do Critical Alert (Apple) sounds play one at a time, or can two overlap? | Do Critical Alert (Apple) sounds play one at a time, or can two overlap?
I'm using UNNotificationSound.criticalSoundNamed with the Critical Alerts entitlement. I have two separate alarms that can each be active at the same time, each scheduling its own local notification on a repeating timer.
Before switching to criti... | https://stackoverflow.com/questions/79981046/do-critical-alert-apple-sounds-play-one-at-a-time-or-can-two-overlap | ios, swift, audio, alert | 1,784,129,847 |
se_79981893 | stackoverflow | MOBILE_DEVELOPMENT | Xcode iOS UIToolbar not sending IBActions after update to use SceneDelegate | Xcode iOS UIToolbar not sending IBActions after update to use SceneDelegate
I added the new SceneDelegate and my toolbar clicks no longer make it through the IBActions. I even recreated the IBActions and verified the safe area (which I did not change). All other GUI actions work fine. The Toolbar item Outlets work ... | https://stackoverflow.com/questions/79981893/xcode-ios-uitoolbar-not-sending-ibactions-after-update-to-use-scenedelegate | ios, swift, xcode | 1,784,395,895 |
se_29782982 | stackoverflow | MOBILE_DEVELOPMENT | How to input currency format on a text field (from right to left) using Swift? | How to input currency format on a text field (from right to left) using Swift?
I have a number let’s say 0.00.
When the user taps 1. We should have 0.01
When the user taps 2. We should display 0.12
When the user taps 3. We should display 1.23
When the user taps 4. We should display 12.34
How can I do that with S... | https://stackoverflow.com/questions/29782982/how-to-input-currency-format-on-a-text-field-from-right-to-left-using-swift | ios, swift, string, uitextfield, nsnumberformatter | 1,429,649,865 |
se_31127268 | stackoverflow | MOBILE_DEVELOPMENT | How to disable userinteraction with UIBarButtonItem? | How to disable userinteraction with UIBarButtonItem?
When the user presses the bar button, it changes its color to grey. But the color of the bar button shouldn't change when the state is pressed. I have the same problem like this question which never got solved and every answer is not working. There is no setUserInte... | https://stackoverflow.com/questions/31127268/how-to-disable-userinteraction-with-uibarbuttonitem | ios, xcode, swift, uibarbuttonitem | 1,435,620,953 |
se_36673694 | stackoverflow | MOBILE_DEVELOPMENT | UICollectionView width programatically conflicting with storyboard initialization | UICollectionView width programatically conflicting with storyboard initialization
I've created a UICollectionView through the storyboard and temporarily positioned it in the view; however, I'd like to overwrite the positions programmatically on launch rather than using the storyboard configuration.
I thought viewD... | https://stackoverflow.com/questions/36673694/uicollectionview-width-programatically-conflicting-with-storyboard-initializatio | ios, swift, uicollectionview, width, viewdidload | 1,460,877,115 |
se_79794390 | stackoverflow | MOBILE_DEVELOPMENT | How to add iOS 26 Liquid Glass droplet background and animation to your own views? | How to add iOS 26 Liquid Glass droplet background and animation to your own views?
For various reasons, people create their own tab bar from scratch. Previously, it was fairly simple by adding a horizontal stack with the buttons for each tab and a UIVisualEffectView with UIBlurEffect in the back.
The iOS 26 tab bar is... | https://stackoverflow.com/questions/79794390/how-to-add-ios-26-liquid-glass-droplet-background-and-animation-to-your-own-view | ios, swift, uitabbar, ios26, liquid-glass | 1,760,893,410 |
se_79980261 | stackoverflow | MOBILE_DEVELOPMENT | Why does VoiceOver skip NSCollectionViewItem container when it contains only one accessible element? | Why does VoiceOver skip NSCollectionViewItem container when it contains only one accessible element?
I was recently trying out a voice over feature to my application in macOS and I found when use a NSCollectionViewItem with only one single accessibility enabled item in it then when the entire collectionview is focused... | https://stackoverflow.com/questions/79980261/why-does-voiceover-skip-nscollectionviewitem-container-when-it-contains-only-one | swift, appkit | 1,783,929,940 |
se_47041883 | stackoverflow | MOBILE_DEVELOPMENT | Swift. Make all classes final | Swift. Make all classes final
Using final keyword in Swift code: I know that final helps the compiler to compile code faster because of dynamic dispatch. So, if I definitely know that I will not inherit some of my classes, should I make all of them final? | https://stackoverflow.com/questions/47041883/swift-make-all-classes-final | ios, swift, final | 1,509,473,015 |
se_77608724 | stackoverflow | MOBILE_DEVELOPMENT | SwiftUI List with Selection and onTapGesture Interfering with Each Other | SwiftUI List with Selection and onTapGesture Interfering with Each Other
I'm working on a SwiftUI app where I have a List that needs to support both selection of items and handling double tap gestures on those items. However, I'm facing an issue where enabling onTapGesture seems to interfere with the list's selection ... | https://stackoverflow.com/questions/77608724/swiftui-list-with-selection-and-ontapgesture-interfering-with-each-other | ios, swift, xcode, swiftui | 1,701,803,479 |
se_79974011 | stackoverflow | MOBILE_DEVELOPMENT | AVPlayer Audio Reverse Scrubbing | AVPlayer Audio Reverse Scrubbing
I have an audio player app on macOS built on top of AVPlayer, I want to add the ability to scrub the audio, and hear the audio frames based on the playhead's position whether going forwards or backwards. When going backwards, the audio frame should be played in reverse as well.
The aud... | https://stackoverflow.com/questions/79974011/avplayer-audio-reverse-scrubbing | ios, swift, macos, avfoundation, avplayer | 1,783,076,949 |
se_79980146 | stackoverflow | MOBILE_DEVELOPMENT | Why does SwiftUI tabBarMinimizeBehavior(.onScrollDown) fail to expand on direction reversal like Reddit/Safari? | Why does SwiftUI tabBarMinimizeBehavior(.onScrollDown) fail to expand on direction reversal like Reddit/Safari?
I am trying to use the native SwiftUI .tabBarMinimizeBehavior(.onScrollDown) modifier to get a responsive tab bar behavior. My goal is simple: the tab bar should minimize when scrolling down, but re-expand i... | https://stackoverflow.com/questions/79980146/why-does-swiftui-tabbarminimizebehavior-onscrolldown-fail-to-expand-on-directi | ios, swift, swiftui, tabview | 1,783,881,942 |
se_79784840 | stackoverflow | MOBILE_DEVELOPMENT | Getting a list of cameras including ones with virtual 2x crop | Getting a list of cameras including ones with virtual 2x crop
So using AVCaptureDevice.DiscoverySession gets you each dedicated camera.
let devices = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: .video, position: .back)
But, with new phones, some of them have a virtual 2x camera... | https://stackoverflow.com/questions/79784840/getting-a-list-of-cameras-including-ones-with-virtual-2x-crop | ios, swift, camera, avfoundation, avcapturedevice | 1,759,862,408 |
se_42588673 | stackoverflow | MOBILE_DEVELOPMENT | How can I retrieve messages logged with os_log from iPad/iPhone? | How can I retrieve messages logged with os_log from iPad/iPhone?
I am using the new Unified Logging API in Swift.
So I create a logger and use it as below:
let testLogger = OSLog(subsystem: "my.subsystem", category: "test")
os_log("just a test: %@", log: testLogger, type: .error, "error")
How can I retrieve the lo... | https://stackoverflow.com/questions/42588673/how-can-i-retrieve-messages-logged-with-os-log-from-ipad-iphone | ios, swift, logging, oslog, sysdiagnose | 1,488,576,228 |
se_72535675 | stackoverflow | MOBILE_DEVELOPMENT | Inheriting generic typealias with `where` clause | Inheriting generic typealias with `where` clause
Here's a reduction of what I'm observing:
class MyGenericClass<T> {} // yes
typealias MyType<T> = MyGenericClass<T> where T: UIView // yes
class MyOtherClass<T>: MyType<T> {} // nope
What I was hoping — i.e. the whole reason I defined the typealias — was that I might... | https://stackoverflow.com/questions/72535675/inheriting-generic-typealias-with-where-clause | swift, generics | 1,654,624,722 |
se_71336800 | stackoverflow | MOBILE_DEVELOPMENT | Sending local notifications in SWIFT | Sending local notifications in SWIFT
I added this code to my first ViewController
// Step-1 Ask permission from User
let center = UNUserNotificationCenter.current()
center.requestAuthorization(options: [.badge,.sound,.alert]) { granted, error in
if error == nil {
print("User permission is ... | https://stackoverflow.com/questions/71336800/sending-local-notifications-in-swift | ios, swift, usernotifications | 1,646,308,557 |
se_79950355 | stackoverflow | MOBILE_DEVELOPMENT | Pass tap gestures to a view from a different hierarchy | Pass tap gestures to a view from a different hierarchy
I have two overlapping UIViews, both subviews of the same parent view.
The back view has a UITapGestureRecognizer, and the front view has another gesture recognizer, for example a UILongPressGestureRecognizer or a UIPanGestureRecognizer.
What I want is:
if the us... | https://stackoverflow.com/questions/79950355/pass-tap-gestures-to-a-view-from-a-different-hierarchy | ios, swift, uikit | 1,780,414,096 |
se_79976372 | stackoverflow | MOBILE_DEVELOPMENT | Popover not programatically closing in NavigationStack | Popover not programatically closing in NavigationStack
Typically, you can programatically close and open a popover with popover(isPresented: Binding<Bool>), like so:
struct AContent: View {
@State private var showFilter = false
var body: some View {
VStack(spacing: 16) {
Button("Filter") {
showF... | https://stackoverflow.com/questions/79976372/popover-not-programatically-closing-in-navigationstack | ios, swift, swiftui, popover, mac-catalyst | 1,783,413,752 |
se_34680007 | stackoverflow | MOBILE_DEVELOPMENT | Simple low-latency audio playback in iOS Swift | Simple low-latency audio playback in iOS Swift
I'm a beginner in iOS and I'm trying to design a drum set app with Swift. I designed a view with a single button and wrote the code below, but it has some problems:
Some sounds are lost when I touch the button quickly like a drum roll.
Still in a 'drum roll', the sound ... | https://stackoverflow.com/questions/34680007/simple-low-latency-audio-playback-in-ios-swift | ios, swift, audio, avaudioplayer, low-latency | 1,452,265,274 |
se_78316306 | stackoverflow | MOBILE_DEVELOPMENT | How to use OpenType feature tags with UIFont? | How to use OpenType feature tags with UIFont?
How to use OpenType feature tags (eg. cv11) with UIFont in Swift? | https://stackoverflow.com/questions/78316306/how-to-use-opentype-feature-tags-with-uifont | swift, swiftui, uifont, opentype | 1,712,925,208 |
se_79974739 | stackoverflow | MOBILE_DEVELOPMENT | Can a C# desktop app install an iOS App over USB onto unsupervised iPhones? | Can a C# desktop app install an iOS App over USB onto unsupervised iPhones?
I am building a diagnostic workflow where a desktop application needs to install a companion iOS app onto a USB-connected iPhone.
The desktop application is written in C# and runs on macOS. I can already detect and pair iPhones over USB, and I... | https://stackoverflow.com/questions/79974739/can-a-c-desktop-app-install-an-ios-app-over-usb-onto-unsupervised-iphones | ios, swift, iphone, xcode | 1,783,270,851 |
se_74682780 | stackoverflow | MOBILE_DEVELOPMENT | Prevent NavigationBar from hiding with .searchable in SwiftUI | Prevent NavigationBar from hiding with .searchable in SwiftUI
I'm running into an issue with .searchable where I can't find a modifier or override to prevent the Search Bar from animating and hiding the Navigation Title and Tool Bar Elements when it's active.
Is this possible to prevent animating the .searchable text ... | https://stackoverflow.com/questions/74682780/prevent-navigationbar-from-hiding-with-searchable-in-swiftui | ios, swift, swiftui | 1,670,207,709 |
se_79971595 | stackoverflow | MOBILE_DEVELOPMENT | HKStatisticsCollectionQuery initialResultsHandler returns nil results for one specific user — read auth granted, data exists, survives reinstall | HKStatisticsCollectionQuery initialResultsHandler returns nil results for one specific user — read auth granted, data exists, survives reinstall
Environment: iPhone 13 Pro, iOS 26.5. Affects a single user out of many; cannot reproduce on any of our test devices.
We use HKStatisticsCollectionQuery to read step counts ... | https://stackoverflow.com/questions/79971595/hkstatisticscollectionquery-initialresultshandler-returns-nil-results-for-one-sp | ios, swift, healthkit, hkhealthstore | 1,782,806,129 |
se_79965552 | stackoverflow | MOBILE_DEVELOPMENT | Are there any ways to prevent app record/capture on macOS | Are there any ways to prevent app record/capture on macOS
I'm looking for a way to prevent my app from displaying in screenshots and screen recordings. There appears to be plenty of options for UIKit/iOS but nothing I can find for macOS.
userDidTakeScreenshotNotification
@Environment(\.sceneCaptureState) private var c... | https://stackoverflow.com/questions/79965552/are-there-any-ways-to-prevent-app-record-capture-on-macos | swift, xcode, macos, swiftui, screencapturekit | 1,782,173,234 |
se_79971649 | stackoverflow | MOBILE_DEVELOPMENT | Activity View Controller Services icons are too large on iOS 26 devices | Activity View Controller Services icons are too large on iOS 26 devices
On a bare bones View Controller with nothing but a 'right bar button' for sharing, when the Share Sheet comes up, the services icons are simply too large and overlapping each other on iOS 26+ devices and simulators; iOS 18 shows the layout correct... | https://stackoverflow.com/questions/79971649/activity-view-controller-services-icons-are-too-large-on-ios-26-devices | swift, uikit, uiactivityviewcontroller | 1,782,813,860 |
se_24217586 | stackoverflow | MOBILE_DEVELOPMENT | structure vs class in Swift language | structure vs class in Swift language
From the Apple book:
One of the most important differences between structures and classes is that structures are always copied when they are passed around in your code, but classes are passed by reference.
Can anyone help me understand what that means? To me, classes and structs ... | https://stackoverflow.com/questions/24217586/structure-vs-class-in-swift-language | swift | 1,402,730,311 |
se_79970262 | stackoverflow | MOBILE_DEVELOPMENT | Should encodeRestorableState(with:backgroundQueue:) encode synchronously or use the provided background queue? | Should encodeRestorableState(with:backgroundQueue:) encode synchronously or use the provided background queue?
I am using AppKit state restoration and I am trying to understand the intended usage of:
override func encodeRestorableState(with coder: NSCoder, backgroundQueue queue: OperationQueue)
Most examples I have s... | https://stackoverflow.com/questions/79970262/should-encoderestorablestatewithbackgroundqueue-encode-synchronously-or-use | swift, cocoa, appkit, nscoder, state-restoration | 1,782,729,087 |
se_26977861 | stackoverflow | MOBILE_DEVELOPMENT | UIView frame is not equal to UIView.layer.frame | UIView frame is not equal to UIView.layer.frame
I want to draw a UIView layer but when I do it the layer frame is not equal (in Preview) to UIView frame.
class ViewController: UIViewController {
var graphHeight:CGFloat = 100
var graphSize:CGFloat!
override func viewDidLoad() {
super.viewDidL... | https://stackoverflow.com/questions/26977861/uiview-frame-is-not-equal-to-uiview-layer-frame | ios, swift, uiview | 1,416,243,667 |
se_27014880 | stackoverflow | MOBILE_DEVELOPMENT | Swift equal function dont work | Swift equal function dont work
i want to check equality between objects but i get an error. Error is within the code.
class Test {
var key: String
init(nameParam: String) {
self.key = nameParam
}
func ==(other: Test) -> Bool {
return other.key == self.key
}
}
var t1 = Test(nam... | https://stackoverflow.com/questions/27014880/swift-equal-function-dont-work | swift, equality | 1,416,393,987 |
se_30973826 | stackoverflow | MOBILE_DEVELOPMENT | How to create a predicate to filter array of enums with associated values in Swift? | How to create a predicate to filter array of enums with associated values in Swift?
enum EnumType {
case WithString(String)
}
var enums = [EnumType]()
enums.append(EnumType.WithString("A"))
enums.append(EnumType.WithString("B"))
enums.append(EnumType.WithString("C"))
enums.append(EnumType.WithString("D"))
enums.... | https://stackoverflow.com/questions/30973826/how-to-create-a-predicate-to-filter-array-of-enums-with-associated-values-in-swi | arrays, swift, filter, enums | 1,434,956,678 |
se_62456879 | stackoverflow | MOBILE_DEVELOPMENT | iTunes/Apple Music Persistent ID | iTunes/Apple Music Persistent ID
I am in the process of converting a Python program to a macOS app and I am now able to read the Apple Music library directly using the ITunesLibrary Framework. I was reading the exported XML library in python and keyed all my music to the persistentID property, which I still want to d... | https://stackoverflow.com/questions/62456879/itunes-apple-music-persistent-id | swift | 1,592,504,593 |
se_79966255 | stackoverflow | MOBILE_DEVELOPMENT | SwiftUI parent onTapGesture intercepts taps from embedded AVPlayerViewController | SwiftUI parent onTapGesture intercepts taps from embedded AVPlayerViewController
I'm embedding an AVPlayerViewController via UIViewControllerRepresentable inside a SwiftUI view hierarchy that has a parent .onTapGesture.
On some old iOS versions, taps on the video player are also recognized by the parent SwiftUI gestur... | https://stackoverflow.com/questions/79966255/swiftui-parent-ontapgesture-intercepts-taps-from-embedded-avplayerviewcontroller | ios, swift, swiftui, avplayerviewcontroller, uiviewcontrollerrepresentable | 1,782,294,283 |
se_56659229 | stackoverflow | MOBILE_DEVELOPMENT | AES Decryption using CommonCrypto - some characters are missing | AES Decryption using CommonCrypto - some characters are missing
{
"order_id": 5,
"no": "19000038",
"id": 10,
"name": "John Doe"
}
I encrypt above data using online AES encryption website which is:
https://www.devglan.com/online-tools/aes-encryption-decryption
using CBC mode, 256 Key size and Base64 output t... | https://stackoverflow.com/questions/56659229/aes-decryption-using-commoncrypto-some-characters-are-missing | swift, encryption, aes, cbc-mode | 1,560,910,990 |
se_78314074 | stackoverflow | MOBILE_DEVELOPMENT | SA_RESETHAND flag in sigaction not working for swift exceptions | SA_RESETHAND flag in sigaction not working for swift exceptions
I have an exception handling frame for an Xcode application in macOS, which contains Cpp and Swift code. I am using the Unix signals frame for handling exceptions using sigaction. My sigaction signal handler get invoked when there is a swift or Cpp except... | https://stackoverflow.com/questions/78314074/sa-resethand-flag-in-sigaction-not-working-for-swift-exceptions | c++, swift, exception, sigaction | 1,712,893,822 |
se_79965269 | stackoverflow | MOBILE_DEVELOPMENT | How to make headerView with overlapping content design in SwiftUI | How to make headerView with overlapping content design in SwiftUI
I need half of Header View to be covered with remaining UI. I am using header view and list according to UI design and given list top padding in (- value) so it goes up on header view now UI looks good but when I scroll list then my header title cove... | https://stackoverflow.com/questions/79965269/how-to-make-headerview-with-overlapping-content-design-in-swiftui | ios, swift, user-interface, swiftui, swiftui-zstack | 1,782,130,607 |
se_43618487 | stackoverflow | MOBILE_DEVELOPMENT | Why are emoji characters like 👩👩👧👦 treated so strangely in Swift strings? | Why are emoji characters like 👩👩👧👦 treated so strangely in Swift strings?
The character 👩👩👧👦 (family with two women, one girl, and one boy) is encoded as such:
U+1F469 WOMAN,
U+200D ZWJ,
U+1F469 WOMAN,
U+200D ZWJ,
U+1F467 GIRL,
U+200D ZWJ,
U+1F466 BOY
So it's very interesting... | https://stackoverflow.com/questions/43618487/why-are-emoji-characters-like-treated-so-strangely-in-swift-strings | swift, string, unicode, emoji | 1,493,145,388 |
se_75537843 | stackoverflow | MOBILE_DEVELOPMENT | Xcode Export Localizations for an iOS app using Swift Package Manager packages fails: No such module UIKit | Xcode Export Localizations for an iOS app using Swift Package Manager packages fails: No such module UIKit
I'm building an iOS app (the supported destinations in the app target are iOS, iPad and Mac - Designed for iPad). I've many SPM frameworks in order to split my codebase in different features. I want to export the... | https://stackoverflow.com/questions/75537843/xcode-export-localizations-for-an-ios-app-using-swift-package-manager-packages-f | ios, swift, xcode, swift-package-manager | 1,677,097,735 |
se_78687381 | stackoverflow | MOBILE_DEVELOPMENT | SwiftUI Rounded view corners like device screen | SwiftUI Rounded view corners like device screen
I'd like to make a view with rounded corners that fills the whole screen. And when a horizontal offset is applied to the whole view, the view's corners match that of the devices screen (The views corner curves should look identical to the phone's screen curve). I know ho... | https://stackoverflow.com/questions/78687381/swiftui-rounded-view-corners-like-device-screen | ios, swift, swiftui | 1,719,707,450 |
se_79965446 | stackoverflow | MOBILE_DEVELOPMENT | Calling function in a View from a menu item | Calling function in a View from a menu item
I must be overlooking something obvious because this has to be a common use case. I have some UI within a View that calls a function defined in the View. I would also like to call this same function from a menu item. Here is a test case of what I'm bring to do.
import Swi... | https://stackoverflow.com/questions/79965446/calling-function-in-a-view-from-a-menu-item | swift, swiftui | 1,782,152,901 |
se_79790204 | stackoverflow | MOBILE_DEVELOPMENT | Library 'swiftWebKit' not found when building for physical iOS devices after upgrading Xcode — works fine on Simulator | Library 'swiftWebKit' not found when building for physical iOS devices after upgrading Xcode — works fine on Simulator
After upgrading to the latest version of Xcode Version 26.0 (17A324), my React Native iOS project fails to build or run on a physical iOS device, but runs successfully on the iOS Simulator.
Th... | https://stackoverflow.com/questions/79790204/library-swiftwebkit-not-found-when-building-for-physical-ios-devices-after-upg | swift, xcode, react-native, xcode26 | 1,760,447,271 |
se_31638129 | stackoverflow | MOBILE_DEVELOPMENT | How to use Xcode Logger with Swift | How to use Xcode Logger with Swift
I've found this library on Github which looks like a pretty neat replacement for NSLog but I don't know how to use it with Swift in my iOS project.
I've tried calling XLog or DLog in my functions but I get use of unresolved identifier .... I allowed Xcode to create a bridging header... | https://stackoverflow.com/questions/31638129/how-to-use-xcode-logger-with-swift | swift, logging | 1,437,920,997 |
se_79965130 | stackoverflow | MOBILE_DEVELOPMENT | iOS 27: App freezes when accessing CLLocationManager.authorizationStatus() | iOS 27: App freezes when accessing CLLocationManager.authorizationStatus()
I'm running into a strange issue that only occurs on iOS 27.
I have a basic LocationManager implementation:
import Foundation
import CoreLocation
import UIKit
class LocationManager: NSObject, CLLocationManagerDelegate {
static let share... | https://stackoverflow.com/questions/79965130/ios-27-app-freezes-when-accessing-cllocationmanager-authorizationstatus | ios, swift, xcode, location | 1,782,116,747 |
se_56487679 | stackoverflow | MOBILE_DEVELOPMENT | How do I easily support light and dark mode with a custom color used in my app? | How do I easily support light and dark mode with a custom color used in my app?
Let's say I have a custom color in my app:
extension UIColor {
static var myControlBackground: UIColor {
return UIColor(red: 0.3, green: 0.4, blue: 0.5, alpha: 1)
}
}
I use this in a custom control (and other places) as th... | https://stackoverflow.com/questions/56487679/how-do-i-easily-support-light-and-dark-mode-with-a-custom-color-used-in-my-app | ios, swift, uicolor, ios-darkmode, uitraitcollection | 1,559,879,013 |
se_79956962 | stackoverflow | MOBILE_DEVELOPMENT | Universal Links and AASA: How do you deal with caching during development? | Universal Links and AASA: How do you deal with caching during development?
I’ve encountered some rather strange behavior with Universal Links. I periodically run into issues with them. I add a link path to the AASA file, but it doesn’t even open the app. As far as I understand, without adding any specific handling for... | https://stackoverflow.com/questions/79956962/universal-links-and-aasa-how-do-you-deal-with-caching-during-development | swift, safari, uikit, deep-linking, universal-link | 1,781,251,067 |
se_57844571 | stackoverflow | MOBILE_DEVELOPMENT | Force RTL or LTR in SwiftUI | Force RTL or LTR in SwiftUI
I know SwiftUI changes the direction of the application, based on the system language of the device. but is there a way to ignore the system language and force the app to be always RTL or LTR? | https://stackoverflow.com/questions/57844571/force-rtl-or-ltr-in-swiftui | ios, swift, swiftui | 1,567,966,291 |
se_65878957 | stackoverflow | MOBILE_DEVELOPMENT | Is it possible to perform an action on NavigationLink tap? | Is it possible to perform an action on NavigationLink tap?
I have a simple View showing a list of 3 items. When the user taps on an item, it navigates to the next view. This works fine. However, I would like to also perform an action (set a variable in a View Model) when a list item is tapped.
Is this possible? Here's... | https://stackoverflow.com/questions/65878957/is-it-possible-to-perform-an-action-on-navigationlink-tap | swift, swiftui | 1,611,548,586 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.