Post

Replies

Boosts

Views

Activity

Reply to Navigation broken in iOS 18.4
This was due to my usage of UIActivityViewController in my SwiftUI views. When relying on UINavigationController in a SwiftUI view, you can use the .toolbar modifier to add/manage navigation bar button items. I did this for my 'share' buttons, which would allow the user to share a link to my content via other apps on their phone. My solution mirrored the solution in this github repository, which is as follows: Place a UIViewRepresentable in the background of your SwiftUI share button Representing a custom, empty UIViewController The custom UIViewController presents a UIActivityViewController when its var item: Binding<ActivityItem?> is given a value give it a value when your button is tapped Something about that view configuration totally broke the SwiftUI <-> UIKit bridging in iOS 18.4. Still not sure whether that was intentional, and since there is no deliberate messaging in the changelog I assume it was not intentional. If anyone else is having these problems, I hope this helps. FWIW, I was planning to update my 'share' features to use ShareLink anyway, as I just recently increased the min deployment target to iOS 16, so this was a good reason to prioritize that work. That is what I would recommend to anyone else having this issue.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’25
Reply to Navigation broken in iOS 18.4
This was due to my usage of UIActivityViewController in my SwiftUI views. When relying on UINavigationController in a SwiftUI view, you can use the .toolbar modifier to add/manage navigation bar button items. I did this for my 'share' buttons, which would allow the user to share a link to my content via other apps on their phone. My solution mirrored the solution in this github repository, which is as follows: Place a UIViewRepresentable in the background of your SwiftUI share button Representing a custom, empty UIViewController The custom UIViewController presents a UIActivityViewController when its var item: Binding<ActivityItem?> is given a value give it a value when your button is tapped Something about that view configuration totally broke the SwiftUI <-> UIKit bridging in iOS 18.4. Still not sure whether that was intentional, and since there is no deliberate messaging in the changelog I assume it was not intentional. If anyone else is having these problems, I hope this helps. FWIW, I was planning to update my 'share' features to use ShareLink anyway, as I just recently increased the min deployment target to iOS 16, so this was a good reason to prioritize that work. That is what I would recommend to anyone else having this issue.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’25
Reply to Xcode SPM when switching between branches
It's very frustrating that this has been a problem for so long.... I and everyone else on the iOS team at work has to run git restore *.xcworkspace/xcshareddata/swiftpm/Package.resolved every. single. time. we switch branches. Sometimes we accidentally commit the deletion of Package.resolved into git and it screws up our Xcode Cloud pipeline. Any suggestions other than quitting & relaunching Xcode before & after switching branches? Has anyone had success with git hooks? I switched to SPM to avoid versioning issues with cocoapods + xcode. Cocoapods is volunteer-driven and xcode can make any change they want, regardless of what cocoapods supports. I don't want that bringing my development to a screeching halt, so I choose SPM. I miss the way that cocoapods works. My project is not a swift package. Why can't I define a Package.swift file (or something of the like) as the source of truth for the dependencies of my project, and just put Package.resolved in my .gitignore? Xcode could have the location of Package.swift as a setting in .pbxproj, and interpret when resolving dependencies. I get to decide when I want to update my package dependencies (xcodebuild spm install or xcodebuild spm update or something like that). Why not?? Am I missing something??
Jul ’24
Reply to Xcode cloud builds are are failing
Seeing this happening a lot today, on more than 50% of xcode cloud builds. example: Could not resolve package dependencies: Couldn’t update repository submodules: Submodule 'external/catch' (https://github.com/catchorg/Catch2.git) registered for path 'external/catch' Submodule 'src/external/sha-1' (https://github.com/clibs/sha1.git) registered for path 'src/external/sha-1' Submodule 'src/external/sha-2' (https://github.com/kalven/sha-2.git) registered for path 'src/external/sha-2' Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/external/catch'... error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 fatal: expected 'packfile' fatal: clone of 'https://github.com/catchorg/Catch2.git' into submodule path '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/external/catch' failed Failed to clone 'external/catch'. Retry scheduled Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-1'... error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 fatal: expected 'packfile' fatal: clone of 'https://github.com/clibs/sha1.git' into submodule path '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-1' failed Failed to clone 'src/external/sha-1'. Retry scheduled Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-2'... fatal: unable to access 'http://github.com/kalven/sha-2.git/': The requested URL returned error: 502 fatal: clone of 'https://github.com/kalven/sha-2.git' into submodule path '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-2' failed Failed to clone 'src/external/sha-2'. Retry scheduled Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/external/catch'... Cloning into '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-1'... fatal: unable to access 'http://github.com/clibs/sha1.git/': The requested URL returned error: 502 fatal: clone of 'https://github.com/clibs/sha1.git' into submodule path '/Volumes/workspace/DerivedData/SourcePackages/checkouts/realm-core/src/external/sha-1' failed Failed to clone 'src/external/sha-1' a second time, aborting Couldn’t update repository submodules:
May ’24
Reply to StoreKit2: Transaction.currentEntitlements returns expired subscriptions (Testing locally with shortened sub periods)
I am also having this problem with Product.currentEntitlement. We will check locally against the transaction's expirationDate value. Hopefully Product.currentEntitlement will always return the transaction with the higher expiration date... The language in the docs is maybe misleading here? Perhaps "entitled" means something other than "has access" when it comes to an auto-renewing subscription? Would be really helpful if someone from the StoreKit team could clarify.
Topic: App & System Services SubTopic: StoreKit Tags:
Jan ’24
Reply to Builds upload successfully but do not appear on App Store Connect
My builds have finally finished processing, and are now visible on TestFlight. I’m curious, is this a common occurrence that we should be aware of? What was the reason for the unusually slow processing time? Would be nice if we had some indicator of the progress of a build’s processing phase, so we can be sure as developers that we haven’t done anything wrong and just need to wait.
Sep ’23