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_79940279
stackoverflow
MOBILE_DEVELOPMENT
How can I dynamically load xcframeworks only when they are used, not at the start of the app?
How can I dynamically load xcframeworks only when they are used, not at the start of the app? I am distributing a proprietary iOS SDK as a binary xcframework. The SDK includes some features that require other, external dependencies (also xcframeworks) to work. The external dependencies are quite large in size, and not...
https://stackoverflow.com/questions/79940279/how-can-i-dynamically-load-xcframeworks-only-when-they-are-used-not-at-the-star
ios, swift, xcode, dynamic-linking
1,778,643,027
se_79939724
stackoverflow
MOBILE_DEVELOPMENT
How to detect app install source / deferred deep link on Android (Kotlin) and iOS (Swift) after web popup campaign login?
How to detect app install source / deferred deep link on Android (Kotlin) and iOS (Swift) after web popup campaign login? I’m developing a mobile app for both Android (Kotlin) and iOS (Swift), and I need to identify where the app installation came from. Use case On the website, we show a popup like: “Install the app ...
https://stackoverflow.com/questions/79939724/how-to-detect-app-install-source-deferred-deep-link-on-android-kotlin-and-io
android, ios, swift, kotlin, mobile
1,778,559,633
se_44537849
stackoverflow
MOBILE_DEVELOPMENT
How to add a badge to UINavigationItem (UIBarButtonItem)
How to add a badge to UINavigationItem (UIBarButtonItem) Dose iOS provide a badge on UIBarButtonItem? If not, then how do I do it programmatically? Screenshot of example UI In the image, I want to show a badge on UIBarButtonItem (Refresh button icon) like a red color round or numbers any thing. I am using Swift 3.
https://stackoverflow.com/questions/44537849/how-to-add-a-badge-to-uinavigationitem-uibarbuttonitem
ios, iphone, swift, swift3
1,497,424,170
se_79941677
stackoverflow
MOBILE_DEVELOPMENT
How Do I Replicate the Exact Native iMessage Contact/Profile Transition Animation in iOS?
How Do I Replicate the Exact Native iMessage Contact/Profile Transition Animation in iOS? I m building an iOS messenger app and I’m trying to replicate the exact interaction/animation behavior used in Apple’s Messages app when tapping a contact/profile at the top of a conversation. The problem is that Claude/Codex/AI...
https://stackoverflow.com/questions/79941677/how-do-i-replicate-the-exact-native-imessage-contact-profile-transition-animatio
ios, swift, animation, codex, claude-code
1,778,838,649
se_76136444
stackoverflow
MOBILE_DEVELOPMENT
Wrong value sent to second view the first time it is passed from the parent view
Wrong value sent to second view the first time it is passed from the parent view In the following code, I'm trying to pass a bool to SecondView when a button is tapped. I'm changing the state of the bool within a Segmented/PickerView, what is tricking me is the fact that if I run the app, tap on the Turned Off segment...
https://stackoverflow.com/questions/76136444/wrong-value-sent-to-second-view-the-first-time-it-is-passed-from-the-parent-view
ios, swift, swiftui
1,682,774,263
se_24175911
stackoverflow
MOBILE_DEVELOPMENT
How to explain different results of lengthOfBytesUsingEncoding for an character like U+1F60E versus an ASCII character?
How to explain different results of lengthOfBytesUsingEncoding for an character like U+1F60E versus an ASCII character? I have initialized two character constants like this: let emojiCharacter = "😎" let simpleCharacter = "a" I am printing result for lengthOfBytesUsingEncoding like this: println("\(emojiCharacter) co...
https://stackoverflow.com/questions/24175911/how-to-explain-different-results-of-lengthofbytesusingencoding-for-an-character
string, swift
1,402,542,827
se_79933263
stackoverflow
MOBILE_DEVELOPMENT
In Swift I'm trying to understand the flow of logic when using Sendable, nonisolated, and Actors
In Swift I'm trying to understand the flow of logic when using Sendable, nonisolated, and Actors My understanding is the TripsFeedViewModel runs on the MainActor due to observable so this class is basically isolated to an actor, the MainActor. So in a sense it does prevent data races. Then when we tripService.getT...
https://stackoverflow.com/questions/79933263/in-swift-im-trying-to-understand-the-flow-of-logic-when-using-sendable-nonisol
ios, swift, multithreading, concurrency
1,777,402,254
se_46470335
stackoverflow
MOBILE_DEVELOPMENT
What does $0.1, $0.0, etc. mean in Swift?
What does $0.1, $0.0, etc. mean in Swift? I saw a dictionary data, its value is like: var myDict = ["name": "John", "age": 28] I see a code like below: myDict.flatMap { let a = $0.0 let b = $0.1 ... } What does $0.0 mean? What does $0.1 mean? What is the difference...
https://stackoverflow.com/questions/46470335/what-does-0-1-0-0-etc-mean-in-swift
swift
1,506,605,114
se_69640784
stackoverflow
MOBILE_DEVELOPMENT
Is there any replacement for Firebase Crashlytics?
Is there any replacement for Firebase Crashlytics? I want a replacement SDK for Firebase Crashlytics that i can deploy it's server on my company's servers.In other language i want to localize this SDK just for my company and all my crash logs and information stay in my company (for security reasons). I found sentry SD...
https://stackoverflow.com/questions/69640784/is-there-any-replacement-for-firebase-crashlytics
android, ios, swift, react-native, crashlytics
1,634,708,024
se_32573232
stackoverflow
MOBILE_DEVELOPMENT
How do I get my UIWebView to automatically fit content like a WKWebView does?
How do I get my UIWebView to automatically fit content like a WKWebView does? I was comparing a UIWebView and a WKWebView to see which would be best to display PDF content. I realized that WKWebView's automatically scale the content to fit the screen with no code needed, like so: [] 1[]2 While no matter what code I...
https://stackoverflow.com/questions/32573232/how-do-i-get-my-uiwebview-to-automatically-fit-content-like-a-wkwebview-does
ios, xcode, swift, uiwebview, wkwebview
1,442,261,978
se_79940543
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI Transferable with FileRepresentation inconsistent share results
SwiftUI Transferable with FileRepresentation inconsistent share results I have a ShareLink in my SwiftUI view to share a custom Transferable type, and it is mostly working correctly, but when I choose different options in the share sheet, I get some different behaviors. First, here's the Transferable type implementati...
https://stackoverflow.com/questions/79940543/swiftui-transferable-with-filerepresentation-inconsistent-share-results
swift, core-transferable
1,778,677,844
se_79940253
stackoverflow
MOBILE_DEVELOPMENT
How to achieve the UI of the search tab in the App Store in Swift?
How to achieve the UI of the search tab in the App Store in Swift? I am trying to make a view whose header section looks just like the one used in the App Store's search tab but I am unable to do so. I can't use .navigationTitle because it scrolls as the user scrolls and also collapses into an inline view. I noticed t...
https://stackoverflow.com/questions/79940253/how-to-achieve-the-ui-of-the-search-tab-in-the-app-store-in-swift
ios, swift, swiftui
1,778,636,529
se_79458344
stackoverflow
MOBILE_DEVELOPMENT
My Gemini API Query is taking forever to respond, how do I make it faster?
My Gemini API Query is taking forever to respond, how do I make it faster? I am currently designing a prototype chatbot for a school project, but I was confused as to why the API call was lagging so much. It takes a minimum of 2 minutes to respond. Here is my code below. import Foundation import SwiftUI import GoogleG...
https://stackoverflow.com/questions/79458344/my-gemini-api-query-is-taking-forever-to-respond-how-do-i-make-it-faster
swift, swiftui, google-gemini
1,740,163,005
se_59280263
stackoverflow
MOBILE_DEVELOPMENT
How can I detect a right-click in SwiftUI?
How can I detect a right-click in SwiftUI? I'm writing a simple Mines app to help me get to know SwiftUI. As such, I want primary click (usually LMB) to "dig" (reveal whether there's a mine there), and secondary click (usually RMB) to place a flag. I have the digging working! But I can't figure out how to place a flag...
https://stackoverflow.com/questions/59280263/how-can-i-detect-a-right-click-in-swiftui
swift, event-handling, mouseevent, swiftui, right-click
1,576,047,215
se_79936579
stackoverflow
MOBILE_DEVELOPMENT
Does "nonisolated(sending) by Default" setting conflict with "Default actor isolation" setting in Xcode 26?
Does "nonisolated(sending) by Default" setting conflict with "Default actor isolation" setting in Xcode 26? Before Xcode 26, we have 2 global functions: func syncMethod() {} func asyncMethod() async {} The behavior is that syncMethod is non-isolated, and will be called in the same isolation contex...
https://stackoverflow.com/questions/79936579/does-nonisolatedsending-by-default-setting-conflict-with-default-actor-isol
ios, swift, concurrency
1,778,003,049
se_79940071
stackoverflow
MOBILE_DEVELOPMENT
How do you make directories
How do you make directories I'm making a menu to allow users to kind of "flow" to certain guides or big text blocks. Because directories are inherently hierarchical, I know I need a tree structure. However, my starting nodes already have 7 nodes. And those nodes have an average of about 6, and so on and so forth. So I...
https://stackoverflow.com/questions/79940071/how-do-you-make-directories
swift, swiftui
1,778,603,441
se_52524827
stackoverflow
MOBILE_DEVELOPMENT
withSecurityScope not available in NSURL.BookmarkCreationOptions
withSecurityScope not available in NSURL.BookmarkCreationOptions im am trying to save a url as a bookmark to persist access to files on an iphone. To do this i am calling the bookmarkData function. But to prevent errors i have encounterd such as: Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened b...
https://stackoverflow.com/questions/52524827/withsecurityscope-not-available-in-nsurl-bookmarkcreationoptions
ios, swift, xcode
1,537,990,002
se_71743833
stackoverflow
MOBILE_DEVELOPMENT
How can I implement a box shadow element in swift?
How can I implement a box shadow element in swift? Please see the box attached. I want to implement that box in swift. How can I do it? Here's the CSS: background: #FFFFFF; border: 1px solid #DAD9D9; box-shadow: inset 2px 2px 0px rgba(0, 0, 0, 0.25); border-radius: 30px 30px 0px 0px; Here's what I tried: self.answer...
https://stackoverflow.com/questions/71743833/how-can-i-implement-a-box-shadow-element-in-swift
ios, swift, xcode
1,649,107,171
se_60279395
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI multiple bindings
SwiftUI multiple bindings I am having a MasterView Controller which contains a List and my Detail View Controller. The Detail View Controller will edit information about the dataset selected in MasterView. As far as I understand, I will have to create a Binding in my Detail, so when I edit details, the details shoul...
https://stackoverflow.com/questions/60279395/swiftui-multiple-bindings
swift, xcode, swiftui
1,582,023,731
se_24232799
stackoverflow
MOBILE_DEVELOPMENT
Why Choose Struct Over Class?
Why Choose Struct Over Class? Playing around with Swift, coming from a Java background, why would you want to choose a Struct instead of a Class? Seems like they are the same thing, with a Struct offering less functionality. Why choose it then?
https://stackoverflow.com/questions/24232799/why-choose-struct-over-class
swift, class, struct, value-type, design-principles
1,402,857,182
se_79939126
stackoverflow
MOBILE_DEVELOPMENT
Unknown Error code 1032 from Apple Intelligence
Unknown Error code 1032 from Apple Intelligence I'm using Apple intelligence to power suggestions to user of my app. It's a great feature but I'm baffled about this error. Domain=FoundationModels.LanguageModelSession.GenerationError Code=-1 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=ModelMana...
https://stackoverflow.com/questions/79939126/unknown-error-code-1032-from-apple-intelligence
swift, xcode, apple-intelligence, foundation-models
1,778,468,511
se_73135138
stackoverflow
MOBILE_DEVELOPMENT
How to distribute a Swift Package with a private repository on GitLab?
How to distribute a Swift Package with a private repository on GitLab? I'm trying to distribute a Swift Package on a private repository on GitLab. In the file Package.swift located at the root of the git repository, I'm trying to use the SSH connection but I have an error when I'm putting "git@gitlab.com:myteam.my/pat...
https://stackoverflow.com/questions/73135138/how-to-distribute-a-swift-package-with-a-private-repository-on-gitlab
swift, gitlab, package, swift-package-manager
1,658,912,863
se_79938043
stackoverflow
MOBILE_DEVELOPMENT
Need screentime data (swift) to be sent to firebase then accountability partner device
Need screentime data (swift) to be sent to firebase then accountability partner device So i'm building a screentime app whereby users can add an accountability partner who will be able to see their total screentime.(no app breakdowns included) . This will require me to send the data to firebase realtime database and r...
https://stackoverflow.com/questions/79938043/need-screentime-data-swift-to-be-sent-to-firebase-then-accountability-partner
ios, swift, screen-time
1,778,234,723
se_28689383
stackoverflow
MOBILE_DEVELOPMENT
Image Slideshow Swift ios
Image Slideshow Swift ios I'm new to ios development. I am trying to make a simple fullscreen image slide show. On swipe left, the slideshow should show the next image, and swipe right the slideshow should show the previous image. I have it working, however, if I swipe in quick succession, I get a blank screen, almos...
https://stackoverflow.com/questions/28689383/image-slideshow-swift-ios
ios, xcode, swift
1,424,758,959
se_57922372
stackoverflow
MOBILE_DEVELOPMENT
malloc: Heap corruption detected, free list is damaged
malloc: Heap corruption detected, free list is damaged My app is running fine till iOS 12. After updating my iOS version to iOS 13 beta, the app is crashing in random places and with the same error. Following is the Xcode console. MyApp(618,0x10cebd800) malloc: Heap corruption detected, free list is damaged at 0x28e...
https://stackoverflow.com/questions/57922372/malloc-heap-corruption-detected-free-list-is-damaged
swift, crash, malloc, ios13, heap-corruption
1,568,372,373
se_44064577
stackoverflow
MOBILE_DEVELOPMENT
How to set the preferredContentSize of a UIViewController to the height of a containing UITableView contentSize?
How to set the preferredContentSize of a UIViewController to the height of a containing UITableView contentSize? I call a popover like the following: if let vc = CalendarDetailViewControllerContainer.storyboardInstance() { vc.preferredContentSize = CGSize(width: ((self.view.frame.width / 5) * 2), height: vc.view....
https://stackoverflow.com/questions/44064577/how-to-set-the-preferredcontentsize-of-a-uiviewcontroller-to-the-height-of-a-con
swift, uitableview
1,495,180,735
se_24692746
stackoverflow
MOBILE_DEVELOPMENT
Write to plist file in Swift
Write to plist file in Swift I have a sample plist-file, favCities.plist. This is my sample code: override func viewDidLoad() { super.viewDidLoad() let path = NSBundle.mainBundle().pathForResource("favCities", ofType: "plist") var plistArray = NSArray(contentsOfFile: path) as [Dictionary<String, String...
https://stackoverflow.com/questions/24692746/write-to-plist-file-in-swift
swift, nsdictionary, plist, ios8
1,405,065,316
se_41757631
stackoverflow
MOBILE_DEVELOPMENT
Paypal with Braintree saying &quot;Merchant account not found&quot;
Paypal with Braintree saying &quot;Merchant account not found&quot; I tried integrating PayPal using braintree and following this tutorial. I end up getting an error: Merchant account not found - screenshot. I am using Swift 3 and Xcode 8.1. here is my viewDidLoad These are all required updates in my app: ScreenShot 1...
https://stackoverflow.com/questions/41757631/paypal-with-braintree-saying-merchant-account-not-found
swift, paypal, braintree
1,484,894,864
se_52819268
stackoverflow
MOBILE_DEVELOPMENT
Set view&#39;s rounded corners and shadow
Set view&#39;s rounded corners and shadow I need to round the bottom left and right corners of a view and base on what I found on the internet I created this function inside an UIview extension: func setRoundedCorner(withRadius radius: CGSize, forCorners corners: UIRectCorner ) { let viewShape = CAShapeLayer() ...
https://stackoverflow.com/questions/52819268/set-views-rounded-corners-and-shadow
ios, swift, shadow, rounded-corners
1,539,614,584
se_79936939
stackoverflow
MOBILE_DEVELOPMENT
Liquid Glass UIButton Tint(background) Color
Liquid Glass UIButton Tint(background) Color On SwiftUI, you could achieve a tinted glass button by creating a custom button style struct SomeButtonPreview: View { var body: some View { ZStack { LinearGradient( colors: [ .red, .orange, .yellow, ...
https://stackoverflow.com/questions/79936939/liquid-glass-uibutton-tintbackground-color
swift, swiftui, uikit, liquid-glass
1,778,064,781
se_37949518
stackoverflow
MOBILE_DEVELOPMENT
Get keychain item with LAContext and touchIDAuthenticationAllowableReuseDuration
Get keychain item with LAContext and touchIDAuthenticationAllowableReuseDuration I'm trying to add the functionality of touchIDAuthenticationAllowableReuseDuration to my app. I use Touch ID to authenticate a user into the app and at the same time recover an item from the keychain. Before I tried to add this there was ...
https://stackoverflow.com/questions/37949518/get-keychain-item-with-lacontext-and-touchidauthenticationallowablereuseduration
ios, objective-c, swift, security, touch-id
1,466,525,513
se_79935178
stackoverflow
MOBILE_DEVELOPMENT
Thread-safe progress reporting in Swift
Thread-safe progress reporting in Swift In a Swift codebase, I have classes Progress and ProgressGroup that are used to track progress of a long-running operation. A ProgressGroup can contains several child Progress objects. A Progress object is passed to a function that takes a long time to execute. This function cal...
https://stackoverflow.com/questions/79935178/thread-safe-progress-reporting-in-swift
swift, multithreading, swift-concurrency
1,777,753,560
se_44906479
stackoverflow
MOBILE_DEVELOPMENT
How can i display animated svg file in iOS without using UIWebView
How can i display animated svg file in iOS without using UIWebView Currently i am using UIWebView to display animated svg file in my native iOS application. This works fine except the CPU usage is constantly being on higher side as long as app is in foreground. Is there any better way to display svg file without u...
https://stackoverflow.com/questions/44906479/how-can-i-display-animated-svg-file-in-ios-without-using-uiwebview
ios, iphone, swift, svg-animate
1,499,172,564
se_76879918
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI ForEach indices error about expected argument type Binding&lt;C&gt;
SwiftUI ForEach indices error about expected argument type Binding&lt;C&gt; I'm getting this error message: Cannot convert value of type 'Range<Array<Cat>.Index>' (aka 'Range<Int>') to expected argument type 'Binding<C>' On this ForEach line: ForEach(viewModel.cats.indices, id: \.self) { index in let cat = viewMo...
https://stackoverflow.com/questions/76879918/swiftui-foreach-indices-error-about-expected-argument-type-bindingc
swift, swiftui, foreach, codable
1,691,710,584
se_69961039
stackoverflow
MOBILE_DEVELOPMENT
When to use Decodable, Codable, and Encodable to retrieve data or send
When to use Decodable, Codable, and Encodable to retrieve data or send I am not entirely sure that I have been using the correct reference points when I am fetching data from an API. I have used both Codable and Decodable but I really don't understand the difference between the two, nor what the reference point of enc...
https://stackoverflow.com/questions/69961039/when-to-use-decodable-codable-and-encodable-to-retrieve-data-or-send
swift, xcode
1,636,874,183
se_79936993
stackoverflow
MOBILE_DEVELOPMENT
Is it possible to set-up a build setting from a pre-action/build phase in Xcode?
Is it possible to set-up a build setting from a pre-action/build phase in Xcode? I'm not sure what's the best practice around here but essentially the problem I have is I want to have a tool that generate a path (an unix domain socket) and set it in COMPILATION_CACHE_REMOTE_SERVICE_PATH for the build settings of the t...
https://stackoverflow.com/questions/79936993/is-it-possible-to-set-up-a-build-setting-from-a-pre-action-build-phase-in-xcode
swift, objective-c, xcode, shell
1,778,069,687
se_79936329
stackoverflow
MOBILE_DEVELOPMENT
Dynamic UIColor from asset catalog doesn&#39;t update CALayer.borderColor when switching between light and dark mode — modern workaround?
Dynamic UIColor from asset catalog doesn&#39;t update CALayer.borderColor when switching between light and dark mode — modern workaround? I'm implementing dark mode in a UIKit app and ran into the well-known issue that CALayer.borderColor (and shadowColor, CAShapeLayer.strokeColor, etc.) doesn't update automatically w...
https://stackoverflow.com/questions/79936329/dynamic-uicolor-from-asset-catalog-doesnt-update-calayer-bordercolor-when-switc
ios, swift, iphone, uikit, mobile-development
1,777,973,395
se_79825411
stackoverflow
MOBILE_DEVELOPMENT
How to create a SwiftUI Menu with multiple Pickers without extra dividers?
How to create a SwiftUI Menu with multiple Pickers without extra dividers? I'm trying to create a SwiftUI Menu containing two Picker to control content and sort. However, I cannot replicate menu appearance shown in my reference screenshot. No matter which approach I try, I get unwanted extra dividers or incorrect tex...
https://stackoverflow.com/questions/79825411/how-to-create-a-swiftui-menu-with-multiple-pickers-without-extra-dividers
swift, xcode, macos, swiftui, menu
1,763,635,871
se_59476491
stackoverflow
MOBILE_DEVELOPMENT
How to fix error with xcodebuild in GitHub Actions
How to fix error with xcodebuild in GitHub Actions I'm trying to setup a CI with my private Swift project in Github using GitHub Actions. I've used the standard swift.yml template provided by Github with some modifications. Here is the file ci.yml name: Swift on: [push] jobs: build: runs-on: macOS-latest ...
https://stackoverflow.com/questions/59476491/how-to-fix-error-with-xcodebuild-in-github-actions
ios, swift, continuous-integration, xcodebuild, github-actions
1,577,262,014
se_79936540
stackoverflow
MOBILE_DEVELOPMENT
DispatchQueue&#39;s closure is @Sendable, how can it access main actor isolated values?
DispatchQueue&#39;s closure is @Sendable, how can it access main actor isolated values? Let's first try this code: func viewDidLoad() { DispatchQueue.global().async { self.view.backgroundColor = red } } This obviously fails in Swift 6, because the closure is @Sendable , meaning that it can be called on backgr...
https://stackoverflow.com/questions/79936540/dispatchqueues-closure-is-sendable-how-can-it-access-main-actor-isolated-valu
ios, swift, concurrency
1,777,997,884
se_77686337
stackoverflow
MOBILE_DEVELOPMENT
Formatted TextField input has problem with cursor
Formatted TextField input has problem with cursor Hi I got code below and try do formatting text input dynamically but when everything looks good and I'll try to edit cursor jump to the end which looks strange and my question is can we prevent this behaviour. The issue is demonstrated below in the gif. import SwiftUI...
https://stackoverflow.com/questions/77686337/formatted-textfield-input-has-problem-with-cursor
swift, swiftui, textfield, caret
1,703,000,320
se_77921496
stackoverflow
MOBILE_DEVELOPMENT
Cursor does not appear on initial click in UITextField
Cursor does not appear on initial click in UITextField I have a custom cell with 3 UITextFields. They are all set up the same way just with different names. 2/3 work perfectly, the cursor shows on initial click and the keyboard pops up. The tricky one (weightTextField) does not work as expected. The cursor does not sh...
https://stackoverflow.com/questions/77921496/cursor-does-not-appear-on-initial-click-in-uitextfield
ios, swift, uitextfield, caret
1,706,801,871
se_79936585
stackoverflow
MOBILE_DEVELOPMENT
Conflict between &quot;Approachable concurrency&quot; vs &quot;nonisolated(nonsending) by Default&quot; vs &quot;Default actor isolation&quot; settings in Xcode
Conflict between &quot;Approachable concurrency&quot; vs &quot;nonisolated(nonsending) by Default&quot; vs &quot;Default actor isolation&quot; settings in Xcode Based on this article, "approachable concurrency" means using main actor by default, and use nonisolated(nonsending) by default. However, in Xcode, there are ...
https://stackoverflow.com/questions/79936585/conflict-between-approachable-concurrency-vs-nonisolatednonsending-by-defau
ios, swift, concurrency
1,778,003,816
se_77181656
stackoverflow
MOBILE_DEVELOPMENT
Swift charts: how to draw a line chart with a fixed gradient independent of data?
Swift charts: how to draw a line chart with a fixed gradient independent of data? Closely related to this question, the linear gradient code works well, but it is always tied to its data, so for example in this code shown below, if you have an array of heart rates from 70 to 110 the lower heart rates are always gray a...
https://stackoverflow.com/questions/77181656/swift-charts-how-to-draw-a-line-chart-with-a-fixed-gradient-independent-of-data
ios, swift, swiftui, swiftui-charts
1,695,744,113
se_79935891
stackoverflow
MOBILE_DEVELOPMENT
How to achieve the same animation effect as the liquid glass button in the upper right corner of the ios26 Photos app
How to achieve the same animation effect as the liquid glass button in the upper right corner of the ios26 Photos app I want to achieve the effect as shown in the picture. It's the button interaction in the upper right corner of the Recent Delete option in the ios26 Photos app, I have tried many times but failed. Does...
https://stackoverflow.com/questions/79935891/how-to-achieve-the-same-animation-effect-as-the-liquid-glass-button-in-the-upper
swift, ios26, liquid-glass
1,777,904,256
se_79935848
stackoverflow
MOBILE_DEVELOPMENT
FamilyActivitySelection token stability — are stored tokens long-term reliable?
FamilyActivitySelection token stability — are stored tokens long-term reliable? We are storing FamilyActivitySelection tokens encoded via JSONEncoder to a backend for long-term use, and relying on them inside a DeviceActivityMonitorExtension to restore and apply shields when a schedule fires. We came across reports on...
https://stackoverflow.com/questions/79935848/familyactivityselection-token-stability-are-stored-tokens-long-term-reliable
ios, swift, ios-extensions, screen-time
1,777,897,715
se_77076952
stackoverflow
MOBILE_DEVELOPMENT
Matched geometry effect along a path in SwiftUI
Matched geometry effect along a path in SwiftUI Is it possible to have matched geometry effect follow a path? I noticed when you launch Netflix's mobile app and select a profile from the who's watching screen, the profile square scales up and centers, then it animates upwards and to the right into a mini profile squar...
https://stackoverflow.com/questions/77076952/matched-geometry-effect-along-a-path-in-swiftui
swift, swiftui, matchedgeometryeffect
1,694,362,749
se_79932386
stackoverflow
MOBILE_DEVELOPMENT
Reality Kit Object Sound Position changes with landscape mode
Reality Kit Object Sound Position changes with landscape mode My object makes the sound is on the right of screen regardless of iOS device landscape mode. Sound comes from object location while device at landscape mode which usb input is at right. But when the device is rotated other way around view also rotates as we...
https://stackoverflow.com/questions/79932386/reality-kit-object-sound-position-changes-with-landscape-mode
ios, swift, realitykit, arview
1,777,275,696
se_79927361
stackoverflow
MOBILE_DEVELOPMENT
Why is this phone number not recognised in iOS Safari?
Why is this phone number not recognised in iOS Safari? Q: - Why is this phone number not recognised in iOS Safari, Swift, or other Apple platforms? Intro I happen to be the administrator of a small amateur draughts club. Every week, I put the results of the games played online. The results will be published using a to...
https://stackoverflow.com/questions/79927361/why-is-this-phone-number-not-recognised-in-ios-safari
html, ios, swift, safari, tel
1,776,426,995
se_47077228
stackoverflow
MOBILE_DEVELOPMENT
Add bundle items for a specific scheme
Add bundle items for a specific scheme I would like to add some bundle items just for a specific scheme. I could create a run-script, but there I am unable to read out the current scheme. Is there another chance to add some bundle files only for a specific scheme in Xcode 9.x?
https://stackoverflow.com/questions/47077228/add-bundle-items-for-a-specific-scheme
swift, xcode, bundle
1,509,631,380
se_79934489
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI PhaseAnimator causing AttributeGraph cycle crash when nested in List with @Observable
SwiftUI PhaseAnimator causing AttributeGraph cycle crash when nested in List with @Observable I’m hitting a very specific runtime crash in iOS 19.2 (Xcode 17.1) that I haven't seen documented anywhere. I have a List where each row uses the new @Observable macro for its view model. Inside the row, I’m using phaseAnimat...
https://stackoverflow.com/questions/79934489/swiftui-phaseanimator-causing-attributegraph-cycle-crash-when-nested-in-list-wit
ios, swift
1,777,609,107
se_72560553
stackoverflow
MOBILE_DEVELOPMENT
Scroll to specific section and item in SwiftUI list
Scroll to specific section and item in SwiftUI list I have a List with 12 sections that represent the months of a year and each seach has the number of days of a month as an item. The problem is ScrollViewReader only scrolls the items of the first section. for example, January contains 31 days and it works when I call...
https://stackoverflow.com/questions/72560553/scroll-to-specific-section-and-item-in-swiftui-list
ios, swift, list, swiftui, scrollview
1,654,778,819
se_29135907
stackoverflow
MOBILE_DEVELOPMENT
SpriteKit - Sea Surface from above perspective with Swift in iOS
SpriteKit - Sea Surface from above perspective with Swift in iOS I want to implement a sea surface from above perspective for one of my games in iOS (with SpriteKit). Basically like a relaxed sea, from above - subtle wave motion going around, with possible objects floating and reacting with the motion. As if you're f...
https://stackoverflow.com/questions/29135907/spritekit-sea-surface-from-above-perspective-with-swift-in-ios
ios, swift, sprite-kit, physics, surface
1,426,729,780
se_65517870
stackoverflow
MOBILE_DEVELOPMENT
How can I open URLs in watchOS?
How can I open URLs in watchOS? Can a standalone Apple Watch app open a URL like we can in iOS: UIApplication.sharedApplication().openURL(url!) I want to display a message about an update when a new app is published. I want the user to go the URL for the update. Is there any good way?
https://stackoverflow.com/questions/65517870/how-can-i-open-urls-in-watchos
swift, watchkit, apple-watch, watchos
1,609,399,434
se_79934245
stackoverflow
MOBILE_DEVELOPMENT
NavigationView List Large Title doesn&#39;t work with background color
NavigationView List Large Title doesn&#39;t work with background color I have a very weird issue that if I have a List inside a NavigationView, the title disappears. But this only happens if I have set a background color. Here is the code that Works. import SwiftUI struct ContentView: View { var body: some View {...
https://stackoverflow.com/questions/79934245/navigationview-list-large-title-doesnt-work-with-background-color
swift, swiftui, swiftui-list, swiftui-navigationview
1,777,554,912
se_53226087
stackoverflow
MOBILE_DEVELOPMENT
error: unable to spawn process (Argument list too long) in Xcode Build
error: unable to spawn process (Argument list too long) in Xcode Build I am getting this error: "error: unable to spawn process (Argument list too long) ** ARCHIVE FAILED ** The following build commands failed: CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (1 failure) ...
https://stackoverflow.com/questions/53226087/error-unable-to-spawn-process-argument-list-too-long-in-xcode-build
swift, xcode, compile-time
1,541,768,038
se_30009788
stackoverflow
MOBILE_DEVELOPMENT
In Swift, is it possible to convert a string to an enum?
In Swift, is it possible to convert a string to an enum? If I have an enum with the cases a,b,c,d is it possible for me to cast the string "a" as the enum?
https://stackoverflow.com/questions/30009788/in-swift-is-it-possible-to-convert-a-string-to-an-enum
swift, enums
1,430,622,023
se_79933718
stackoverflow
MOBILE_DEVELOPMENT
Why is undoManager of NSTextView subclass always nil when testing?
Why is undoManager of NSTextView subclass always nil when testing? I have a subclass (MyTextView) of NSTextView. When i try to test its (working) undo/redo using Swift Testing its undoManager property is always niland the test fails. // Added extension extension MyTextView { override var undoManager: UndoManager? ...
https://stackoverflow.com/questions/79933718/why-is-undomanager-of-nstextview-subclass-always-nil-when-testing
swift, nstextview, nsundomanager, swift-testing
1,777,473,787
se_70957270
stackoverflow
MOBILE_DEVELOPMENT
How to animate a Slider in SwiftUI smoothly like how WhatsApp/Apple Music does?
How to animate a Slider in SwiftUI smoothly like how WhatsApp/Apple Music does? I have a slider for my music app that updates its knob position every second using a Timer publisher. But I don't want it to pause animating after each second instead animate smoothly and continuously like the slider/scrubber from WhatsApp...
https://stackoverflow.com/questions/70957270/how-to-animate-a-slider-in-swiftui-smoothly-like-how-whatsapp-apple-music-does
swift, swiftui
1,643,811,592
se_79921616
stackoverflow
MOBILE_DEVELOPMENT
Why my TableColumn in the Table doesn&#39;t resize dynamically when I change the length of the string and width property set to &quot;infinity&quot;?
Why my TableColumn in the Table doesn&#39;t resize dynamically when I change the length of the string and width property set to &quot;infinity&quot;? I want that the TableColumn in my Table resizes dynamically on length of my string and if the length of my string is longer then the weight of my Table the horizontal sc...
https://stackoverflow.com/questions/79921616/why-my-tablecolumn-in-the-table-doesnt-resize-dynamically-when-i-change-the-len
swift, swiftui
1,775,572,703
se_78369460
stackoverflow
MOBILE_DEVELOPMENT
How to display a spatial image in VisionOS
How to display a spatial image in VisionOS How can I display a spatial image or video (in SwiftUI) on devices running visionOS? When I use the standard Image view, the image looks flat. I have searched for visionOS display spatial image and I am unable to find anything.
https://stackoverflow.com/questions/78369460/how-to-display-a-spatial-image-in-visionos
swift, image, spatial, visionos
1,713,834,823
se_79933596
stackoverflow
MOBILE_DEVELOPMENT
AppShortcut is shown in Shortcuts app but not in Spotlight
AppShortcut is shown in Shortcuts app but not in Spotlight I want to create my own AppShortcut so I can search for my app and its contents on Spotlight. Currently I have these codes: import AppIntents @available(iOS 16.0, *) struct TransferIntent: AppIntent { static var title = LocalizedStringResource("Transfer m...
https://stackoverflow.com/questions/79933596/appshortcut-is-shown-in-shortcuts-app-but-not-in-spotlight
ios, swift, appintents, app-shortcut
1,777,459,087
se_77414418
stackoverflow
MOBILE_DEVELOPMENT
How to use PhaseAnimator to create animations that doesn&#39;t loop back to the first phase?
How to use PhaseAnimator to create animations that doesn&#39;t loop back to the first phase? I am creating a screen where the user wins a random prize from a set of prizes. I want the screen to look like a slot machine, where some other available prizes are shown one after the other, before finally arriving at the pri...
https://stackoverflow.com/questions/77414418/how-to-use-phaseanimator-to-create-animations-that-doesnt-loop-back-to-the-firs
swift, animation, swiftui
1,698,990,389
se_67672550
stackoverflow
MOBILE_DEVELOPMENT
Error Domain=NSItemProviderErrorDomain Code=-1000 &quot;Cannot load representation of type public.jpeg&quot;
Error Domain=NSItemProviderErrorDomain Code=-1000 &quot;Cannot load representation of type public.jpeg&quot; I am using PHPickerViewController for image picking from the photo library instead of UIImagePickerController. When I use this code I couldn't get the image from already picked image. Error Domain=NSItemProvid...
https://stackoverflow.com/questions/67672550/error-domain-nsitemprovidererrordomain-code-1000-cannot-load-representation-of
ios, swift, ios-simulator
1,621,861,444
se_77075654
stackoverflow
MOBILE_DEVELOPMENT
How can I convert multiple completion handlers to async?
How can I convert multiple completion handlers to async? I am using Apple's Vision framework to run multiple detection requests against one image. VNImageRequestHandler.perform() schedules multiple requests (likely in a separate thread). Completion handlers are defined for the individual requests. In the end, results ...
https://stackoverflow.com/questions/77075654/how-can-i-convert-multiple-completion-handlers-to-async
swift, async-await, apple-vision
1,694,340,589
se_75372070
stackoverflow
MOBILE_DEVELOPMENT
UIGraphicsImageRenderer and UIGraphicsBeginImageContext: What is useful for UIImage.draw(in: CGRect)
UIGraphicsImageRenderer and UIGraphicsBeginImageContext: What is useful for UIImage.draw(in: CGRect) I am newbie in swift and wanted to use UIImage.draw(in: CGRect) in my application to resize image. When I used UIGraphicsImageRenderer, it made some memory spikes rather than using UIGraphicsBeginImageContext. Since Ap...
https://stackoverflow.com/questions/75372070/uigraphicsimagerenderer-and-uigraphicsbeginimagecontext-what-is-useful-for-uiim
swift, memory-leaks, uiimage, uigraphicsimagerenderer
1,675,765,796
se_79933144
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI Navigation breaks intermittently when building with Xcode 26
SwiftUI Navigation breaks intermittently when building with Xcode 26 Has anyone else been getting reports of navigations breaking for a random subset of users since upgrading to Xcode 26? Broadly, it seems that the SwiftUI navigation state falls out of sync with the app state (in our case TCA) and refuses to perform r...
https://stackoverflow.com/questions/79933144/swiftui-navigation-breaks-intermittently-when-building-with-xcode-26
ios, swift, xcode, swiftui, swift-composable-architecture
1,777,388,037
se_79932794
stackoverflow
MOBILE_DEVELOPMENT
How can I change the background color of the selected tab in SwiftUI TabView?
How can I change the background color of the selected tab in SwiftUI TabView? I want to add a background color like below: I tried to achieve it by adding a ZStack, but was not successful and getting a view like this: TabView(selection: $coordinator.selectedTab) { // Chat Tab NavigationStack(path: coordinato...
https://stackoverflow.com/questions/79932794/how-can-i-change-the-background-color-of-the-selected-tab-in-swiftui-tabview
ios, swift, swiftui
1,777,333,731
se_79887332
stackoverflow
MOBILE_DEVELOPMENT
How to enable partial text selection in SwiftUI like iOS 26 iMessage
How to enable partial text selection in SwiftUI like iOS 26 iMessage In iOS 26, the iMessages app has a feature that allows selecting only part of the text. See the screenshots below. How can we achieve this kind of selection in SwiftUI? I tried using the .textSelection(.enabled) modifier, but it only shows the Copy a...
https://stackoverflow.com/questions/79887332/how-to-enable-partial-text-selection-in-swiftui-like-ios-26-imessage
ios, swift, swiftui
1,770,809,794
se_78175721
stackoverflow
MOBILE_DEVELOPMENT
Is there a way to take a screen shot in macOS programmatically?
Is there a way to take a screen shot in macOS programmatically? It seems like all the old frameworks have been deprecated (e.g. CGWindowListCreateImage) in favor of ScreenCaptureKit. Unfortunately it only offers streaming. Is there a simpler way I can get a screenshot of the user's display? Given displayId, x, y, widt...
https://stackoverflow.com/questions/78175721/is-there-a-way-to-take-a-screen-shot-in-macos-programmatically
swift, macos, unity-game-engine, objective-c++, unity3d-native-plugins
1,710,687,462
se_60464111
stackoverflow
MOBILE_DEVELOPMENT
How to check if device is having poor internet connection in swift
How to check if device is having poor internet connection in swift I want to check if device is having very slow internet connection. I have used Reachability class to check for internet connection is available or not. But here i want to check after every few sec that internet speed is not poor. Is this possible to...
https://stackoverflow.com/questions/60464111/how-to-check-if-device-is-having-poor-internet-connection-in-swift
ios, swift, iphone, reachability-swift
1,582,972,130
se_31794902
stackoverflow
MOBILE_DEVELOPMENT
How to use UILocalNotification to open specific view containing CoreData
How to use UILocalNotification to open specific view containing CoreData I am developing an application where the user can set a notification reminder to change the password of the CoreData instance to which the reminder was set. When the user hits the "First Action" button I want them to be redirected to the second ...
https://stackoverflow.com/questions/31794902/how-to-use-uilocalnotification-to-open-specific-view-containing-coredata
ios, xcode, swift, core-data, uilocalnotification
1,438,628,776
se_79911206
stackoverflow
MOBILE_DEVELOPMENT
Swift CXCallUpdate not working for outgoing calls
Swift CXCallUpdate not working for outgoing calls I start an outgoing call using below code. let handle = CXHandle(type: .generic, value: handleValue) let startCallAction = CXStartCallAction(call: uuid, handle: handle) let transaction = CXTransaction(action: startCallAction) self.pendingCallDa...
https://stackoverflow.com/questions/79911206/swift-cxcallupdate-not-working-for-outgoing-calls
ios, swift, swiftui, callkit
1,774,000,976
se_79823345
stackoverflow
MOBILE_DEVELOPMENT
How can I present an action sheet without an arrow from a UIButton in iOS 26?
How can I present an action sheet without an arrow from a UIButton in iOS 26? I'm trying to present an action sheet from a regular UIButton on iOS 26 without showing the popover arrow. What I’ve tried so far: I watched the WWDC 2025 session “Build a UIKit app with the new design”: https://developer.apple.com/videos/p...
https://stackoverflow.com/questions/79823345/how-can-i-present-an-action-sheet-without-an-arrow-from-a-uibutton-in-ios-26
ios, swift, uikit, ios26
1,763,469,047
se_79931944
stackoverflow
MOBILE_DEVELOPMENT
check each array with each array - and not doubling
check each array with each array - and not doubling i have a multidimensional Int Array. I want to check each array with each array but without repeating same operations like comparing myArr[4] with myArr[5] and later myArr[5] with myArr[4] . My goal is to find the arrays with at least one equal number, probable by c...
https://stackoverflow.com/questions/79931944/check-each-array-with-each-array-and-not-doubling
swift
1,777,180,886
se_79927478
stackoverflow
MOBILE_DEVELOPMENT
Strange empty circle in Google Places autocomplete for iOS 26
Strange empty circle in Google Places autocomplete for iOS 26 After updating my app with the iOS 26, the Google Place picker autocomplete automatically added a empty circle in the left side: How I can remove or add an image instead of that empty with circle that does nothing? Again, this happens only in iOS 26. The c...
https://stackoverflow.com/questions/79927478/strange-empty-circle-in-google-places-autocomplete-for-ios-26
ios, swift, swiftui, google-places-api, google-places-autocomplete
1,776,438,822
se_79929473
stackoverflow
MOBILE_DEVELOPMENT
AVCapture layerPointConverted gives device coordinates incorrectly
AVCapture layerPointConverted gives device coordinates incorrectly I have one simple application designed for iPad Pro M4 and iPad Air M3, which displays live view using the AVCapture functions. For capturing image usual AVCam code is used. I want to apply custom exposure point of interest. Below is the code to conver...
https://stackoverflow.com/questions/79929473/avcapture-layerpointconverted-gives-device-coordinates-incorrectly
ios, swift, avcapturedevice
1,776,777,562
se_77025002
stackoverflow
MOBILE_DEVELOPMENT
How would you replace the now deprecated .accentColor in this instance?
How would you replace the now deprecated .accentColor in this instance? I'm following along with the "Build a workout app for Apple Watch" video from WWDC'21. At one point they use the now deprecated .accentColor modifier to change the color of text in a sub-view. struct SummaryView: View { @State private var dura...
https://stackoverflow.com/questions/77025002/how-would-you-replace-the-now-deprecated-accentcolor-in-this-instance
swift, swiftui
1,693,589,063
se_79930456
stackoverflow
MOBILE_DEVELOPMENT
Swift Concurrency - SWIFT​_​DEFAULT​_​ACTOR​_​ISOLATION
Swift Concurrency - SWIFT​_​DEFAULT​_​ACTOR​_​ISOLATION If SWIFT​\_​DEFAULT​\_​ACTOR​\_​ISOLATION is turned on in your project with swift 6(xcodeVersion 26.4), does it mean the following struct is Main actor isolated : struct TokenResponse: Decodable {     let expiredIn: Int     let accessToken: String     let tokenTy...
https://stackoverflow.com/questions/79930456/swift-concurrency-swift-default-actor-isolation
swift, swift-concurrency, swift6, mainactor
1,776,913,697
se_77748836
stackoverflow
MOBILE_DEVELOPMENT
setHidesBackButton not working with UIHostingController
setHidesBackButton not working with UIHostingController I've encountered a weird bug while setting hidesBackButton to true when using a UIHostingController. I set hidesBackButton to true during viewWillAppear. This remains true until a viewWillLayoutSubviews changes the value (without my intervention). I suspect this ...
https://stackoverflow.com/questions/77748836/sethidesbackbutton-not-working-with-uihostingcontroller
swift, swiftui, uihostingcontroller
1,704,233,915
se_79767845
stackoverflow
MOBILE_DEVELOPMENT
Xcode Archive fails with SwiftEmitModule error when including SPM dependency in XCFramework SDK
Xcode Archive fails with SwiftEmitModule error when including SPM dependency in XCFramework SDK I’m developing an iOS SDK and I want to distribute it as an XCFramework. My requirements: The SDK code must be hidden (binary-only). Some dependencies (e.g., OpenSSL) are manually added as frameworks to the target, embedde...
https://stackoverflow.com/questions/79767845/xcode-archive-fails-with-swiftemitmodule-error-when-including-spm-dependency-in
ios, swift, xcframework, livekit
1,758,146,288
se_33156567
stackoverflow
MOBILE_DEVELOPMENT
Getting all cookies from WKWebView
Getting all cookies from WKWebView while getting cookies from UIWebView seems straightforward by using NSHTTPCookieStorage.sharedHTTPCookieStorage(), it seems WKWebView stores the cookies somewhere else. I did some research, and I was able to get some cookies from the grabbing it from NSHTTPURLResponse object. this, ...
https://stackoverflow.com/questions/33156567/getting-all-cookies-from-wkwebview
ios, swift, uiwebview, webkit, wkwebview
1,444,936,179
se_79929952
stackoverflow
MOBILE_DEVELOPMENT
Should I use different buckets on firebase storage when creating apps, like one for profiles, user reviews, chats etc
Should I use different buckets on firebase storage when creating apps, like one for profiles, user reviews, chats etc I'm creating an IOS app where users leave reviews on restaurants/bars and can connect by asking each other if there are seats available. I would like to know what the best storage practice is in this c...
https://stackoverflow.com/questions/79929952/should-i-use-different-buckets-on-firebase-storage-when-creating-apps-like-one
swift, firebase
1,776,849,049
se_73963588
stackoverflow
MOBILE_DEVELOPMENT
Build input file cannot be found {PATH} did you forget to declare this file as an output
Build input file cannot be found {PATH} did you forget to declare this file as an output After creating and deleting the Objective-C file with the header, an error appeared. How can I fix it? error build: Build input file cannot be found: '/Users/iiiivaska/Desktop/To-Do List/To-Do List/View/Cells/To-Do List-Bridging-...
https://stackoverflow.com/questions/73963588/build-input-file-cannot-be-found-path-did-you-forget-to-declare-this-file-as-a
ios, swift, objective-c, xcode, build
1,664,987,676
se_56822195
stackoverflow
MOBILE_DEVELOPMENT
How do I use UserDefaults with SwiftUI?
How do I use UserDefaults with SwiftUI? struct ContentView: View { @State var settingsConfiguration: Settings struct Settings { var passwordLength: Double = 20 var moreSpecialCharacters: Bool = false var specialCharacters: Bool = false var lowercaseLetters: Bool = true var u...
https://stackoverflow.com/questions/56822195/how-do-i-use-userdefaults-with-swiftui
swift, nsuserdefaults, swiftui
1,561,864,843
se_79896394
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI: Nested sheets dismissed on app background with TabView + NavigationStack + .navigationDestination (iOS 26)
SwiftUI: Nested sheets dismissed on app background with TabView + NavigationStack + .navigationDestination (iOS 26) I'm experiencing an issue on iOS 26.4 where nested .sheet presentations are automatically dismissed when the app goes to the background. I was able to reproduce similar case on iOS 26.2 but can't build ...
https://stackoverflow.com/questions/79896394/swiftui-nested-sheets-dismissed-on-app-background-with-tabview-navigationstac
ios, swift, swiftui, swiftui-navigationstack, ios26
1,772,038,920
se_79928699
stackoverflow
MOBILE_DEVELOPMENT
iOS 26 Tab bar appears above pushed detail view during interactive pop when hidesBottomBarWhenPushed is true
iOS 26 Tab bar appears above pushed detail view during interactive pop when hidesBottomBarWhenPushed is true I'm seeing a strange issue in iOS 26 related to UITabBarController, where tab bar appears above pushed detail view during swiping back. Steps to Reproduce Navigate to the detail view controller from main view ...
https://stackoverflow.com/questions/79928699/ios-26-tab-bar-appears-above-pushed-detail-view-during-interactive-pop-when-hide
ios, swift, ios26
1,776,677,249
se_79930048
stackoverflow
MOBILE_DEVELOPMENT
Swift isolation for protocols and actors
Swift isolation for protocols and actors I'm using Swift 6 and Xcode 26 to develop an exchange monitoring application for macOS. To maintain information from different instruments on an exchange i use following protocols: protocol DerivativeSymbol { associatedtype Ticker: DerivativeTicker var baseCoin: St...
https://stackoverflow.com/questions/79930048/swift-isolation-for-protocols-and-actors
swift, protocols, actor, isolation
1,776,859,240
se_79929168
stackoverflow
MOBILE_DEVELOPMENT
How can I access &#39;package&#39; members declared in a Swift package from an Xcode project?
How can I access &#39;package&#39; members declared in a Swift package from an Xcode project? I am building a framework for others to use. The framework itself is not built with SPM, but with Xcode. (It has a .xcodeproj file.) Now I want to use macros in this framework. As far as I know, both the macro implementation ...
https://stackoverflow.com/questions/79929168/how-can-i-access-package-members-declared-in-a-swift-package-from-an-xcode-pro
swift, xcode, swift-package-manager, access-modifiers
1,776,742,778
se_38306660
stackoverflow
MOBILE_DEVELOPMENT
Cannot specialize non-generic type &#39;Set&#39;
Cannot specialize non-generic type &#39;Set&#39; This is my NSManagedObject: @objc(Order) class Order: NSManagedObject { @NSManaged var orderItems: Set<OrderItem> //error: Cannot specialize non-generic type 'Set' } Why doesn't it work? OrderItem file is created and works however for following declaration: @NSMan...
https://stackoverflow.com/questions/38306660/cannot-specialize-non-generic-type-set
ios, swift, core-data
1,468,239,204
se_46397065
stackoverflow
MOBILE_DEVELOPMENT
How to convert a StaticString into String at runtime?
How to convert a StaticString into String at runtime? In Swift 3, is the following conversion the right way to create a String from a StaticString ? let fileName : StaticString = #file let currentFile : String = file.description
https://stackoverflow.com/questions/46397065/how-to-convert-a-staticstring-into-string-at-runtime
swift, string, literals
1,506,308,953
se_55682814
stackoverflow
MOBILE_DEVELOPMENT
Swift 4.2 and Xcode 10.1 - Tip Calculator Crashed Immediately
Swift 4.2 and Xcode 10.1 - Tip Calculator Crashed Immediately So I'm pretty new to Swift. I'm building a tip calculator in Swift and I found a tutorial online and modified it. It was a Swift 3 tutorial however, so I don't know how well it translates to Swift 4.2 from Swift 3 and latest iOS version as well, but it was ...
https://stackoverflow.com/questions/55682814/swift-4-2-and-xcode-10-1-tip-calculator-crashed-immediately
ios, swift, calculator
1,555,304,345
se_79928681
stackoverflow
MOBILE_DEVELOPMENT
What are the available approaches for binary obfuscation in iOS apps (Swift + Objective-C)?
What are the available approaches for binary obfuscation in iOS apps (Swift + Objective-C)? I’m researching binary-level obfuscation techniques for iOS applications to better protect compiled code against reverse engineering. Most discussions I’ve found focus on source-level obfuscation (e.g., symbol renaming in Swift...
https://stackoverflow.com/questions/79928681/what-are-the-available-approaches-for-binary-obfuscation-in-ios-apps-swift-ob
ios, swift, objective-c, swiftui, obfuscation
1,776,675,113
se_79923814
stackoverflow
MOBILE_DEVELOPMENT
Swift - performBatchUpdates
Swift - performBatchUpdates I noticed that when I update the size of a table cell, the table cell below sometimes seems to disappear. Could you please tell me how to fix this? Here's an example of such a layout. This behavior sometimes goes unnoticed for quite a long time, and sometimes almost constantly. I thought it...
https://stackoverflow.com/questions/79923814/swift-performbatchupdates
swift, snapkit, performbatchupdates
1,775,861,763
se_79899610
stackoverflow
MOBILE_DEVELOPMENT
SwiftUI IOS 26 - Menu button floats outside its container during selection animation
SwiftUI IOS 26 - Menu button floats outside its container during selection animation Don't even know how to explain this... On IOS 26, in a scrollable view that contains a Menu, if I start scrolling the view before the menu selection animation finishes (roughly within ~1 second after tapping an option), the Menu icon ...
https://stackoverflow.com/questions/79899610/swiftui-ios-26-menu-button-floats-outside-its-container-during-selection-anima
ios, swift, swiftui, menu
1,772,474,633
se_79924542
stackoverflow
MOBILE_DEVELOPMENT
How to prevent individual errors in a for try await loop without stopping the entire sequence?
How to prevent individual errors in a for try await loop without stopping the entire sequence? During a pre-interview call with a company, I got asked a couple questions about swift concurrency. One of the questions was: When using for try await to iterate through an async sequence, how do you deal with errors in a w...
https://stackoverflow.com/questions/79924542/how-to-prevent-individual-errors-in-a-for-try-await-loop-without-stopping-the-en
swift, for-loop, try-catch, swift-concurrency
1,776,038,600
se_71516286
stackoverflow
MOBILE_DEVELOPMENT
RealityKit&#39;s `.allowsCameraControl` tool for building `nonAR` apps
RealityKit&#39;s `.allowsCameraControl` tool for building `nonAR` apps RealityKit has an option for .nonAR camera, but lacks fundamental options to build 3D nonAR apps, like camera control (.allowsCameraComtrol). Is it viable to use RealityKit a replacement for SceneKit (which hasn't been updated for the past years an...
https://stackoverflow.com/questions/71516286/realitykits-allowscameracontrol-tool-for-building-nonar-apps
swift, scenekit, virtual-reality, realitykit
1,647,536,406
se_61749516
stackoverflow
MOBILE_DEVELOPMENT
Animating launch screen zoom
Animating launch screen zoom 1: I'm trying to animate a zoom out/size change of a UIImageView . Below is how I want the launch screen to look and then once it's loaded to go onto my HomeViewController. 2: Because (at the moment) I'm doing the animation on the HomeViewController which I know isn't the right way t...
https://stackoverflow.com/questions/61749516/animating-launch-screen-zoom
ios, swift, xcode, animation, uiimageview
1,589,279,774
se_70976323
stackoverflow
MOBILE_DEVELOPMENT
How to constrain concurrency (like `maxConcurrentOperationCount`) with Swift Concurrency?
How to constrain concurrency (like `maxConcurrentOperationCount`) with Swift Concurrency? I am trying to perform a series of network requests and would like to limit the number of concurrent tasks in the new Swift Concurrency system. With operation queues we would use maxConcurrentOperationCount. In Combine, flatMap(m...
https://stackoverflow.com/questions/70976323/how-to-constrain-concurrency-like-maxconcurrentoperationcount-with-swift-con
swift, async-await, swift-concurrency
1,643,912,259
se_79858059
stackoverflow
MOBILE_DEVELOPMENT
iOS PDF Kit PDF Compression not reducing PDF Size
iOS PDF Kit PDF Compression not reducing PDF Size I am trying to compress the PDF (to reduce its storage size) and using following code but instead of decreasing storage size, it is increasing it: import Foundation import PDFKit import CoreGraphics import UIKit /// Utility to compress a PDF by rasterizing each page a...
https://stackoverflow.com/questions/79858059/ios-pdf-kit-pdf-compression-not-reducing-pdf-size
swift, pdf, pdfkit
1,767,173,527