All Questions
3,776 questions
0
votes
0
answers
45
views
SwiftUI Image Sharing: Screenshot does not load on first sharing attempt, but loads afterwards
I have a simple solitaire game where I want to share a screenshot of winning hands via the share sheet. I capture the screenshot fine, but when I go to share (mainly testing via Gmail), the first time ...
0
votes
0
answers
18
views
Multiple Product Names Breaking SwiftUI Canvas [closed]
I have a SwiftUI project set up with xcodegen with multiple schemas. After adding different product names to each of the schemas in the xcodegen project file, the SwiftUI canvas no longer works. The ...
0
votes
0
answers
53
views
Swift animation issue for creating a view pager
I have created a view pager and for showing a simple image banner but the issue is the animation is not working properly.
the issue is the transition b/w image 0 to image 1 is very fast without a ...
0
votes
1
answer
55
views
SwiftUI Text vertically centered on iPad & offset on iPhone
I’m using a LaunchScreen.storyboard with a centered label, where the text is vertically aligned to the center of the superview. I want to recreate the same layout in SwiftUI, so that after the launch ...
0
votes
1
answer
43
views
SwiftUI DocumentGroup toolbar items disappear when renaming document or randomly on iOS
Let me update the Stack Overflow question to include this additional information:
SwiftUI DocumentGroup toolbar items disappear when renaming document or randomly
I'm experiencing an issue with ...
1
vote
0
answers
82
views
SwiftUI: The compiler throws generic error for every single syntax typo
Whenever I have a basic syntax typo in my SwiftUI code, I get this compiler error.
The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into ...
0
votes
1
answer
47
views
SwiftUI app freezes on iOS 18 with Swift 6 after ATT permission dialog clicked - thread assertion issue
My app is used to build with Swift 6 and it works perfectly fine. However, since I am using Google AdMob for monetization, I have to implement the App Tracking Transparency (ATT) prompt dialog at the ...
1
vote
1
answer
46
views
Xcode Cloud can't build SwiftUI archive that builds locally
I'm having problems with Xcode Cloud building my SwiftUI app since I added dummy data for SwiftData for previews (in the "Preview Content" folder) with the error "Cannot find '...
1
vote
1
answer
44
views
How do I display my custom fonts in Xcode SwiftUI Previews?
I've added custom fonts to my SwiftUI app, following Apple's documentation Applying custom fonts to text. I've added the fonts to my Info.plist file in the UIAppFonts key, and they work in my iOS app.
...
1
vote
2
answers
106
views
How do I conditionally compile swift based on swift version and target SDK?
I want to be able to conditionally compile blocks of swift code based on the version of the swift language and the version of the target SDK used by the build system. I have no control over the user's ...
0
votes
1
answer
57
views
How to avoid clipping of .popover content close to bottom screen edge?
I would like use .popover with .presentationCompactAdaptation(.popover) in an iPhone iOS 16+ app. This shows the popover not as sheet but as real popover not only on iPad but on iPhone as well.
While ...
1
vote
0
answers
62
views
SwiftUI Preview Fails to Load While Project Builds and Runs Fine: Alamofire Module Map Issue
I'm having an issue specifically with SwiftUI previews in my iOS project. The project builds and runs fine on devices and simulators (in Rosetta mode), but SwiftUI previews fail to load in both ...
0
votes
1
answer
43
views
Why is .transition not applied on SwiftUI Text view when text (and ID) change?
In the following example the text and with it the ID of the Text view changes, when the button is tapped. So SwiftUI should treat the Text view as new view due to the updated ID, should it? So why is ...
1
vote
1
answer
57
views
How to position SwiftUI view relative to other view
I would like to position a Text view horizontally centered in a VStack (easy, since this is the default) and then show another Text on the right side next to the first view. The .firstTextBaseline ...
0
votes
1
answer
41
views
CoreData in framework crash when using Preview
I have a project with 3 targets:
main application
an extension
framework (with coredata management for sharing with main app and extension)
I set App Groups for main app and extension.
When I trying ...