Post

Replies

Boosts

Views

Activity

Reply to Widget with Core Data guidance
Yes, I do believe a widget similar to the clock widget would definitely serve my purposes. And I see that widget works on iOS 15 and 18+ which is also what I want Is there an example app that Apple has that shows how to create that list within the widget? I may need to read through more doc's to learn how to do this. Thanks so much for your answer!
Oct ’25
Reply to File Export from iOS - eventually import too
Thanks for these answers, but I'm afraid I need a bit more help. How do you go about presenting the activityViewController? Could you show this in a small example app? I had previously written this and it does share but it creates 2 files, and doesn't present any way to rename the file. import SwiftUI import UIKit struct ContentView: View { @State private var showShareSheet = false @State private var textItem1 = "" @State private var textItem2 = "" // @State private var shareItems: [Any] = [ // "Check out this file!", // URL(fileURLWithPath: FileManager.documentsDirectory.path()) // Replace with a real file URL // ] var shareItems: [Any] { [ textItem1, textItem2 // URL(fileURLWithPath: "TinySavedItems") ] } var body: some View { VStack { TextField("enter text", text: $textItem1) .padding() TextField("enter text", text: $textItem2) .padding() Button("Share", systemImage: "square.and.arrow.up") { showShareSheet = true } .sheet(isPresented: $showShareSheet) { ActivityViewController(activityItems: shareItems) } } } struct ActivityViewController: UIViewControllerRepresentable { // Items to share (e.g., text, URLs, files) let activityItems: [Any] // Custom activities (optional) let applicationActivities: [UIActivity]? = nil // Completion handler (optional) @Environment(\.dismiss) var dismiss // Create the UIActivityViewController func makeUIViewController(context: Context) -> UIActivityViewController { let vc = UIActivityViewController( activityItems: activityItems, applicationActivities: applicationActivities ) vc.excludedActivityTypes = [ .postToFacebook, .postToTwitter ] // Handle completion (e.g., dismiss after sharing) vc.completionWithItemsHandler = { _, success, _, error in if success || error != nil { dismiss() // Close the sheet after sharing } } return vc } func updateUIViewController(_ uiViewController: UIActivityViewController, context: Context) {} //doesn't do anything but is required } }
Topic: UI Frameworks SubTopic: SwiftUI
2d
Reply to File Export from iOS - eventually import too
It took me a little bit to realize that tapping on the "text" in the Share to Files interface provided a way to change the file name - when I share one item. In some online tutorials there was a way to set the full filename (like Export.csv) - but maybe that's only when writing to the app's file directory. Would you agree? I can't really think of a clean way to be able to name 2 files in that interface - so I fully understand why that's not available - and therefore I don't plan to proceed to a feedback for this. I should be able to combine elements so that I'm only sharing 1 item in for my original request. Could you clarify how DTS works now relative to these questions answered here on the forum? Since I did ask for a DTS - does this count as one? It doesn't matter to me right now because my dev account will renew soon. Thanks so much!
Topic: UI Frameworks SubTopic: SwiftUI
10h
Reply to File Export from iOS - eventually import too
When I rename a file I can't seem to change the extension. For example: when I select the file and change to MyFile.csv - it writes MyFile.csv.txt is there any way to get rid of that .txt extension other than make the user delete it? I mean they could edit from .txt to .csv and macOS asks if they are sure - but I'd like to remove that step. That might be worthy of a feedback...
Topic: UI Frameworks SubTopic: SwiftUI
5h
Reply to Widget with Core Data guidance
Yes, I do believe a widget similar to the clock widget would definitely serve my purposes. And I see that widget works on iOS 15 and 18+ which is also what I want Is there an example app that Apple has that shows how to create that list within the widget? I may need to read through more doc's to learn how to do this. Thanks so much for your answer!
Replies
Boosts
Views
Activity
Oct ’25
Reply to Why is SimulatorTrampoline taking TONS of memory?
I did find that iStat menus has a setting to "Combine Processes" so it's creating sort of a compilation that explains why ActivityMonitor is different. Still, if all these simulator processes add up to 10GB it still seems like a lot.
Replies
Boosts
Views
Activity
Nov ’25
Reply to Cannot Update Age Rating
Does this age reporting requirement apply to TestFlight apps?
Replies
Boosts
Views
Activity
Dec ’25
Reply to File Export from iOS - eventually import too
Thanks for these answers, but I'm afraid I need a bit more help. How do you go about presenting the activityViewController? Could you show this in a small example app? I had previously written this and it does share but it creates 2 files, and doesn't present any way to rename the file. import SwiftUI import UIKit struct ContentView: View { @State private var showShareSheet = false @State private var textItem1 = "" @State private var textItem2 = "" // @State private var shareItems: [Any] = [ // "Check out this file!", // URL(fileURLWithPath: FileManager.documentsDirectory.path()) // Replace with a real file URL // ] var shareItems: [Any] { [ textItem1, textItem2 // URL(fileURLWithPath: "TinySavedItems") ] } var body: some View { VStack { TextField("enter text", text: $textItem1) .padding() TextField("enter text", text: $textItem2) .padding() Button("Share", systemImage: "square.and.arrow.up") { showShareSheet = true } .sheet(isPresented: $showShareSheet) { ActivityViewController(activityItems: shareItems) } } } struct ActivityViewController: UIViewControllerRepresentable { // Items to share (e.g., text, URLs, files) let activityItems: [Any] // Custom activities (optional) let applicationActivities: [UIActivity]? = nil // Completion handler (optional) @Environment(\.dismiss) var dismiss // Create the UIActivityViewController func makeUIViewController(context: Context) -> UIActivityViewController { let vc = UIActivityViewController( activityItems: activityItems, applicationActivities: applicationActivities ) vc.excludedActivityTypes = [ .postToFacebook, .postToTwitter ] // Handle completion (e.g., dismiss after sharing) vc.completionWithItemsHandler = { _, success, _, error in if success || error != nil { dismiss() // Close the sheet after sharing } } return vc } func updateUIViewController(_ uiViewController: UIActivityViewController, context: Context) {} //doesn't do anything but is required } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
2d
Reply to File Export from iOS - eventually import too
It took me a little bit to realize that tapping on the "text" in the Share to Files interface provided a way to change the file name - when I share one item. In some online tutorials there was a way to set the full filename (like Export.csv) - but maybe that's only when writing to the app's file directory. Would you agree? I can't really think of a clean way to be able to name 2 files in that interface - so I fully understand why that's not available - and therefore I don't plan to proceed to a feedback for this. I should be able to combine elements so that I'm only sharing 1 item in for my original request. Could you clarify how DTS works now relative to these questions answered here on the forum? Since I did ask for a DTS - does this count as one? It doesn't matter to me right now because my dev account will renew soon. Thanks so much!
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
10h
Reply to File Export from iOS - eventually import too
When I rename a file I can't seem to change the extension. For example: when I select the file and change to MyFile.csv - it writes MyFile.csv.txt is there any way to get rid of that .txt extension other than make the user delete it? I mean they could edit from .txt to .csv and macOS asks if they are sure - but I'd like to remove that step. That might be worthy of a feedback...
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
5h