I've found a very strange behaviour which looks like a bug. SwiftUI sheet or fullScreenCover do not release objects that were passed to its item: parameter (and to the view builder body by the way, but here is the simplified case).
It works well and memory is releasing on iOS 16 built with both Xcode 14 or 15. (simulators, devices)
Memory is leaking and NOT releasing on iOS 17 built with Xcode 15. (simulator, device 17.0.2)
Any ideas how we can solve this or we have to wait for the bugfix? This is going to be a global memory leak, I am sure most of SwiftUI apps are using classes passed to the sheet or fullScreenCover.
struct SheetView: View {
@State var sheetVM: SheetVM?
var body: some View {
Button {
sheetVM = .init()
} label: {
Text("Navigate")
}
.sheet(item: $sheetVM) { sheetVM in
Color.yellow
}
}
}
final class SheetVM: ObservableObject, Identifiable {
@Published var title: String = "Title"
init() {
print("SheetVM init")
}
deinit {
print("... SheetVM deinit")
}
}
struct SheetView_Previews: PreviewProvider {
static var previews: some View {
SheetView()
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have submitted the first version of my app with 2 In-Apps. It was rejected to make some updates. In-Apps was in status "Developer Action Needed". I've updated description and In-Apps are "Waiting for Review" now. But I cannot add them to the app anymore because they are not "Ready to Review".
How can I make them "Ready to Review" again, they are just not visible for attaching to the bundle?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Review
App Store Connect
In-App Purchase
App Submission
I am trying to fill W-8BEN form on App Store Connect, but cannot understand what does “Title” field mean right above the main form on the same page. No explanations or examples there, can anybody explain please?
During developing I've created bundle ID for my app, setup CloudKit etc. and wanted to name my app let's say MyChatApp. I've created Bundle ID com.NameSurname.MyChatApp.
Then I've decided to name the app with better and unique name like LetsGoChat.
Do I need to change bundle ID to com.NameSurname.LetsGoChat or it does not matter? Personally for me I don't care if it will be different, but will it be something not correct for Apple when it will be time to review the app for AppStore?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App ID
App Review
App Store Connect
App Store
I have sync troubles with CKServerChangeToken when re-accepting again CKShare. Here is the steps to explain, starting from the point when share accepted and everything synched.
Model:
List. It is parent for Items. It can be shared.
Item. Have parent List, sharing inherited from parent List.
Steps that are causing the problem:
Share accepted by user B, user A is owner, zone synched, CKServerChangeToken stored by User B.
User B's Shared Zone contains List1, List2 with some Items inside each
User B delete CKShare for List1 only from that zone in his Shared database, e.g. leaved share (shown as invited for User A now)
User B use the same link to accept share again, he is shown as accepted participant for User A, everything is fine so far.
User B perform sync operations, but turns out like nothing was changed since stored CKServerChangeToken and List1 with all it's items is being skipped on sync. CKFetchRecordZoneChangesOperation returns nothing as each of CKRecords (List1 and it's Items) was not changed. Updating List1 CKRecord solves the problem as it's a change after stored CKServerChangeToken. Also each Item CKRecord inside List1 must be updated to be detected by sync operation as updated records after CKServerChangeToken.
How to manage this issue?