Post

Replies

Boosts

Views

Activity

Reply to Filesystem conversion between / and :
Thanks Quinn. if you absolutely want to display a path as a string, my advice nowadays is to display the Posix path. Right, that's what I was doing. But now I have a case where I want files corresponding to dates (but not times), which is why I'm considering doing the /: swap. This has the additional benefit (?) that the names match what is seen in Finder or the iOS Files app. when creating a file things get much much worse :-( Here's what I'm actually doing: I have a file format where the user can enter a document name which is stored internally in the file. And maybe the app provides a suggestion based on the date, e.g. "New widgets for 14/10/2026". I store that string verbatim internally in the document, and then I use it as the basis for the document's filename. At this point, I do /-to-: conversion. Maybe I convert : to space, or something. Maybe I remove newlines. And so on. But I don't want to reject names containing : (etc) because those are fine in the internal metadata. Oh, and I have to do something to force uniqueness i.e. '1:2' and '1 2' and '1\n2' would map to the same filename, ugh. Later I may show a list or tree of available documents. At this point I may or may not have opened the document to read the internal metadata. So I may want to convert the filename back to (approximately) the name that that user entered. Now that I write this, I do wonder if I should be escaping any :s, rather than converting them to e.g. spaces, since that avoids the uniqueness problem. Hmmm.
Topic: App & System Services SubTopic: Core OS Tags:
3w
Reply to I need help
It wouldn't surprise me if you're using a newer version of Swift than was current when the book was written. It is an evolving language, and not always backwards-compatible.
Topic: UI Frameworks SubTopic: SwiftUI
Sep ’25
Reply to Filesystem conversion between / and :
Thanks Quinn. if you absolutely want to display a path as a string, my advice nowadays is to display the Posix path. Right, that's what I was doing. But now I have a case where I want files corresponding to dates (but not times), which is why I'm considering doing the /: swap. This has the additional benefit (?) that the names match what is seen in Finder or the iOS Files app. when creating a file things get much much worse :-( Here's what I'm actually doing: I have a file format where the user can enter a document name which is stored internally in the file. And maybe the app provides a suggestion based on the date, e.g. "New widgets for 14/10/2026". I store that string verbatim internally in the document, and then I use it as the basis for the document's filename. At this point, I do /-to-: conversion. Maybe I convert : to space, or something. Maybe I remove newlines. And so on. But I don't want to reject names containing : (etc) because those are fine in the internal metadata. Oh, and I have to do something to force uniqueness i.e. '1:2' and '1 2' and '1\n2' would map to the same filename, ugh. Later I may show a list or tree of available documents. At this point I may or may not have opened the document to read the internal metadata. So I may want to convert the filename back to (approximately) the name that that user entered. Now that I write this, I do wonder if I should be escaping any :s, rather than converting them to e.g. spaces, since that avoids the uniqueness problem. Hmmm.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3w
Reply to Location via GPS jumps
I believe that you need to set . activityType to “fitness” if you want to avoid the snap-to-road misfeature. Please try this and let me know if it works for you. I went through this years ago; it would be useful to know if that’s still the best fix.
Replies
Boosts
Views
Activity
Oct ’25
Reply to I need help
It wouldn't surprise me if you're using a newer version of Swift than was current when the book was written. It is an evolving language, and not always backwards-compatible.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Sep ’25
Reply to Apple terminated my account without even validating their "Evidence"
It's terrifying, isn't it? Fundamentally, this is all allowed by the developer agreement that they wrote and you agreed to. There is nothing you can do about it. Always make sure that your income from Apple is not your main income; make sure you have a backup career path that you can switch to if they do something like this.
Replies
Boosts
Views
Activity
Sep ’25