Is it possible to change the default save dialog that appears when creating a document based MacOS app in SwiftUI?
I have a basic FileDocument struct that gets called to a view using a DocumentGroup scene.
struct MyFile: FileDocument {
static let readableContentTypes: [UTType] = [.myFileType]
static let writeableContentTypes: [UTType] = [.myFileType]
var list: [String]
init(configuration: ReadConfiguration) throws {
let data = configuration.file.regularFileContents!
let JSONDecoder = JSONDecoder()
do {
try list = JSONDecoder.decode([String].self, from: data)
} catch {
throw CocoaError(.fileReadCorruptFile)
}
}
func fileWrapper(configuration: WriteConfiguration) throws -> FileWrapper {
let JSONEncoder = JSONEncoder()
JSONEncoder.outputFormatting = .prettyPrinted
do {
data = try JSONEncoder.encode(self.list)
} catch {
print(error.localizedDescription)
throw CocoaError(.fileWriteUnknown)
}
return .init(regularFileWithContents: data)
}
}
This gets called at the DocumentGroup
DocumentGroup(newDocument: MyFile(), editor: { document in
ContentView(document: document.$document)
})
But when I save the file, I want the save dialog that appears to have something like a 'Tags' textField that can also store information about the file.
Something similar to this: (https://i.sstatic.net/AJQ3YNb8.png)
From what I can find, there isn't much information about this other than manually creating an NSSavePanel class and overriding the current save function
Create elegant and intuitive apps that integrate seamlessly with Apple platforms.
Post
Replies
Boosts
Views
Activity
Recently I decided to download my app from the App Store and found out that during the first launch some colors were missing or displayed incorreclty. For example one button was blue, although switching dark mode on and off solved button color it. Some colors were completely missing and the tab bar buttons were blue as well. Any advices?
I'm using iOS 18.2 and XCode 16.1
I'm trying to achieve a specific UI design in SwiftUI where the bottom section of my List has a different background color than the top section. For example in the Medications portion of the Health app, the "Your Medications" Section has a different background than the top "Log" Section. How do I achieve this?:
Here some example code. I wonder if I am supposed to use two Lists instead. If I use two Lists though and nest it in a ScrollView, the height of the lists needs to be specified. I am working with dynamic content, though so I don't think that is ideal.
class ProtocolMedication {} // Example model
struct HomeView: View {
@Query private var protocolMedications: [ProtocolMedication]
var body: some View {
NavigationStack {
List {
// Upper sections with default background
Section {
Text("Content 1")
} header: {
Text("Log")
}
// Bottom section that needs different background
Section {
ForEach(protocolMedications) { medication in
Text(medication.name)
}
} header: {
Text("Your Medications")
}
}
.listStyle(.insetGrouped)
}
}
}
Forgot to turn off the ui element status bar. visual garbage.
is it not important? your opinion
https://developer.apple.com/hello/december24/?cid=ht-hello
Hello
My app got rejected with the message "We noticed your app shares a similar binary, metadata, and/or concept as apps submitted to the App Store by other developers, with only minor differences."
In short, my app is a vpn app built entirely by me. In Russia almost all vpn protocols are blocked: wireguard, openvpn etc. And the only protocol they could not block was vless. It was hard to implement it, i spent like 3 weeks on it writing my own package on flutter. The app first was uploaded to android and shared through testflight with some of my friends. And everyone switched to my app, because it works perfect for their needs: accessing instagram, twitter etc. Those apps are blocked here.
So on my first attempt publishing i got 2 errors:
Vpn should be published on the account that is organization
Spam rejection
I registered a company and switched from individual account to a company.
I also changed the ui of the app (although i agree most vpns share the same concept design).
I got rejected again with only "Guideline 4.3(a) - Design - Spam".
I appealed with a question why was it it rejected, explaining that the app was built by me, and of course, i use some libraries. I got the same roboting response.
After that i added some features:
Built in private browser
Network connection speed
Today submitted the new version hoping it would pass, but yet again got "Guideline 4.3(a) - Design - Spam".
I'm really frustrated, because i spent 3 months developing the app.
I understand there are dozens of vpns. But vpn is not exactly the simple feature app. Some are bad, some are good, and some doesn't work at all.
My app doesn't have any ads and paid subscriptions.
I also renamed my app to "Incognito - Browser, VPN". But can't get pass.
Would like to get some advices. Please help
P.S. Sorry for my bad grammar
Good evening. I have come up with this amazing and revolutionary idea that is going to change the ent world for the better.
I’m a 23 year old Design Engineer from Greece and I would like to come to direct contact with the Apple Design Team, in order to discuss this project and the best case scenario, sell it to you.
The foldable iPhone is not a good idea. Its not revolutionary and it’s going to leave a big black mark in Apple history.
With my idea, the whole world will see again the greatness of the biggest company in history.
There is a display issue when browsing wireless networks in the dropdown menu.
In iOS version 18.1.1, the Wi-Fi switch is in the closed state;
Step 1: Open the notification dropdown, and the first image bug appears;
It will take some time for it to display [normally.]
Seeking developer insights regarding a 4.3(a) review response citing "similar binary, metadata, and/or concept." Our app implements distinct community-focused features that fundamentally differentiate it from existing applications in this category.
Feature Implementation:
Our app introduces new technological approaches to faith-based applications:
Community System: Custom-built group participation with progress visualization
Engagement Features: Peer support system with achievement tracking
Progress Metrics: Proprietary points system for progress tracking
Group Progress Features: Shared accomplishment tracking
Achievement Architecture:
Progress continuity tracking
Performance metrics accumulation
Custom recognition system for personal and group milestones
Synchronized goal-setting framework
Market Analysis:
Our research indicates:
No existing apps with group-based progress features
No solutions combining community features with scheduling
No applications with similar group achievement systems
No platforms featuring synchronized progress tracking
Substantial user base requesting these features
Technical Questions:
How have developers effectively demonstrated feature differentiation?
What technical documentation best demonstrates unique implementations?
What strategies work for showing market demand for new features?
Best practices for documenting novel community features?
Implementation Context:
While core scheduling features necessarily overlap with existing solutions, our platform's focus on community engagement and achievement tracking represents a novel approach, validated through user research and community feedback.
Seeking insights from developers who have successfully implemented unique social features in established categories.
Hi all,
Very new to this. Just getting into swift data, and am frustrated with the canvas not working with modelContainers in SwiftData. My understanding is that they work if inMemory = true, but not in the default case where data is persistent after an app is quit.
Can anyone tell me if it is possible to conditionally create the modelContainer type based on a flag... If Bool:Canvas then inMemory = True, Else False... Then using this flag for all data models so my list views populate on the canvas, without having to run the simulator each time... I would assume you could also pre-populate the inMemory option if it is empty also...
Or is there a simple and obvious solution that I am oblivious to.
If it is possible, is it worth the time, hassle, and any possible issues?
I recently got feedback for my app under Guideline 4.2 - Design - Minimum Functionality, and I’m a bit confused. Apple mentioned that the app isn’t “app-like” enough and doesn’t provide sufficient entertainment value or utility.
However, I genuinely think my app is unique compared to others on the market. Most similar apps only offer basic features like scorekeeping and saving the game. My app goes beyond that by tracking detailed statistics based on the types of scores achieved during the game. At the end, there’s even a Player Ratings section, which enhances competition and makes the experience more fun for players.
Additionally, in today’s gaming scene, many groups play the traditional 101 game with a reward and penalty system. My app uniquely incorporates a reward system, something no other app in the market currently offers.
I believe my app has the potential to stand out and meet the needs of a wide audience. Has anyone faced similar feedback? Or does anyone have suggestions on how I could better address this issue?
Thanks in advance! 😊
It is outrageous that Apple continue to fail to implement the Fullscreen API web standard for web apps on iPhone only, which is so important to accessibility and web app functionality.
The only possible reason for this block is commercial: to promote iOS apps instead of browser based web apps.
To quote a client from a major agency just now - a typical enquiry :
We value accessibility greatly, and we noticed that the embedded player is missing a full screen button on iPhone.
Everything else works perfectly fine, including a full screen button that appears on the mobile webpage on android devices.
Is there any way we can include a button to enable full screen view for our viewers in your player that are going to watch it on iOS devices?
To which, as usual, we have to reply:
Apple unfortunately block fullscreen mode from being used with all web applications on iPhone.
Apple will allow this to be displayed fullscreen on MacBooks and iPads, but currently not on on iPhone - so we have to hide the fullscreen button there.
So fullscreen works on all devices and browsers apart from on iPhone.
As you've seen with Android, all other devices and browsers follow the universal 'Fullscreen API' web standard to allow full screen.
You're probably familiar with seeing the fullscreen button on normal linear videos on iPhone.
These use Apple's native video player, which doesn't let buttons and scripts be used on top of it - just a single video, not an interactive web application.
Our player looks like a video player but it is actually a web app combining multiple different video clips connected together by code and styling.
They block it on iPhones for reasons known only to them, but the assumption is that it is to incentivise people to make iOS apps instead of web apps.
The web development community is hopeful that Apple will change this unfortunate restriction soon, but we have been waiting a long time in vain.
We have to send this to a lot of people. It's a very bad look for Apple.
In less than a month it will be 2025. We have been waiting years for this.
The web standard documentation showing universal support on other devices and browsers is here:
https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API
This is not acceptable. It is time for Apple to stop blocking this important accessibility web standard for commercial reasons - only on iPhone. To whoever is in charge of these decisions in the Safari/Webkit team: Please just enable Fullscreen API for web apps on iPhone as soon as possible.
I need this app solution
Emoji keyboard are way too big after updating to IOS 18.1 so anoying to use emojis now. I really don't like using emojis anymore. I really hope they are going to fix this quickly. I use my phone for work and pleasure. I don't needing my heart to be bigger or different colors to every reaction. Please bring back the smaller emoji keyboard or add a setting to switch it back. This is really annoying.
Hi everyone,
I’m facing an issue with my app submission, and I’m hoping to get some advice or suggestions on how to move forward.
Here’s the situation:
App Description: I created an app that provides mods for the game Gorilla Tag. It was initially rejected due to a violation of the Spam Policy.
Resubmission: After making improvements to address the issues, I resubmitted a new version for review.
Current Status: The app has now been stuck in the "In Review" status for a long time with no feedback or updates from Apple.
I’m not sure how to proceed, so I would greatly appreciate some guidance on the following:
Should I remove the app from my App Store Connect account entirely and start fresh? Would this help get the review process moving again?
Should I consider a complete redesign of the app’s UI or any other significant changes to improve its chances of being approved?
What specific changes or fixes should I implement to ensure my app meets the App Store guidelines and gets approved?
Also, I’m wondering if there are any other potential solutions or steps I can take to expedite the review process.
Thanks in advance for any suggestions or advice!
Hello everyone,
I have recently published my app on the App Store and am planning to implement ads. I have a couple of questions regarding Apple's App Tracking Transparency (ATT) framework and best practices for integrating ads.
ATT Dialog and Showing Ads: If a user selects "Ask App Not to Track" on the ATT dialog, am I still allowed to show ads in my app? I understand that ATT restricts tracking for personalized ads, but does this mean I cannot show any ads at all, or is it just the personalized (targeted) ads that are restricted?
Best Practices for Implementing Native Ads: I want to integrate native ads into my app. Could you share any best practices or guidelines for integrating native ads in a way that provides a good user experience and complies with Apple's policies? I’m especially interested in how to implement them in a non-intrusive way and what ad networks are best for this type of integration.
Thanks for your help!
i was update my iPhone 15 pro max on IOS 18.2 beta versio. I am fasing the issu. When i am playing Pubg Game, the notification always Come down and game stop. And when i try to On “Guided Access” the Guided access also not workin. Plzzz fix it. And i have another issue with iPhone when i open any app or any documents its very difficult to Go Back. i have to use left hand to go back or always Use Both hands. If it’s possible the “Go Back” option is available on both left and right side. right hander also easily use iPhone on One hand. give us a option “Go Back” option on Right also. Its very easy for us. Thank u soo much🩷🩷
This is my first day with IOS 18.1.1 and so far it’s smooth. my only problem is how chaotic the photos app has become during the update. For one, i dont like how to access any of the organization it’s at the way bottom and even after customizing and reorganizing there’s no way to to move that section to the top. i also dont like how all my photos are just out on front street when the app is launched, it makes everything hard to look at and hard to find. please fix this and make browsing photos enjoyable again.
Is there a way to revert back to the old designs? The new designs in iOS 18 are so bad and hard to use. I can’t imagine anyone actively tested this for user feedback before releasing.
Hi,
I am a new SwiftUI app developer and developing my first application. In the process of designing not very GUI rich app, I noticed my app crashed whenever I switched orientation (testing on multiple iPhone devices).
After going through all kind of logs and errors, performance enhancements nothing worked.
Then I started rolling back all GUI related features 1 by 1 and tested (I am sure there are better approaches, but excuse me I am novice in app development :) ).
Even though it's time consuming, I could pin point the cause of the fatal error and app crash, it's due to multiple .shadow modifiers I used on NavigationLink inside a ForEach look (to be precise I used it like following,
.shadow(radius: 15)
.shadow(radius: 20)
.shadow(radius: 20)
.shadow(radius: 20)
.shadow(radius: 20)
Note, there are only 7 items in List and it uses the Hero View (like app store's Today section) for child views.
Once I got rid of shadow modifies or used only 1 app works fine and doesn't crash.
Lesson learnt...
P.S.
It's so ironic that so performance tuned devices couldn't handle this basic GUI stuff.
Hello,
I'm currently developing an emergency and security app for a client.
This app is designed to notify organisations and its users of emergency situations.
Our client has asked whether it’s possible to programmatically trigger the SOS Emergency feature on iOS.
Could you let me know if this functionality is available?
Many thanks!
Alex