Post

Replies

Boosts

Views

Activity

Reply to Xcode cloud does not detect branches other than develop
I also have this issue. Now our project had Xcode cloud setup with a different repo in the past, I have added our new repo (its a complete rewrite) so there are 2 primary repos in Xcode cloud, and I created a workflow targeting the new repo. Everything seems to work except neither Xcode or AppStore Connect can see any branches, and so I can't trigger a build. Is deleting all Xcode Cloud data and starting over the only solution?
Jun ’24
Reply to Do I need to add my own unique id?
This is a good question that I wish apple would discuss more. Yes as people suggest, it is a wrapper for NSManagedObjectID and it will change until its first save, as discussed here https://www.hackingwithswift.com/quick-start/swiftdata/how-to-save-a-swiftdata-object It's still not clear to me what is best practice, particularly when syncing with a cloud service or database such as postgres. Should I override the swift data id var with my postgres uuid? or have a separate var "cloudID" for it? Has anyone built real apps (not toy demos) with swift data and a server and found any gotchas or advice?
Aug ’24
Reply to Upvoting own post dilemma.
I think it's not about preference or ego, but how it affects the discoverability algorithm. Apple should follow SO or reddit as the OP suggests; probably SO approach, IMO, but either is better. Also unrelated but if I have your attention, I am noticing for some threads I am unable to boost or upvote any post, is this a bug or intended behavior?
Aug ’24
Reply to Managing Duplicate Objects in Core Data (or SwiftData) with CloudKit Sync When Devices were Offline during object creation
I would think you would want the duplicate behavior in this example? I can often have two people with the same first and last name but they are two different people, and the different age could be that distinguishing factor. I'm trying to think, when would you want this merged and not duplicated? Duplicating here seems to be the safe / correct behavior, no?
Aug ’24
Reply to SwiftUI Gestures prevent scrolling with iOS 18
I also have this issue, no change in Xcode 16 RC and iOS 18 RC. this is very disappointing and will break a lot of apps. What's up apple? Or am I missing something how to fix this? I have a horizontal scroll view and each view has a drag gesture which on vertical drag would dismiss the view. This worked in iOS 17.5 and Xcode 15.4 but not on the latest as I mention above. My fix is to use .simultaneousGesture rather than just .gesture modifier block, it seems to work and the view is more dynamic as the horizontal scroll and individual view's drag gestures work together simultaneously rather than one or the other. Is this the intended behavior Apple wants? That's fine, but more explanation and documentation would really go a long way to help here.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to Use @AppStorage with Arrays
unfortunately, nope. the work around is to do something like class SearchHistory { private static let maxHistoryItems = 50 @AppStorage("searchHistory") private var historyData: Data = Data() var recentSearches: [SearchHistoryItem] { get { guard let items = try? JSONDecoder().decode([SearchHistoryItem].self, from: historyData) else { return [] } return items } set { let limitedItems = Array(newValue.prefix(Self.maxHistoryItems)) if let data = try? JSONEncoder().encode(limitedItems) { historyData = data } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24
Reply to May I know how can I use SF Symbols beta to create custom icon?
I have this same question, surprised the apple one doesn't let us edit the check color
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to SwiftData Upsert
did you find any updates? In my case it doesn't crash but it inserts the duplicate anyway, it doesn't properly upsert the existing one.
Replies
Boosts
Views
Activity
Nov ’23
Reply to SwiftUI: quickLookPreview - called while the panel has no controller?
I have the same issue, it seems like something apple should fix to be honest. Did you find any updates?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’23
Reply to How to create visionOS screenshots for the App Store with the Simulator?
agreed this is such a weird miss by apple
Replies
Boosts
Views
Activity
Jan ’24
Reply to Xcode cloud does not detect branches other than develop
I also have this issue. Now our project had Xcode cloud setup with a different repo in the past, I have added our new repo (its a complete rewrite) so there are 2 primary repos in Xcode cloud, and I created a workflow targeting the new repo. Everything seems to work except neither Xcode or AppStore Connect can see any branches, and so I can't trigger a build. Is deleting all Xcode Cloud data and starting over the only solution?
Replies
Boosts
Views
Activity
Jun ’24
Reply to SwiftUI - Using Bindable with Environment
Good solution and good question. How did it work out in your code? I'm also wondering, has Apple fixed this for latest SwiftUI (WWDC 24, iOS 18 etc.) ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’24
Reply to macOS Sequoia 15.0 Dev Beta
how are you doing now? Has Beta 3 resolved this?
Replies
Boosts
Views
Activity
Jul ’24
Reply to Do I need to add my own unique id?
This is a good question that I wish apple would discuss more. Yes as people suggest, it is a wrapper for NSManagedObjectID and it will change until its first save, as discussed here https://www.hackingwithswift.com/quick-start/swiftdata/how-to-save-a-swiftdata-object It's still not clear to me what is best practice, particularly when syncing with a cloud service or database such as postgres. Should I override the swift data id var with my postgres uuid? or have a separate var "cloudID" for it? Has anyone built real apps (not toy demos) with swift data and a server and found any gotchas or advice?
Replies
Boosts
Views
Activity
Aug ’24
Reply to Upvoting own post dilemma.
I think it's not about preference or ego, but how it affects the discoverability algorithm. Apple should follow SO or reddit as the OP suggests; probably SO approach, IMO, but either is better. Also unrelated but if I have your attention, I am noticing for some threads I am unable to boost or upvote any post, is this a bug or intended behavior?
Replies
Boosts
Views
Activity
Aug ’24
Reply to Managing Duplicate Objects in Core Data (or SwiftData) with CloudKit Sync When Devices were Offline during object creation
I would think you would want the duplicate behavior in this example? I can often have two people with the same first and last name but they are two different people, and the different age could be that distinguishing factor. I'm trying to think, when would you want this merged and not duplicated? Duplicating here seems to be the safe / correct behavior, no?
Replies
Boosts
Views
Activity
Aug ’24
Reply to When to use structs with swift data?
Sorry for my delay, thank you, it makes sense. I wish Apple documentation was more clear and gave more explanations on not only the intended way to use an API like Swift Data but also why it is a certain way and also compared with incorrect usage.
Replies
Boosts
Views
Activity
Sep ’24
Reply to SwiftUI Gestures prevent scrolling with iOS 18
I also have this issue, no change in Xcode 16 RC and iOS 18 RC. this is very disappointing and will break a lot of apps. What's up apple? Or am I missing something how to fix this? I have a horizontal scroll view and each view has a drag gesture which on vertical drag would dismiss the view. This worked in iOS 17.5 and Xcode 15.4 but not on the latest as I mention above. My fix is to use .simultaneousGesture rather than just .gesture modifier block, it seems to work and the view is more dynamic as the horizontal scroll and individual view's drag gestures work together simultaneously rather than one or the other. Is this the intended behavior Apple wants? That's fine, but more explanation and documentation would really go a long way to help here.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Use @AppStorage with Arrays
unfortunately, nope. the work around is to do something like class SearchHistory { private static let maxHistoryItems = 50 @AppStorage("searchHistory") private var historyData: Data = Data() var recentSearches: [SearchHistoryItem] { get { guard let items = try? JSONDecoder().decode([SearchHistoryItem].self, from: historyData) else { return [] } return items } set { let limitedItems = Array(newValue.prefix(Self.maxHistoryItems)) if let data = try? JSONEncoder().encode(limitedItems) { historyData = data } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’24
Reply to How to create visionOS screenshots for the App Store with the Simulator?
its painful for us and embarrassing for them
Replies
Boosts
Views
Activity
Dec ’24
Reply to SwiftUI scrollTo function stops working if I also use onScrollVisibilityChange
well..... I just answered my own question. The .id MUST come after the .onScrollVisibilityChange but why? its not logical at all. I understand how the nesting of view modifiers works, but why is the .id nullified if its before the other modifier?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jan ’25