Post

Replies

Boosts

Views

Activity

Reply to Detect and wait until a file has been unzipped to avoid permission errors
In my app the user can select a source folder to be synced with a destination folder. The sync can also happen in response to a change in the source folder detected with FSEventStreamCreate. First of all, these are two radically different use cases. Once the user is doing something, then you can use file coordination to have (hopefully) some control while an operation is occurring. With file system events, you are simply getting a notification about something that happened at some point in the past. The only real similarity here is that the file system is out of your control. Whatever you're doing, you have to account for unexpected changes to permissions, additions, deletions, etc. Unzipping is always a good test because it exercises all of that. The short answer is that there is no answer. File sync is a hard problem, in a mathematical sense. There's nothing wrong with a little delay. That is how FSEvents work, after all. But a delay doesn't solve anything, it just makes the higher-level logic a bit more manageable. When dealing with file system operations, and especially file system events, there is no real concept of "failure". Your sync simply can't ever fail unless the entire hard drive controller goes up in smoke. Lower-level failures from the file system will be a regular occurrence, as in every few seconds. You simply have to handle them. Another trick you can do is to take a snapshot of the directory you are working with. By that I mean just creating a representation of the directory tree in memory the way it is in the file system. (Just the file system, not the data) File coordination might help here. Then you work from that to do your sync. But this too is just a convenience. You have to expect that when you're working through the tree, the on-disk representation can radically change, or go away altogether.
Topic: App & System Services SubTopic: Core OS Tags:
May ’25
Reply to Detect and wait until a file has been unzipped to avoid permission errors
I would handle the "permission denied" error by postponing the sync until the unzip has completed, which is the question I'm trying to find an answer to. Unzipping is a good test case, but there are other operations that could trigger the same problem. The end user could act as root and create an unreadable directory, leaving it there forever. Unless this is an operation that you initiated, with a reliable completion mechanism, then there is no way to tell when it completes. Maybe the user runs out of disk space, or the file is corrupted, and it never completes.
Topic: App & System Services SubTopic: Core OS Tags:
May ’25
Reply to Use Java codebase with multiplatform SwiftUI app
Is there a way to package the Java code to work on iOS and mani macOS without having to complicate the project to the point where it would be easier to rewrite the Java code in Swift and have to work harder to update the app on each platform separately? No, there is not. Perhaps this would be an opportunity to try an AI solution to translate from Java to Swift.
Jun ’25
Reply to Xcode15 on Sequoia
What are those compiler issues? There is very little difference between Xcode 15 and Xcode 16. It shouldn't cause that kind of problem. Plus, Apple now requires Xcode 16 and building against the current SDKs for submission to the App Store. So unless you are distributing this project through some other means, then you have no choice. Otherwise, you can always install a VM, or roll back to an earlier OS version.
Jun ’25
Reply to How can I bundle resources along with my launch agent?
I don't think "SharedSupport" is the appropriate place. The legacy documentation says that this location is for "additional non-critical resources that do not impact the ability of the application to run". Unfortunately, I think the legacy migration documentation is wrong because it explicitly says to use the "Resources" folder for executable code. Don't do that. Here is the current documentation. None of that is really what you're asking about, but I think it leads up to it. Typically, launch agents are single-file executables. I'm not familiar with the taskinfo tool or its output. But what it says makes sense. A Launch Agent would run with a user space UI role. That's how Launch Agents work. That's not the same as a Launch Daemon that runs as root and does not require a login session. When I look at how most other apps handle these things, what you're describing sounds more like a Login Item. A login item would live in "Contents/Library/LoginItems". Of all the apps I have installed that contain items in "Contents/Library", virtually all that contain bundled apps have them as Login Items. So I recommend you treat this thing as a Login Item. (Note that I mean a newer Service Management Login Item, not the really old school Login Items meant for end users). It's only recently that Apple added the ability to bundle Launch Agents and Daemons inside an app bundle. In a modern app, I'm not really sure what the difference between a Login Item and a Launch Agent would be. They seem to perform very similar roles. I guess a Launch Agent would be able to use some of the plist config file tricks that a Login Item would probably have to code manually. I can tell you that I have a couple of apps in development that will contain some background functionality and I plan to use Login Items rather than Launch Agents.
Jun ’25
Reply to How can I bundle resources along with my launch agent?
launchd agents can publish named XPC endpoints. I know enough about that to stay away from it. the system is able to relaunch a launchd agent that crashes. That might be useful. However, there is one important distinction. Can a Launch Agent be used in the Mac App Store? Login Items are explicitly allowed in the "retired" Mac App Store documentation. The current App Review guidelines only mention user consent. Is there a modern replacement for the old "Submitting o the Mac App Store" documentation?
Jun ’25
Reply to Rendering HTML tables on iOS
That's too much of an open-ended question. Just pick one of the 5000 methods to accomplish this. Or perhaps recognize the inherent constraints of the platform and re-think how you display data to be more readable and useful on a small-screen platform.
Topic: Safari & Web SubTopic: General
Jun ’25
Reply to Publish old demo code from Apple on GitHub
When Apple, or anyone else, publishes source code on the internet, it is automatically copyrighted. Sometimes that copyrighted content includes an open source license. If so, then you can then use that code under the terms of that license. In theory, said license could say anything. But they typically conform to one of a number of standard open source licenses. Usually, you can continue to use and re-distribute the source even if the original content is removed. Just make sure to confirm that with the license itself. Apple's licenses are typically very unobtrusive. But licenses from other sources can be very restrictive. Unfortunately, Apple is well-known for deleting documentation, videos, and especially sample code. If they publish anything during this week's WWDC that seems like it might be useful, download and archive it. Never assume that anything Apple publishes will be available forever.
Topic: Community SubTopic: Apple Developers Tags:
Jun ’25
Reply to Solo Developer User Feedback Avenues
I think you misunderstood. This is most definitely not the forum for your users or testers. As an individual developer, it's important to remember that you're not Apple. Nor are you any other company with employees and a user experience budget. If you want people to test your app and give you feedback, you'll have to go looking for them. For many developers, the closest thing to real-world, end-user testing that they ever get is App Review.
Jun ’25
Reply to Clarification Regarding App Denial on Simulator and Its Impact on App Review Process
Please don't use the Comment feature here in the forums. It's very annoying. Don't worry about those kinds of security issues. If your app reaches any level of popularity, then yes, it will absolutely be hacked. But at that point, you should consider the hackers to be an unpaid marketing team. Then, if your app continues to be successful enough so that the hackers are a noticeable detriment to your income, you'll have the resources to improve security and lock it down.
Jun ’25
Reply to Detect and wait until a file has been unzipped to avoid permission errors
In my app the user can select a source folder to be synced with a destination folder. The sync can also happen in response to a change in the source folder detected with FSEventStreamCreate. First of all, these are two radically different use cases. Once the user is doing something, then you can use file coordination to have (hopefully) some control while an operation is occurring. With file system events, you are simply getting a notification about something that happened at some point in the past. The only real similarity here is that the file system is out of your control. Whatever you're doing, you have to account for unexpected changes to permissions, additions, deletions, etc. Unzipping is always a good test because it exercises all of that. The short answer is that there is no answer. File sync is a hard problem, in a mathematical sense. There's nothing wrong with a little delay. That is how FSEvents work, after all. But a delay doesn't solve anything, it just makes the higher-level logic a bit more manageable. When dealing with file system operations, and especially file system events, there is no real concept of "failure". Your sync simply can't ever fail unless the entire hard drive controller goes up in smoke. Lower-level failures from the file system will be a regular occurrence, as in every few seconds. You simply have to handle them. Another trick you can do is to take a snapshot of the directory you are working with. By that I mean just creating a representation of the directory tree in memory the way it is in the file system. (Just the file system, not the data) File coordination might help here. Then you work from that to do your sync. But this too is just a convenience. You have to expect that when you're working through the tree, the on-disk representation can radically change, or go away altogether.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to Detect and wait until a file has been unzipped to avoid permission errors
I would handle the "permission denied" error by postponing the sync until the unzip has completed, which is the question I'm trying to find an answer to. Unzipping is a good test case, but there are other operations that could trigger the same problem. The end user could act as root and create an unreadable directory, leaving it there forever. Unless this is an operation that you initiated, with a reliable completion mechanism, then there is no way to tell when it completes. Maybe the user runs out of disk space, or the file is corrupted, and it never completes.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to Use Java codebase with multiplatform SwiftUI app
Is there a way to package the Java code to work on iOS and mani macOS without having to complicate the project to the point where it would be easier to rewrite the Java code in Swift and have to work harder to update the app on each platform separately? No, there is not. Perhaps this would be an opportunity to try an AI solution to translate from Java to Swift.
Replies
Boosts
Views
Activity
Jun ’25
Reply to Xcode15 on Sequoia
What are those compiler issues? There is very little difference between Xcode 15 and Xcode 16. It shouldn't cause that kind of problem. Plus, Apple now requires Xcode 16 and building against the current SDKs for submission to the App Store. So unless you are distributing this project through some other means, then you have no choice. Otherwise, you can always install a VM, or roll back to an earlier OS version.
Replies
Boosts
Views
Activity
Jun ’25
Reply to How can I bundle resources along with my launch agent?
I don't think "SharedSupport" is the appropriate place. The legacy documentation says that this location is for "additional non-critical resources that do not impact the ability of the application to run". Unfortunately, I think the legacy migration documentation is wrong because it explicitly says to use the "Resources" folder for executable code. Don't do that. Here is the current documentation. None of that is really what you're asking about, but I think it leads up to it. Typically, launch agents are single-file executables. I'm not familiar with the taskinfo tool or its output. But what it says makes sense. A Launch Agent would run with a user space UI role. That's how Launch Agents work. That's not the same as a Launch Daemon that runs as root and does not require a login session. When I look at how most other apps handle these things, what you're describing sounds more like a Login Item. A login item would live in "Contents/Library/LoginItems". Of all the apps I have installed that contain items in "Contents/Library", virtually all that contain bundled apps have them as Login Items. So I recommend you treat this thing as a Login Item. (Note that I mean a newer Service Management Login Item, not the really old school Login Items meant for end users). It's only recently that Apple added the ability to bundle Launch Agents and Daemons inside an app bundle. In a modern app, I'm not really sure what the difference between a Login Item and a Launch Agent would be. They seem to perform very similar roles. I guess a Launch Agent would be able to use some of the plist config file tricks that a Login Item would probably have to code manually. I can tell you that I have a couple of apps in development that will contain some background functionality and I plan to use Login Items rather than Launch Agents.
Replies
Boosts
Views
Activity
Jun ’25
Reply to How can I bundle resources along with my launch agent?
launchd agents can publish named XPC endpoints. I know enough about that to stay away from it. the system is able to relaunch a launchd agent that crashes. That might be useful. However, there is one important distinction. Can a Launch Agent be used in the Mac App Store? Login Items are explicitly allowed in the "retired" Mac App Store documentation. The current App Review guidelines only mention user consent. Is there a modern replacement for the old "Submitting o the Mac App Store" documentation?
Replies
Boosts
Views
Activity
Jun ’25
Reply to LibXML2 parsing whitespace and line breaks
Maybe you should include some code showing how you are doing this. As far as I'm aware, the default is to preserve whitespace. And maybe explain what platforms you're targeting. Apple provides a couple of higher-level XML wrappers, depending on your platform.
Replies
Boosts
Views
Activity
Jun ’25
Reply to How can I bundle resources along with my launch agent?
Thanks!
Replies
Boosts
Views
Activity
Jun ’25
Reply to Purchase Confirmation Letter
Apple always e-mails receipts. Developers have no control over that. Apple has some requirements for user information and consent with respect to purchases, but I'm not aware of any rules against developers going beyond the bare minimum.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Rendering HTML tables on iOS
That's too much of an open-ended question. Just pick one of the 5000 methods to accomplish this. Or perhaps recognize the inherent constraints of the platform and re-think how you display data to be more readable and useful on a small-screen platform.
Topic: Safari & Web SubTopic: General
Replies
Boosts
Views
Activity
Jun ’25
Reply to Publish old demo code from Apple on GitHub
When Apple, or anyone else, publishes source code on the internet, it is automatically copyrighted. Sometimes that copyrighted content includes an open source license. If so, then you can then use that code under the terms of that license. In theory, said license could say anything. But they typically conform to one of a number of standard open source licenses. Usually, you can continue to use and re-distribute the source even if the original content is removed. Just make sure to confirm that with the license itself. Apple's licenses are typically very unobtrusive. But licenses from other sources can be very restrictive. Unfortunately, Apple is well-known for deleting documentation, videos, and especially sample code. If they publish anything during this week's WWDC that seems like it might be useful, download and archive it. Never assume that anything Apple publishes will be available forever.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to FSKit questions and clarifications
Never reply via comment. Your reply most likely won't be noticed. And there is no point in asking questions about new features a few hours before WWDC kicks off.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Pyro Panda demo from WWDC 25
There is some "code" associated with that video. If you want the SceneKit original, you might try the archives. I see examples about a voxelpanda, a badger, and two foxes.
Replies
Boosts
Views
Activity
Jun ’25
Reply to Solo Developer User Feedback Avenues
I think you misunderstood. This is most definitely not the forum for your users or testers. As an individual developer, it's important to remember that you're not Apple. Nor are you any other company with employees and a user experience budget. If you want people to test your app and give you feedback, you'll have to go looking for them. For many developers, the closest thing to real-world, end-user testing that they ever get is App Review.
Replies
Boosts
Views
Activity
Jun ’25
Reply to Clarification Regarding App Denial on Simulator and Its Impact on App Review Process
Please don't use the Comment feature here in the forums. It's very annoying. Don't worry about those kinds of security issues. If your app reaches any level of popularity, then yes, it will absolutely be hacked. But at that point, you should consider the hackers to be an unpaid marketing team. Then, if your app continues to be successful enough so that the hackers are a noticeable detriment to your income, you'll have the resources to improve security and lock it down.
Replies
Boosts
Views
Activity
Jun ’25