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_79863386
stackoverflow
MOBILE_DEVELOPMENT
iOS Universal Link opens in Safari - AASA fails on Apple CDN with 403 Forbidden, but validates elsewhere
iOS Universal Link opens in Safari - AASA fails on Apple CDN with 403 Forbidden, but validates elsewhere The Problem Our iOS Universal Links (https://Client1.example.com/card/96/58aa?utm_campaign=ADHOC&utm_medium=shareable) are opening in Safari instead of our app, the same links were opening the app earlier but stope...
https://stackoverflow.com/questions/79863386/ios-universal-link-opens-in-safari-aasa-fails-on-apple-cdn-with-403-forbidden
ios, swift, ios-universal-links
1,767,880,042
se_69755551
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI: how to make searchbar become first responder?
SwiftUI: how to make searchbar become first responder? I would like to make the searchbar become first responder as soon as the view appears. Unfortunately there is no @FocusState support yet / other calls to achieve this out-of-the-box. Is there another way of achieving this? struct SearchDemo: View { @State...
https://stackoverflow.com/questions/69755551/swiftui-how-to-make-searchbar-become-first-responder
ios, swift, swiftui
1,635,429,788
se_53033865
stackoverflow
MOBILE_DEVELOPMENT
Scroll to bottom of WKWebView, macOS?
Scroll to bottom of WKWebView, macOS? I have a WKWebView in macOS and was wondering: how do I programatically scroll to the bottom of the webpage? Any help is appreciated, thanks.
https://stackoverflow.com/questions/53033865/scroll-to-bottom-of-wkwebview-macos
swift, macos, wkwebview
1,540,745,280
se_79862332
stackoverflow
MOBILE_DEVELOPMENT
NSHostingView with SwiftUI gestures not receiving mouse events behind another NSHostingView on macOS 26
NSHostingView with SwiftUI gestures not receiving mouse events behind another NSHostingView on macOS 26 Issue Description (Swift / AppKit on macOS Tahoe 26.2, M1 Pro): I’m new to Swift/AppKit and ran into an issue with a multi-layered UI setup. Here’s the structure of my interface: Bottom layer: An AppKit view NSView...
https://stackoverflow.com/questions/79862332/nshostingview-with-swiftui-gestures-not-receiving-mouse-events-behind-another-ns
swift, swiftui, appkit
1,767,782,733
se_73209307
stackoverflow
MOBILE_DEVELOPMENT
Xcode weakly-linked/optional framework not excluded
Xcode weakly-linked/optional framework not excluded I am working on an iOS project. I am using a framework (UnityFramework) that only works on device and not on the simulator. I want to exclude the framework when running on simulator for ease of testing, as the app will not compile otherwise. I have followed the instr...
https://stackoverflow.com/questions/73209307/xcode-weakly-linked-optional-framework-not-excluded
ios, swift, xcode
1,659,450,622
se_76755300
stackoverflow
MOBILE_DEVELOPMENT
NLembedding for iOS returning nil
NLembedding for iOS returning nil I'm currently implementing on-device vector search using Apple's Natural Language Library. However, I'm facing an issue where the iOS SentenceEmbedding function is returning nil. It was working fine on macOS and iOS until recently. I've attached the terminal output and the code line w...
https://stackoverflow.com/questions/76755300/nlembedding-for-ios-returning-nil
ios, swift, machine-learning, nlp
1,690,207,753
se_79845191
stackoverflow
MOBILE_DEVELOPMENT
Why does cancelByProducingResumeData() return nil for upload tasks?
Why does cancelByProducingResumeData() return nil for upload tasks? I'm implementing resumable uploads on iOS based on this documentation and wwdc video The server correctly sends a 104 Upload Resumption Supported informational response, which I receive in my delegate. However, when I cancel the upload task using canc...
https://stackoverflow.com/questions/79845191/why-does-cancelbyproducingresumedata-return-nil-for-upload-tasks
ios, swift, nsurlsession, urlsession, nsurlsessionuploadtask
1,765,567,794
se_79861251
stackoverflow
MOBILE_DEVELOPMENT
How to "fast-forward" physics simulation in RealityKit
How to "fast-forward" physics simulation in RealityKit I have a game where I put 100 toys in random space. Some times 2 toys may be spawned at a very close location, where they collide with each other, causing very abrupt movement. But after 2 seconds as physics play out, they will be settled. The toys are o...
https://stackoverflow.com/questions/79861251/how-to-fast-forward-physics-simulation-in-realitykit
ios, swift, realitykit
1,767,666,787
se_79644850
stackoverflow
MOBILE_DEVELOPMENT
Does Swift Compiler Remove `OSLog` Debug Logs in Release Builds, or Is `#if DEBUG` Necessary to Avoid Overhead?
Does Swift Compiler Remove `OSLog` Debug Logs in Release Builds, or Is `#if DEBUG` Necessary to Avoid Overhead? I'm working on an iOS app using Swift and leveraging OSLog for logging debug information during development. I’ve been using OSLog like this: import OSLog let logger = Logger(subsystem: "com.example.app", c...
https://stackoverflow.com/questions/79644850/does-swift-compiler-remove-oslog-debug-logs-in-release-builds-or-is-if-debu
ios, swift, logging, oslog
1,748,575,703
se_79861134
stackoverflow
MOBILE_DEVELOPMENT
How to prevent layout interfering with an ongoing UIView animation
How to prevent layout interfering with an ongoing UIView animation I am trying to find out how I can prevent a layout of views to interfere with an ongoing animation of the same view. My app has a tabbar at the bottom of the screen controlled by a UITabBarController. In certain situations, the tabbar needs to animate ...
https://stackoverflow.com/questions/79861134/how-to-prevent-layout-interfering-with-an-ongoing-uiview-animation
ios, swift, animation, uikit
1,767,645,059
se_38393266
stackoverflow
MOBILE_DEVELOPMENT
LSApplicationQueriesSchemes and derived data
LSApplicationQueriesSchemes and derived data I would like to open a whatsapp url in my app like. let whatsAppUrl = NSURL(string: "whatsapp://send?text=Hello%2C%20World!") if UIApplication.sharedApplication().canOpenURL(whatsAppUrl!) { UIApplication.sharedApplication().openURL(whatsAppUrl!) } I extend my info.pl...
https://stackoverflow.com/questions/38393266/lsapplicationqueriesschemes-and-derived-data
swift
1,468,576,866
se_76715005
stackoverflow
MOBILE_DEVELOPMENT
AppIntent and AppShortcutsProvider does not work with Siri
AppIntent and AppShortcutsProvider does not work with Siri I have a very simple AppIntent and AppShortcutsProvider. It's working great in the Shortcuts app, but it just will not work when asking Siri. // MARK: - OpenLibrary struct OpenLibrary: AppIntent { static let title: LocalizedStringResource = "Open Library" ...
https://stackoverflow.com/questions/76715005/appintent-and-appshortcutsprovider-does-not-work-with-siri
swift, siri, sirishortcuts, appintents
1,689,699,110
se_71657378
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI FocusState not working when TextField is in ToolbarItem
SwiftUI FocusState not working when TextField is in ToolbarItem My purpose is to auto focus and remove focus. The page that is launched for the first time can automatically get the focus, but if you push to the next page, it will automatically fail. works this way struct SearchTextFieldView: View { @FocusSta...
https://stackoverflow.com/questions/71657378/swiftui-focusstate-not-working-when-textfield-is-in-toolbaritem
swift, swiftui, uitextfield
1,648,535,142
se_79606400
stackoverflow
MOBILE_DEVELOPMENT
Cannot find interface declaration for 'RCTDefaultReactNativeFactoryDelegate', superclass of 'ReactNativeDelegate'
Cannot find interface declaration for 'RCTDefaultReactNativeFactoryDelegate', superclass of 'ReactNativeDelegate' Using Swift in Your iOS Native Modules: https://reactnative.dev/docs/next/the-new-architecture/turbo-modules-with-swift When following this tutorial to write TurboModules in Swift, the foll...
https://stackoverflow.com/questions/79606400/cannot-find-interface-declaration-for-rctdefaultreactnativefactorydelegate-su
swift, react-native, react-native-turbomodule
1,746,425,263
se_71464974
stackoverflow
MOBILE_DEVELOPMENT
What is PreviewsEnabled key referring to in .xcworkspace/xcshareddata/WorkspaceSettings.xcsettings in Xcode
What is PreviewsEnabled key referring to in .xcworkspace/xcshareddata/WorkspaceSettings.xcsettings in Xcode Recently when updating to the latest Xcode 13 and simply just saving the project the following key-value pair has been added to ProjectName.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings <key>PreviewsEnab...
https://stackoverflow.com/questions/71464974/what-is-previewsenabled-key-referring-to-in-xcworkspace-xcshareddata-workspaces
swift, xcode, xcode13
1,647,247,360
se_79736031
stackoverflow
MOBILE_DEVELOPMENT
Cursor don&#39;t show SwiftPM Dependencies
Cursor don&#39;t show SwiftPM Dependencies I successfully added Swift Package Manager (SPM) dependencies to my project in Xcode, but when I open the project in Cursor, the project files show up fine, but none of the SPM dependencies are visible. I have confirmed the following: The SPM dependencies are correctly displ...
https://stackoverflow.com/questions/79736031/cursor-dont-show-swiftpm-dependencies
ios, swift, xcode, swift-package-manager, cursor-ide
1,755,224,705
se_79861509
stackoverflow
MOBILE_DEVELOPMENT
XCode 26 macOS doesn&#39;t allow shallow Framework
XCode 26 macOS doesn&#39;t allow shallow Framework I encountered a problem on an old app of mine. I had built a TensorFlowLiteC xcFramework with this structure: TensorFlowLiteC.framework/ ├── Headers/ ├── Info.plist ← shallow bundle (iOS-style) ├── Modules/ └── TensorFlowLiteC But the new Xcode 26 enforce un...
https://stackoverflow.com/questions/79861509/xcode-26-macos-doesnt-allow-shallow-framework
swift, xcode, macos, xcframework, xcode26
1,767,693,944
se_79859204
stackoverflow
MOBILE_DEVELOPMENT
Using Actor is always the best practice in Swift Concurrency world?
Using Actor is always the best practice in Swift Concurrency world? I'm generally holding a Task variable to use cancel for an efficiency in somewhere. (and also calling cancel before setting the Task to avoid making duplicate asynchronous job.) class Test { private var task: Task<Void, Never>? func start() { ...
https://stackoverflow.com/questions/79859204/using-actor-is-always-the-best-practice-in-swift-concurrency-world
ios, swift, swift-concurrency
1,767,364,955
se_54403834
stackoverflow
MOBILE_DEVELOPMENT
Alamofire convert bool on int
Alamofire convert bool on int I have func for request and have dictionary for params. Dictionary contained [String, Any]. And i need send Bool in parameters but alamofire convert my Bool on Int and server can't get it. How i can send Bool? my func: func postDataFor(methodPath: String, params:[String:Any], completi...
https://stackoverflow.com/questions/54403834/alamofire-convert-bool-on-int
swift, alamofire
1,548,684,928
se_79857465
stackoverflow
MOBILE_DEVELOPMENT
Smooth horizontal autoscroll while dragging near edges (keep item under finger)
Smooth horizontal autoscroll while dragging near edges (keep item under finger) I have a SwiftUI horizontal editor (multiple “canvases” laid out side‑by‑side in a ScrollView). When the user drags a selected object and reaches the left/right edge of the visible area, I want the ScrollView to autoscroll smoothly so the ...
https://stackoverflow.com/questions/79857465/smooth-horizontal-autoscroll-while-dragging-near-edges-keep-item-under-finger
ios, swift, swiftui, uiscrollview
1,767,094,554
se_60697362
stackoverflow
MOBILE_DEVELOPMENT
Packages are not supported when using the legacy build system, but the current workspace has it enabled
Packages are not supported when using the legacy build system, but the current workspace has it enabled I shot the project through sourceTree and I am trying to open it on Xcode. While I can run it on the master branch without any problem, I get the following error on the develop branch -> "Packages are not supported ...
https://stackoverflow.com/questions/60697362/packages-are-not-supported-when-using-the-legacy-build-system-but-the-current-w
ios, swift, xcode, build, atlassian-sourcetree
1,584,304,212
se_79860800
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI, iOS 26.2, ToolbarItem .largeTitle and .title, overlap issue
SwiftUI, iOS 26.2, ToolbarItem .largeTitle and .title, overlap issue I built this very simple example to demonstrate the issue im facing on iOS 26 when trying to use custom ToolbarItem element for .largeTitle. Code: struct ContentView: View { var body: some View { NavigationStack { Screen() ...
https://stackoverflow.com/questions/79860800/swiftui-ios-26-2-toolbaritem-largetitle-and-title-overlap-issue
ios, swift, swiftui, ios26, toolbaritems
1,767,619,089
se_66539135
stackoverflow
MOBILE_DEVELOPMENT
How can I pass caught errors in prepared for segue method?
How can I pass caught errors in prepared for segue method? The view loads, checks something and the check will fail and throw an exception which in turn will be caught as the example shows. In this case, I want to show an error view via segue. How can I transfer the caught errors via prepare segue method? The only ide...
https://stackoverflow.com/questions/66539135/how-can-i-pass-caught-errors-in-prepared-for-segue-method
swift, xcode
1,615,249,712
se_77686854
stackoverflow
MOBILE_DEVELOPMENT
SwiftData Predicate with Many to Many Relationship
SwiftData Predicate with Many to Many Relationship I'm building a Photo managing app that uses tags to help filter images. I decided to use SwiftData since it makes syncing images via CloudKit super easy. However, I'm having trouble fetching photos based off the tags they have. My models look something like this: @Mod...
https://stackoverflow.com/questions/77686854/swiftdata-predicate-with-many-to-many-relationship
swift, cloudkit, predicate, swiftdata
1,703,005,471
se_79829717
stackoverflow
MOBILE_DEVELOPMENT
Facing an error of Swift.String : Swift.Error in heresdk
Facing an error of Swift.String : Swift.Error in heresdk I have Project where I have already integrated heresdk since 2 years back and it is working fine but when I update to latest heresdk then it gives an following error protocol conformance descriptor for Swift.String : Swift.Error in heresdk I have tried everythi...
https://stackoverflow.com/questions/79829717/facing-an-error-of-swift-string-swift-error-in-heresdk
ios, swift, here-api, heremaps-ios-sdk
1,764,074,366
se_79860323
stackoverflow
MOBILE_DEVELOPMENT
SwiftData - limit to one of each matching query
SwiftData - limit to one of each matching query I have a SwiftData model. For the sake of simplicity, the model looks a bit like this: class LogItem { var timestamp: Date = Date() var itemName:String = "" var itemValue:Int = 0 } This is, as you likely guessed, an activity log. There are many itemNames. ...
https://stackoverflow.com/questions/79860323/swiftdata-limit-to-one-of-each-matching-query
swift, swiftui, swiftdata
1,767,553,258
se_79855759
stackoverflow
MOBILE_DEVELOPMENT
In SwiftUI Toolbar button and image are visible through full screen overlay view
In SwiftUI Toolbar button and image are visible through full screen overlay view So I have some view with ToolBar at the top. It has leading Button and trailing Image. var body: some View { NavigationView { ZStack { content() VStack { GeometryReader { geometry in ...
https://stackoverflow.com/questions/79855759/in-swiftui-toolbar-button-and-image-are-visible-through-full-screen-overlay-view
ios, swift, swiftui, overlay, toolbar
1,766,836,505
se_79860338
stackoverflow
MOBILE_DEVELOPMENT
RealityKit blinking magenta artifacts in post-processor due to race condition
RealityKit blinking magenta artifacts in post-processor due to race condition I am working on a "glowing effect" post processor. Basically, it has 4 passes: render selected entities (that I want to apply glow effect) to a "mask texture" blur the mask texture horizontally blur the mask texture vertically composite ...
https://stackoverflow.com/questions/79860338/realitykit-blinking-magenta-artifacts-in-post-processor-due-to-race-condition
ios, swift, realitykit
1,767,555,188
se_24046164
stackoverflow
MOBILE_DEVELOPMENT
How do I get a reference to the AppDelegate in Swift?
How do I get a reference to the AppDelegate in Swift? How do I get a reference to AppDelegate in Swift? Ultimately, I want to use the reference to access the managed object context.
https://stackoverflow.com/questions/24046164/how-do-i-get-a-reference-to-the-appdelegate-in-swift
swift, appdelegate
1,401,910,945
se_79007177
stackoverflow
MOBILE_DEVELOPMENT
Calling native Swift function from Kotlin Multiplatform shared code
Calling native Swift function from Kotlin Multiplatform shared code I'm trying to implement Firebase Cloud Messaging on a Kotlin Multiplatform project. Everything is going great except for the iOS part. I have some shared code: expect suspend fun getFCMToken(): String?; And in the Android project, I use actual for a ...
https://stackoverflow.com/questions/79007177/calling-native-swift-function-from-kotlin-multiplatform-shared-code
ios, swift, kotlin, kotlin-multiplatform, kmp
1,726,842,311
se_69266710
stackoverflow
MOBILE_DEVELOPMENT
CAShapeLayer and UIBezierPath artifacts on touch
CAShapeLayer and UIBezierPath artifacts on touch I am trying to implement Quick Path effect. I have the following code: func path() -> UIBezierPath { let widthMultiplier = maxWidth / CGFloat(points.count) let firstPoint = points.last var path = UIBezierPath() if let pointStart = firstP...
https://stackoverflow.com/questions/69266710/cashapelayer-and-uibezierpath-artifacts-on-touch
ios, swift, objective-c, touch
1,632,217,306
se_79703756
stackoverflow
MOBILE_DEVELOPMENT
Swift RealityKit BlendShapes not working during animation playback
Swift RealityKit BlendShapes not working during animation playback I’m running into an issue with RealityKit 3.0+ when trying to animate BlendShapes (ShapeKeys) on a character while a predefined animation is playing (from a .usdz model). No matter what I try, the shape keys don’t animate properly if any animation is c...
https://stackoverflow.com/questions/79703756/swift-realitykit-blendshapes-not-working-during-animation-playback
ios, swift, realitykit
1,752,684,329
se_79859632
stackoverflow
MOBILE_DEVELOPMENT
Reload an iOS widget at midnight UTC
Reload an iOS widget at midnight UTC I'm designing my first iOS widget. It provides a date in UTC time so, the best optimization, would be to refresh it at every UTC midnight. I found this way let today00 = Calendar.current.startOfDay(for: Date()) let entry = CalendarEntry(date: today00) to refresh th...
https://stackoverflow.com/questions/79859632/reload-an-ios-widget-at-midnight-utc
swift, date, calendar
1,767,435,373
se_73046513
stackoverflow
MOBILE_DEVELOPMENT
Extracting key from TR31 encrypted key block in swift with KEK
Extracting key from TR31 encrypted key block in swift with KEK I am trying to implement this working python code in Swift. Basically it takes a TR31 key block and unwrap the key from it using a kek. This is the working Python Code which gives the correct key in clear(f039121bec83d26b169bdcd5b22aaf8f): kek = "89E88CF7...
https://stackoverflow.com/questions/73046513/extracting-key-from-tr31-encrypted-key-block-in-swift-with-kek
swift, encryption, key, aes, unwrap
1,658,296,044
se_79859640
stackoverflow
MOBILE_DEVELOPMENT
Can a TipKit tip be permanently dismissed / marked as displayed by tapping outside the tip?
Can a TipKit tip be permanently dismissed / marked as displayed by tapping outside the tip? I am using the TipKit in my iOS 16+ app to show usage hints to the user. Since TipKit is available from iOS 17+ I use the protocoal based wrapper shown below. While displaying tips works fine in general, I noticed that tips kee...
https://stackoverflow.com/questions/79859640/can-a-tipkit-tip-be-permanently-dismissed-marked-as-displayed-by-tapping-outsi
ios, swift, xcode, swiftui, tipkit
1,767,436,327
se_79859940
stackoverflow
MOBILE_DEVELOPMENT
Using SwiftUI MapReader to position Views over map
Using SwiftUI MapReader to position Views over map I'm trying to use SwiftUI to make a ZStack containing a Map (with a MapKit map view), and a Circle view that is placed on top of it. The Circle's pixel position should be to the pixel position on the map corresponding to a certain lat/lng coordinate. I'm not using Map...
https://stackoverflow.com/questions/79859940/using-swiftui-mapreader-to-position-views-over-map
ios, swift, swiftui, mapkit
1,767,488,517
se_76147236
stackoverflow
MOBILE_DEVELOPMENT
Setup UndoManager in NSView/NSViewController
Setup UndoManager in NSView/NSViewController I'm trying to setup undo operations in my custom text view. My app structure is pretty simple - the default macOS app in XCode (not document based app). I have the following subclasses class TextViewController: NSViewController class TextView: NSView At the end of TextViewC...
https://stackoverflow.com/questions/76147236/setup-undomanager-in-nsview-nsviewcontroller
swift, cocoa
1,682,946,963
se_35294071
stackoverflow
MOBILE_DEVELOPMENT
Swift 2 internal vs private
Swift 2 internal vs private I'm confused about the internal and private access modifier. The docs says: “Internal access enables entities to be used within any source file from their defining module, but not in any source file outside of that module. You typically use internal access when defining an app’s or a frame...
https://stackoverflow.com/questions/35294071/swift-2-internal-vs-private
swift, swift2
1,455,026,724
se_79855969
stackoverflow
MOBILE_DEVELOPMENT
Background Assets Framework server connection problem
Background Assets Framework server connection problem Apple provides a Background Assets Framework that allows asset files to be stored on the App Store and downloaded on demand by the user. The docs include instructions for testing assets locally using a "localhost" server. I've created the Certificate Authority as d...
https://stackoverflow.com/questions/79855969/background-assets-framework-server-connection-problem
ios, swift, xcode, app-store, background-assets-framework
1,766,870,990
se_79853968
stackoverflow
MOBILE_DEVELOPMENT
Accessing Swift function in a framework from Objective-C AppDelegate.m
Accessing Swift function in a framework from Objective-C AppDelegate.m I'm working on an application where SwiftUI is being introduced to an app that was originally in Objective-C and then converted about 50% to Swift. Now future development will be in SwiftUI for the most part. So the goal at present is to use a comp...
https://stackoverflow.com/questions/79853968/accessing-swift-function-in-a-framework-from-objective-c-appdelegate-m
swift, objective-c, header, frameworks
1,766,521,815
se_36440548
stackoverflow
MOBILE_DEVELOPMENT
Apps Script API errors on given ViewController
Apps Script API errors on given ViewController Has anyone gone through this API and has figured it out? This is my third time trying to get this to work by following this guide I am using the swift version of this guide. Google Apps Script Guide And it always give me the same errors. import UIKit class ViewController...
https://stackoverflow.com/questions/36440548/apps-script-api-errors-on-given-viewcontroller
ios, swift, xcode, google-apps-script-api
1,459,910,543
se_76551669
stackoverflow
MOBILE_DEVELOPMENT
Hide All Windows by Default in SwiftUI macOS App
Hide All Windows by Default in SwiftUI macOS App I am working on a new SwiftUI-only menu bar application and stumbled into the following problem; Whenever I define either a Window or WindowGroup in SwiftUI, at least one window is always opened on app launch. Conditional rendering (like if x { Window() }) isn't support...
https://stackoverflow.com/questions/76551669/hide-all-windows-by-default-in-swiftui-macos-app
swift, xcode, macos, swiftui
1,687,714,425
se_50911575
stackoverflow
MOBILE_DEVELOPMENT
How to detect links in a textView text and replace them with clickable link text
How to detect links in a textView text and replace them with clickable link text I receive a description text for an object from the backend in html like this: "My two favorite places to indulge on my sugar cravings are <a href=\"https://huizevanwely.nl/\">Huize van Wely</a> (located in the Gelderlandplein shopping ...
https://stackoverflow.com/questions/50911575/how-to-detect-links-in-a-textview-text-and-replace-them-with-clickable-link-text
html, ios, swift, regex, uitextview
1,529,331,606
se_49144910
stackoverflow
MOBILE_DEVELOPMENT
Limit array size in swift
Limit array size in swift Is there a way to limit array size in swift so that when you append elements to it when it's full, it doesn't append? I know this can be done programmatically. Wondering if swift has inbuilt handling for this. eg: array -> Array with size 10 array.append(1) . . . array.append(10) ar...
https://stackoverflow.com/questions/49144910/limit-array-size-in-swift
arrays, swift
1,520,401,365
se_39815054
stackoverflow
MOBILE_DEVELOPMENT
How to include assets / resources in a Swift Package Manager library?
How to include assets / resources in a Swift Package Manager library? I would like to ship my library using Apple's Swift Package Manager. However my lib includes a .bundle file with several strings translated in different languages. Using cocoapods, I can include it using spec.resource. But in SwiftPM, I cannot do it...
https://stackoverflow.com/questions/39815054/how-to-include-assets-resources-in-a-swift-package-manager-library
swift, swift-package-manager
1,475,395,394
se_79856646
stackoverflow
MOBILE_DEVELOPMENT
How to apply a background outside a rounded view’s corner radius?
How to apply a background outside a rounded view’s corner radius? I’m learning how to build a Toast notification for an iOS app using SwiftUI. I can’t figure out how to draw a background outside the rounded view — specifically, I need a colored sidebar behind the content of the toast view. Here is what I currently get...
https://stackoverflow.com/questions/79856646/how-to-apply-a-background-outside-a-rounded-view-s-corner-radius
ios, swift, user-interface, swiftui, toast
1,766,998,335
se_57825757
stackoverflow
MOBILE_DEVELOPMENT
Obj-C has @available. Swift has #available. What can I use in C/C++?
Obj-C has @available. Swift has #available. What can I use in C/C++? If your code requires a feature that is only available in macOS 10.12 or newer, but you want your code to also deploy to earlier system versions, you can use @available in Objective-C: if (@available(macOS 10.12, *)) { // Code that requires 10.12...
https://stackoverflow.com/questions/57825757/obj-c-has-available-swift-has-available-what-can-i-use-in-c-c
c, objective-c, swift, macos
1,567,787,819
se_64291183
stackoverflow
MOBILE_DEVELOPMENT
Widget in the app not appearing in the device?
Widget in the app not appearing in the device? We have a problem with adding the widget to the screen. Our app has 2 widgets and app is live in AppStore. The problem that some users can see only 1 widget (randomly, and using the newest version of the app), some see both widgets. It is hard to debug as I see both widge...
https://stackoverflow.com/questions/64291183/widget-in-the-app-not-appearing-in-the-device
ios, swift, swiftui, widgetkit
1,602,315,952
se_77731837
stackoverflow
MOBILE_DEVELOPMENT
Storing multiple images in swift data
Storing multiple images in swift data I am currently working on a project that needs to allow users to store multiple images in swift data! I was wondering if anyone knew how to do this. below is my current model import Foundation import SwiftData @Model class SwiftDataModel { // Session Data var record_type:...
https://stackoverflow.com/questions/77731837/storing-multiple-images-in-swift-data
swift, swiftdata
1,703,850,935
se_68061637
stackoverflow
MOBILE_DEVELOPMENT
Conforming an array to Identifiable in SwiftUI
Conforming an array to Identifiable in SwiftUI I have a little question about conforming to Identifiable in SwiftUI. There are situations where we are required to have a given type MyType to conform to Identifiable. But I am facing a case where I am required to have [MyType] (an array of MyType) to conform to Identifi...
https://stackoverflow.com/questions/68061637/conforming-an-array-to-identifiable-in-swiftui
ios, swift, swiftui, protocols, identifiable
1,624,242,521
se_77182083
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI - Create a filesystem tree view from a list of paths
SwiftUI - Create a filesystem tree view from a list of paths I have a list of paths, for example a list parsed from the 'ls -R' stdout into an array, how can I create a very simple tree view list with that? I am still learning swift, I can't figure out how to create the data structure necessary to populate a List view...
https://stackoverflow.com/questions/77182083/swiftui-create-a-filesystem-tree-view-from-a-list-of-paths
swift, listview, swiftui, directory, treeview
1,695,747,766
se_79857459
stackoverflow
MOBILE_DEVELOPMENT
In RealiktKit we are creating objects with MeshResource but we are unable to set different materials for different faces
In RealiktKit we are creating objects with MeshResource but we are unable to set different materials for different faces Using following blocks we are creating front and back of an entity. They are same polygons with some -z distance between them. We see both side of it when we rotate entity in scene. Looks like both ...
https://stackoverflow.com/questions/79857459/in-realiktkit-we-are-creating-objects-with-meshresource-but-we-are-unable-to-set
swift, realitykit
1,767,094,217
se_79857885
stackoverflow
MOBILE_DEVELOPMENT
How to damp `linearDamping` in horizontal (x/z) axes only in RealityKit&#39;s physics
How to damp `linearDamping` in horizontal (x/z) axes only in RealityKit&#39;s physics In RealityKit, there's a linearDamping that slows down physics velocity with a "drag" effect (or it feels like making the air "thicker"). For example: var body = PhysicsBodyComponent( shapes: [shape], density: 1, material: ....
https://stackoverflow.com/questions/79857885/how-to-damp-lineardamping-in-horizontal-x-z-axes-only-in-realitykits-physic
ios, swift, realitykit
1,767,140,575
se_79850716
stackoverflow
MOBILE_DEVELOPMENT
How to disable native Full Screen and implement custom &quot;Zoom to Fill&quot; with minimum window constraints in MacOs SwiftUI / Appkit
How to disable native Full Screen and implement custom &quot;Zoom to Fill&quot; with minimum window constraints in MacOs SwiftUI / Appkit I am creating a macOs SwiftUI document based app, and I am struggling with the Window sizes and placements. Right now by default, a normal window has the minimize and full screen op...
https://stackoverflow.com/questions/79850716/how-to-disable-native-full-screen-and-implement-custom-zoom-to-fill-with-minim
swift, macos, swiftui, appkit
1,766,096,020
se_79785399
stackoverflow
MOBILE_DEVELOPMENT
Automatically add string from swift package to apps string catalog
Automatically add string from swift package to apps string catalog I have a String Catalog file in the iOS app. If I have e.g. a Text("Hello App") in a view in the app, everything is automatically recognized and the key "Hello App" is added to the catalogue. But if I have a view in a swift package, e.g. Text("Hello SP...
https://stackoverflow.com/questions/79785399/automatically-add-string-from-swift-package-to-apps-string-catalog
ios, swift, localization, swift-package, string-catalog
1,759,922,409
se_75384236
stackoverflow
MOBILE_DEVELOPMENT
How to customise navigation title in SwftUI
How to customise navigation title in SwftUI I have a very simple NavigationStack that I would like to customise the title, but I can't seem to find the right modifiers to achieve this. NavigationStack { List { NavigationLink { Text("My Child View") } label: { Label("Child Vi...
https://stackoverflow.com/questions/75384236/how-to-customise-navigation-title-in-swftui
swift, swiftui
1,675,851,141
se_68471522
stackoverflow
MOBILE_DEVELOPMENT
Swift Package Manager - copy files build phase for a dynamic dependency
Swift Package Manager - copy files build phase for a dynamic dependency I'm working on an iOS application, and the core of it we are going to open source as a standalone Swift Package for other developers. The Swift Package depends on Sodium (https://github.com/jedisct1/swift-sodium). There is an issue with this libra...
https://stackoverflow.com/questions/68471522/swift-package-manager-copy-files-build-phase-for-a-dynamic-dependency
ios, swift, xcode, swift-package-manager, libsodium
1,626,878,296
se_79857510
stackoverflow
MOBILE_DEVELOPMENT
AppIntent&#39;s perform method to return custom type
AppIntent&#39;s perform method to return custom type Overview I have a custom type `Statistics` that has 3 properties inside it I am trying to return this as part of the AppIntent's `perform` method struct Statistics { var countA: Int var countB: Int var countC: Int } I would like to implement the AppIn...
https://stackoverflow.com/questions/79857510/appintents-perform-method-to-return-custom-type
ios, swift, appintents
1,767,098,516
se_30787674
stackoverflow
MOBILE_DEVELOPMENT
&#39;Module was not compiled for testing&#39; when using @testable
&#39;Module was not compiled for testing&#39; when using @testable I'm trying to use Swift's @testable declaration to expose my classes to the test target. However I'm getting this compiler error: Intervals is the module that contains the classes I'm trying to expose. How do I get rid of this error?
https://stackoverflow.com/questions/30787674/module-was-not-compiled-for-testing-when-using-testable
ios, swift, unit-testing, swift5
1,434,044,189
se_63403624
stackoverflow
MOBILE_DEVELOPMENT
How do I parse the nested JSON data from Brawl Stars api in Swift?
How do I parse the nested JSON data from Brawl Stars api in Swift? The API website I used. I made an account -> Documentation -> Brawlers if you want to try it out Here is part of the JSON I want to parse. I want to print the name inside the "starPowers" array as well as the "gadgets" array. { "items":[ { ...
https://stackoverflow.com/questions/63403624/how-do-i-parse-the-nested-json-data-from-brawl-stars-api-in-swift
json, swift, jsondecoder
1,597,354,968
se_79854163
stackoverflow
MOBILE_DEVELOPMENT
Reliable way of getting data continuously from UDP connection in iOS Swift
Reliable way of getting data continuously from UDP connection in iOS Swift I am trying to create a listener from a drone to my device and receive the data from the from the drone over the UDP connection. The problem is when I start listening to the port where the drone is sending data it only able to read the data onc...
https://stackoverflow.com/questions/79854163/reliable-way-of-getting-data-continuously-from-udp-connection-in-ios-swift
ios, swift, sockets, udp, qudpsocket
1,766,557,451
se_79856692
stackoverflow
MOBILE_DEVELOPMENT
When storing a property with @Attribute(.externalStorage) can we get the url of the file?
When storing a property with @Attribute(.externalStorage) can we get the url of the file? In SwiftData, the .externalStorage attribute signifies that we can easily store any binary data adjacent to the database. This seems like a great way to have easily downloaded/cached files. However, the difficulty is when it come...
https://stackoverflow.com/questions/79856692/when-storing-a-property-with-attribute-externalstorage-can-we-get-the-url-of
ios, swift, swiftdata
1,767,003,082
se_57509909
stackoverflow
MOBILE_DEVELOPMENT
Swift: OSLog/os_log not showing up in console app
Swift: OSLog/os_log not showing up in console app I am building a Swift 5 application with XCode 10.3. For this, I have a framework which contains a implementation for a logsystem (for debugging purposes). The default implementation for this logsystem is based on OSLog/os_log. When using the system in the consuming ap...
https://stackoverflow.com/questions/57509909/swift-oslog-os-log-not-showing-up-in-console-app
swift, logging
1,565,873,316
se_24200888
stackoverflow
MOBILE_DEVELOPMENT
Swift - How to replace characters in a String?
Swift - How to replace characters in a String? I am looking for a way to replace characters in a Swift String. In this example String: "This is my string" I would like to replace the spaces, " ", with "+" to end up with "This+is+my+string". How can I achieve this?
https://stackoverflow.com/questions/24200888/swift-how-to-replace-characters-in-a-string
swift, string, replace
1,402,648,119
se_79852971
stackoverflow
MOBILE_DEVELOPMENT
Preventing iPadOS app from being able to create multiple windows on iPadOS 26
Preventing iPadOS app from being able to create multiple windows on iPadOS 26 I'm building a Multiplatform Apple app, and on iPadOS, I'm trying to configure the app so that the users can't create multiple windows for an app, but can still freely position the app around. Unlike macOS, disabling the ability to create ne...
https://stackoverflow.com/questions/79852971/preventing-ipados-app-from-being-able-to-create-multiple-windows-on-ipados-26
ios, swift, swiftui
1,766,413,934
se_79856875
stackoverflow
MOBILE_DEVELOPMENT
Why does NSEvent.addGlobalMonitorForEvents still work in a Sandboxed macOS app
Why does NSEvent.addGlobalMonitorForEvents still work in a Sandboxed macOS app I am building a macOS utility using SwiftUI and Swift that records and displays keyboard shortcuts (like Cmd+C, Cmd+V) in the UI. To achieve this, I am using NSEvent.addGlobalMonitorForEvents(matching: [.keyDown]). I am aware that global mo...
https://stackoverflow.com/questions/79856875/why-does-nsevent-addglobalmonitorforevents-still-work-in-a-sandboxed-macos-app
swift, macos, swiftui, cocoa, appkit
1,767,020,570
se_79856701
stackoverflow
MOBILE_DEVELOPMENT
Swift Testing - load data before the tests start
Swift Testing - load data before the tests start This is a follow-up to a previous question: Xcode XCTestCase - wait for setup to complete before starting tests In the comments it was suggested to switch to Swift Testing instead of using XCTestCase, so I am exploring that. My question here is similar, with Swift Testi...
https://stackoverflow.com/questions/79856701/swift-testing-load-data-before-the-tests-start
swift, xcode, testing
1,767,003,761
se_60302920
stackoverflow
MOBILE_DEVELOPMENT
Way to get selected tab index from TabView in SwiftUI
Way to get selected tab index from TabView in SwiftUI I've just added TabView, which is working fine, but I unable to fetch the selected tab index out if it. I think I've kept my code perfectly fine, not sure what's wrong. struct DefaultTabbar: View { @State private var selectedItem = 1 var body: som...
https://stackoverflow.com/questions/60302920/way-to-get-selected-tab-index-from-tabview-in-swiftui
ios, swift, swiftui
1,582,123,615
se_79856364
stackoverflow
MOBILE_DEVELOPMENT
How does Swift&#39;s @_semantics attribute make compile time checks and how to make one of my own?
How does Swift&#39;s @_semantics attribute make compile time checks and how to make one of my own? I recently noticed that ForEach's range initializer implementation is like so: @_semantics("swiftui.requires_constant_range") init(_ data: Range<Int>, @ViewBuilder content: @escaping (Int) -> Content) So, when I call th...
https://stackoverflow.com/questions/79856364/how-does-swifts-semantics-attribute-make-compile-time-checks-and-how-to-make
swift
1,766,949,373
se_32063959
stackoverflow
MOBILE_DEVELOPMENT
files send through bluetooth or wifi in iOS
files send through bluetooth or wifi in iOS i want to develop an application. i.e. chating without internet . here my goals are . I Researched Lot of things. i don't know my idea is working or not . can anyone Suggest me where can i Start. from iphone to any other devices to it communicate. it can receive messa...
https://stackoverflow.com/questions/32063959/files-send-through-bluetooth-or-wifi-in-ios
ios, objective-c, swift, bluetooth, wifi
1,439,874,544
se_79850840
stackoverflow
MOBILE_DEVELOPMENT
iPadOS 26 unable to set different orientations in different VC (worked on iPadOS 18, and worked on iPhone)
iPadOS 26 unable to set different orientations in different VC (worked on iPadOS 18, and worked on iPhone) I have a home VC which should be portrait, then it can push a game VC which is landscape. I need to force interface to rotate to landscape when push the game VC, and then rotate back to portrait when popping back...
https://stackoverflow.com/questions/79850840/ipados-26-unable-to-set-different-orientations-in-different-vc-worked-on-ipados
ios, swift, uikit
1,766,120,957
se_63028452
stackoverflow
MOBILE_DEVELOPMENT
How to load files in TestCase in swift
How to load files in TestCase in swift In my Tests directory in my swift project, I have a directory for test cases and a directory for test files. + Tests + UnitTest + MySwiftTests.swift + SourceFiles + file1.xml I need to create a FileManager to load 'file1.xml' in my MySwiftTests. My question ...
https://stackoverflow.com/questions/63028452/how-to-load-files-in-testcase-in-swift
swift
1,595,400,534
se_79853279
stackoverflow
MOBILE_DEVELOPMENT
SWBBuildService quit unexpectedly. (in Xcode 26.2 / macOS 26.2)
SWBBuildService quit unexpectedly. (in Xcode 26.2 / macOS 26.2) In Xcode when compiling my project after adding a file "CDExceptions.swift", I am getting this error. The file contents appear to be making a component "SWBBuildService" in Xcode crash. When I press the "Reopen" it seems to compound the error with: Now ...
https://stackoverflow.com/questions/79853279/swbbuildservice-quit-unexpectedly-in-xcode-26-2-macos-26-2
ios, swift, xcode, macos
1,766,444,930
se_79855276
stackoverflow
MOBILE_DEVELOPMENT
How to apply the iOS 26 &quot;Liquid Glass&quot; swipe transition effect like Camera Mode or Safari Private Mode switcher natively?
How to apply the iOS 26 &quot;Liquid Glass&quot; swipe transition effect like Camera Mode or Safari Private Mode switcher natively? I am looking for the specific native API or implementation approach to replicate the horizontal swipe interaction found in two specific iOS system apps: iOS Camera App The "Mode Switcher...
https://stackoverflow.com/questions/79855276/how-to-apply-the-ios-26-liquid-glass-swipe-transition-effect-like-camera-mode
ios, swift, objective-c, swiftui, uikit
1,766,748,476
se_79855319
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI-Button: Complete VStack clickable
SwiftUI-Button: Complete VStack clickable I made this SwiftUI-View. Only the button shall trigger the code, but the whole VStack reacts when it becomes tapped. Means: the code within the Button-closure is executed. One can say, that the whole VStack-content is clickable. How can I restrict the code, contained in the B...
https://stackoverflow.com/questions/79855319/swiftui-button-complete-vstack-clickable
ios, swift, swiftui
1,766,754,581
se_35494339
stackoverflow
MOBILE_DEVELOPMENT
How do I display a percentage value rounded up or down with no decimal places
How do I display a percentage value rounded up or down with no decimal places I thought this would be fairly straightforward, but I can't seem to work it out or find an existing question that's covers my situation. Originally I set up a number of variables as follows: var score :Int! = 0 var totalquestionsasked :Int...
https://stackoverflow.com/questions/35494339/how-do-i-display-a-percentage-value-rounded-up-or-down-with-no-decimal-places
swift
1,455,837,131
se_75312365
stackoverflow
MOBILE_DEVELOPMENT
UIButton.Configuration causes a fade in animation for changing the button image color
UIButton.Configuration causes a fade in animation for changing the button image color Previously I had a custom UIButton class I used for some buttons that behave similarly to a segmented control (i.e. they can be toggled on/off). I'm attempting to replace the old code to use the new UIButton.Configuration config prop...
https://stackoverflow.com/questions/75312365/uibutton-configuration-causes-a-fade-in-animation-for-changing-the-button-image
ios, swift, uikit, uibutton
1,675,264,689
se_79855105
stackoverflow
MOBILE_DEVELOPMENT
How to disable tab switching animation and remove “liquid” background effect in UITabBarController (iOS 26)
How to disable tab switching animation and remove “liquid” background effect in UITabBarController (iOS 26) I’m working on an iOS app using UITabBarController (UIKit). On iOS 26, when switching between tabs, the tab bar shows: A smooth / liquid-like animation when selecting a tab A dynamic background color / blur ani...
https://stackoverflow.com/questions/79855105/how-to-disable-tab-switching-animation-and-remove-liquid-background-effect-in
swift, liquid-glass
1,766,720,063
se_72287168
stackoverflow
MOBILE_DEVELOPMENT
The file couldn’t be opened because you don’t have permission to view it (REAL DEVICE)
The file couldn’t be opened because you don’t have permission to view it (REAL DEVICE) I know that similar questions have been asked but I couldn't find anything that solves my problem. In my case, I have developed an iOS app (Xcode 13.4) to import and parse data from a CSV file that I pick using an UIDocumentPickerVi...
https://stackoverflow.com/questions/72287168/the-file-couldn-t-be-opened-because-you-don-t-have-permission-to-view-it-real-d
ios, swift, xcode, csv, permissions
1,652,868,552
se_69406357
stackoverflow
MOBILE_DEVELOPMENT
Blendmode with Text view making overlapping area white and rest as black
Blendmode with Text view making overlapping area white and rest as black I'm trying to make a text view that switch colors to white for the region that's overlapping with another view and rest of it in black. Below is the code tryout following this question which uses blend mode but it makes the overlapped region gree...
https://stackoverflow.com/questions/69406357/blendmode-with-text-view-making-overlapping-area-white-and-rest-as-black
swift, swiftui
1,633,093,333
se_62730374
stackoverflow
MOBILE_DEVELOPMENT
Is there any way to create/extract an array of Views using @ViewBuilder in SwiftUI
Is there any way to create/extract an array of Views using @ViewBuilder in SwiftUI I'm trying to create a simple struct that accepts an array of Views and returns an ordinary VStack containing those Views except they all are stacked diagonally. Code: struct LeaningTower<Content: View>: View { var views: [Content] ...
https://stackoverflow.com/questions/62730374/is-there-any-way-to-create-extract-an-array-of-views-using-viewbuilder-in-swift
ios, arrays, swift, swiftui, viewbuilder
1,593,873,073
se_79844575
stackoverflow
MOBILE_DEVELOPMENT
Why The singleton in KMP is two different instances in iOS and Kotlin Mutliple Platform
Why The singleton in KMP is two different instances in iOS and Kotlin Mutliple Platform I got an object(singleton) in kotlin Multiple platform(KMP) Like: object SqIOSApiRegister { private var initialized = false val lock = NSLock() init { if (initialized) { println("wwq ⚠️ ALREADY INI...
https://stackoverflow.com/questions/79844575/why-the-singleton-in-kmp-is-two-different-instances-in-ios-and-kotlin-mutliple-p
swift, kotlin, cocoapods
1,765,516,217
se_60558606
stackoverflow
MOBILE_DEVELOPMENT
Differentiate QRCode and QRCode&#39;s Screenshot / Image using QRCode Reader
Differentiate QRCode and QRCode&#39;s Screenshot / Image using QRCode Reader I am using QRCodeReaderView library to scan a QRCode. Everything is working perfect like reading QRCode and getting values. I did the majors to avoid things such as capturing or screenshooting a QRCode, but there's still a thread that one ca...
https://stackoverflow.com/questions/60558606/differentiate-qrcode-and-qrcodes-screenshot-image-using-qrcode-reader
java, android, swift, kotlin, swift5
1,583,475,815
se_57774820
stackoverflow
MOBILE_DEVELOPMENT
Swift Package Manager: dependency iOS version
Swift Package Manager: dependency iOS version I'm trying to build swift package with external dependency (CoreStore) with xCode11 beta 7. My package is targeted for iOS11+, it's declared in Package.swift: // swift-tools-version:5.1 // The swift-tools-version declares the minimum version of Swift required to build this...
https://stackoverflow.com/questions/57774820/swift-package-manager-dependency-ios-version
swift, xcode11, swift-package-manager, corestore
1,567,524,883
se_27500940
stackoverflow
MOBILE_DEVELOPMENT
How to let the app know if it&#39;s running Unit tests in a pure Swift project?
How to let the app know if it&#39;s running Unit tests in a pure Swift project? One annoying thing when running tests in Xcode 6.1 is that the entire app has to run and launch its storyboard and root view controller. In my app this runs some server calls that fetches API data. However, I don't want the app to do this ...
https://stackoverflow.com/questions/27500940/how-to-let-the-app-know-if-its-running-unit-tests-in-a-pure-swift-project
ios, swift, xcode, xctest
1,418,720,698
se_79854220
stackoverflow
MOBILE_DEVELOPMENT
Xcode XCTestCase - wait for setup to complete before starting tests
Xcode XCTestCase - wait for setup to complete before starting tests For testing my app in Xcode, I have added test functions. The test functions use data from a library that is loaded in setUp : final class MySwiftTests: XCTestCase { override class func setUp() { super.setUp() Task { t...
https://stackoverflow.com/questions/79854220/xcode-xctestcase-wait-for-setup-to-complete-before-starting-tests
swift, xcode, xctestcase
1,766,565,224
se_31966885
stackoverflow
MOBILE_DEVELOPMENT
Resize UIImage to 200x200pt/px
Resize UIImage to 200x200pt/px I have been struggling resizing an image. Basically I have stumpled upon: How to scale down a UIImage and make it crispy / sharp at the same time instead of blurry? This seems to be a legit solution but somehow it is not working correctly. My app works with Photos from the Camera Roll....
https://stackoverflow.com/questions/31966885/resize-uiimage-to-200x200pt-px
ios, swift, uiimage
1,439,386,679
se_68858865
stackoverflow
MOBILE_DEVELOPMENT
How to create a UITextView programmatically, inside UIView that is added programmatically too?
How to create a UITextView programmatically, inside UIView that is added programmatically too? I am trying to make a text acceptor view like Instagram and Snapchat. I am trying to add a UITextview (programatically) inside a UIView that's also added programmatically. Below is the code I am trying to use to add the UITe...
https://stackoverflow.com/questions/68858865/how-to-create-a-uitextview-programmatically-inside-uiview-that-is-added-program
ios, swift, uiview, uitextview
1,629,446,613
se_39598000
stackoverflow
MOBILE_DEVELOPMENT
When do I need to use mediaTypes kUTTypeImage with UIImagePickerController?
When do I need to use mediaTypes kUTTypeImage with UIImagePickerController? I have an image picker in my app where you can select images from camera roll or take a new picture then upload the images to my backend server. But looking around others' code I see that some people use this: imagePickerController.mediaTypes ...
https://stackoverflow.com/questions/39598000/when-do-i-need-to-use-mediatypes-kuttypeimage-with-uiimagepickercontroller
ios, swift, uiimagepickercontroller
1,474,385,015
se_32914006
stackoverflow
MOBILE_DEVELOPMENT
Swipe to go back only works on edge of screen?
Swipe to go back only works on edge of screen? My swipe to go back feature works but only works on the edge of the screen. How can I have it work from anywhere on the screen?
https://stackoverflow.com/questions/32914006/swipe-to-go-back-only-works-on-edge-of-screen
ios, swift, storyboard, uistoryboard, ios9
1,443,812,125
se_78413864
stackoverflow
MOBILE_DEVELOPMENT
GeoFire Swift Package Manager
GeoFire Swift Package Manager I have tried to install GeoFire in Xcode/Swift. According to the documentation (https://firebase.google.com/docs/firestore/solutions/geoqueries), this is done by adding "GeoFire/Utils" to Podfile. However, once installed I see errors. I'm suspecting this is caused from incompatibility wit...
https://stackoverflow.com/questions/78413864/geofire-swift-package-manager
swift, firebase, google-cloud-firestore, swift-package-manager, geofire
1,714,568,542
se_79853397
stackoverflow
MOBILE_DEVELOPMENT
Trying to rotate an image in Swift - SwiftUI
Trying to rotate an image in Swift - SwiftUI I have been trying to rotate an image in Swift across an axis. I want to see if it can rotate when a TapGesture is applied to the view. I have been fiddling around with this code for a short amount of time, but the image does not seem to rotate when it is pressed inside the...
https://stackoverflow.com/questions/79853397/trying-to-rotate-an-image-in-swift-swiftui
swift, swiftui
1,766,468,801
se_79534881
stackoverflow
MOBILE_DEVELOPMENT
Swift array `filter`, `map`, etc. (higher-order functions) when the closure needs to be `async`
Swift array `filter`, `map`, etc. (higher-order functions) when the closure needs to be `async` Now that I'm living completely in a Swift 6 async/await world, I've suddenly hit a snag. When writing code of this sort (never mind what it does, just look at the form of the thing): let result = services.currentPlaylist.li...
https://stackoverflow.com/questions/79534881/swift-array-filter-map-etc-higher-order-functions-when-the-closure-need
arrays, swift, async-await, higher-order-functions
1,742,936,906
se_79851368
stackoverflow
MOBILE_DEVELOPMENT
How to get the background behavior of Icon Composer&#39;s toolbar?
How to get the background behavior of Icon Composer&#39;s toolbar? My app needs the same basic behavior as Icon Composer. That is: the three sections, the full-size content view in the middle and the translucent toolbar at the top. I noticed that their toolbar changes color depending on the color content of the main v...
https://stackoverflow.com/questions/79851368/how-to-get-the-background-behavior-of-icon-composers-toolbar
swift, macos, swiftui, toolbar
1,766,170,361
se_79852334
stackoverflow
MOBILE_DEVELOPMENT
Get rid of Swift warning for concurrent array access
Get rid of Swift warning for concurrent array access I have that code, which works fine. But the Swift compiler raises a warning. I know the warning is true, and understand why the compiler warns me. But the code in itself takes care of that. Is there any way to silence this warning (and I take responsbility for it) -...
https://stackoverflow.com/questions/79852334/get-rid-of-swift-warning-for-concurrent-array-access
swift, suppress-warnings
1,766,333,379
se_79851274
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI Confirmation Dialog in iOS 26+
SwiftUI Confirmation Dialog in iOS 26+ I'm trying to adds a confirmation dialog in my app that comes up from the bottom of the screen. This is possible in iOS 18 with a .confirmationDialog(), but when I build the same code for iOS 26 I get a different result. I haven't found anything in SwiftUI's documentation about t...
https://stackoverflow.com/questions/79851274/swiftui-confirmation-dialog-in-ios-26
ios, swift, iphone, xcode, swiftui
1,766,161,240
se_79825145
stackoverflow
MOBILE_DEVELOPMENT
Check if specific date is at least tomorrow in Swift
Check if specific date is at least tomorrow in Swift What is the best way to properly check if a date is at least tomorrow? So far I was able to come up with this solution, but I'm not 100% sure it's correct: let calendar = Calendar.current func isAtLeastTomorrow(_ date: Date) -> Bool { let now = Date() let s...
https://stackoverflow.com/questions/79825145/check-if-specific-date-is-at-least-tomorrow-in-swift
swift
1,763,618,513
se_79852127
stackoverflow
MOBILE_DEVELOPMENT
Why is my custom .svg (edited using Inkscape from a SF Symbols template) not being displayed properly in Xcode?
Why is my custom .svg (edited using Inkscape from a SF Symbols template) not being displayed properly in Xcode? As a preface, I am a beginner to everything. Needless to say, patience for my ignorance will be greatly appreciated. I am trying build an app where the user can input a list of numbers and get the mode, mean...
https://stackoverflow.com/questions/79852127/why-is-my-custom-svg-edited-using-inkscape-from-a-sf-symbols-template-not-bei
swift, xcode, svg, swiftui, assets
1,766,298,999
se_79851613
stackoverflow
MOBILE_DEVELOPMENT
How to ignoreSafeArea when presenting content in SwiftUI Sheet?
How to ignoreSafeArea when presenting content in SwiftUI Sheet? I present a SwiftUI View using a UIHostingController with modalPresentationStyle = .overCurrentContext. Inside this root SwiftUI view, I present a .sheet with a custom modifier to make the sheet background transparent. Minimal Reproducible Code: import Sw...
https://stackoverflow.com/questions/79851613/how-to-ignoresafearea-when-presenting-content-in-swiftui-sheet
ios, swift, swiftui
1,766,214,026
se_79851928
stackoverflow
MOBILE_DEVELOPMENT
Xcode 26 built app caused a crash on dyld when launching the app on iOS 17 due to a RealityKit API
Xcode 26 built app caused a crash on dyld when launching the app on iOS 17 due to a RealityKit API I built my app using Xcode 26. I added some RealityKit logic but it's not used in iOS 17. I got this crash on launch: dyld[576]: Symbol not found: _$s10RealityKit13ShapeResourceC14generateConvex4fromAcA04MeshD0C_tYaKFZ ...
https://stackoverflow.com/questions/79851928/xcode-26-built-app-caused-a-crash-on-dyld-when-launching-the-app-on-ios-17-due-t
ios, swift, realitykit
1,766,256,696