Post

Replies

Boosts

Views

Activity

Developing a driver to read HFS disks on MacOS Sonoma and newer
Capability to read and write ofd HFS disks on Mac has been removed since a long time. Capability to simply read was also removed since Catalina I think. That is surprising and sometimes frustrating. I still use a 90's MacBook for a few tasks and need from time to time to transfer files to newer Mac or read some old files stored on 3.5" disks. Solution I use is to read the disk on an old Mac with MacOS 10.6 (I'm lucky enough to have kept one) and transfer to USB stick or airdrop… As there is no USB port on the Macbook of course (and I have no more a working 56k modem to transfer by mail), only option if not 3,5" disk is using PCMCIA port on the MacBook for writing to an SD Card to be read in Mac Sonoma. But reading directly 3.5" disk would be great. Hence my questions for the forum: how hard would it be to write such a driver for READING only HFS on Mac Sonoma? There are some software like FuseHFS. Did anyone experience it ? Did anyone have a look at the source code (said to be open source). does anyone know why Apple removed such capability (I thought it was a tiny piece of code compared to the GB of present MacOS)? Thanks for any insights on the matter.
2
0
124
3d
Changing background colour of Button changes the container background
To change the background of a TextField, I simply apply: TextField("0.0", value: $p, format: .number) .textFieldStyle(PlainTextFieldStyle()) .background(.red) That does only work with plain style, but it works. Trying something similar on a button changes the container view background. The only solution I've found is to overlap with a Rectangle. How is it ? A SwiftUI bug ? A current limit of Swift ? A rationale for it ? There a better solution I've not found ?
3
0
182
Oct ’24
preferredColorScheme not working with Xcode 16
In this app, I set the preferredColorScheme in main @main struct TheApp: App { @AppStorage("isDarkMode") private var isDarkMode = false var body: some Scene { WindowGroup { ContentView() .preferredColorScheme(isDarkMode ? .dark : .light) } } } isDarkMode is changed dynamically in code. When code is compiled with Xcode 15.3, the background of ContentView changes from light to dark or vice versa. When compiled with Xcode 16, no more change. However, direct changes to objects do work, such as: TextField("N", value: $t, format: .number) .frame(width: 40) .background(isDarkMode ? .gray : .white) What has changed in Xcode 16 ? Is it documented somewhere ? I saw this SO thread which describe similar problem. https://www.reddit.com/r/swift/comments/upkprg/preferredcolorscheme_toggle_not_working/
10
0
335
Oct ’24
SwiftUI conditional modifier depending on OS type and version
This app may run on MacOS or iOS. I want to use windowResizability modifier (specially In MacOS) which is only available on masOS 13+ and iOS 17+, but still need to run on macOS 12 or iOS 15… So I need something like #if os(macOS) if #available(macOS 13 *) { use windowResizability #else do not use windowResizability #endif #else // iOS if #available(iOS 17 *) { use windowResizability #else do not use windowResizability #endif Here is the code where to apply (in @main) struct TheApp: App { var body: some Scene { WindowGroup { ContentView() // 1.11.2023 .frame( minWidth: 1200, maxWidth: .infinity, minHeight: 600, maxHeight: .infinity) } .windowResizability(.contentSize) // BTW: is that really necessary ? } } How can I achieve this ? Do I need to write a WindowGroup extension for the modifier ? If so, how ? BTW: is windowResizability really necessary ? App seems to work the same without it.
1
1
270
Oct ’24
PullDown menu shows in reverse order when in landscape
I create a UIKit PullDown menu (in a positionMenu button), with the following code: func setupPullDownMenu() { let menu1 = UIAction(title: "Menu1") { [self] _ in // some code } let menu2 = UIAction(title: "Menu2") { [self] _ in // some code } let menu3 = UIAction(title: "Menu3") { [self] _ in // some code } let menu = UIMenu(title: "Positions", children: [menu1, menu2, menu3]) positionMenu.menu = menu positionMenu.showsMenuAsPrimaryAction = true }   In Portrait, options are listed as Menu1, Menu2, Menu3 But in Landscape it is the reverse: Menu3, Menu2, Menu1 I use Xcode 16.1ß and iOS 17.0 simulator Is it the expected behaviour ?
1
0
410
Aug ’24
iTunes Store is stuttering, repeating the same (erroneous) message every 5 minutes…
Since 2 hours (1:20 GMT July 18), I keep receiving the exact same message from iTunesStore every 5 minutes (30 received so far, with metronome regularity): Your banking information was accepted Thank you for providing the requested details for xxxxxx associated with your banking update in App Store Connect. Any payments may take up to 2 payment cycles to send. If you have any questions, contact us at http://developer.apple.com/contact/. I did not update any information since at least 6 weeks. I contacted support, it seems to be widespread problem. I filed a bug report: Jul 18, 2024 at 5:51 PM – FB14377820
5
3
713
Jul ’24
Irrelevant automatically generated answers on the forum
I've recently seen answers to posts that are apparently automatically generated but signed as App Store Connect Engineer. In several cases the answer is misinterpreting the OP. Here is an example: https://developer.apple.com/forums/thread/758391 The OP was really a developer question. Not related to a consumer feature. Is it really an automatic answer (which would be a bad trend for the forums IMHO)?
1
0
666
Jun ’24
A new message 'Answered by forumsContributor in' with a link to nowhere
I see this message for the first time: It is inserted in the OP (https://developer.apple.com/forums/thread/757852) but the link leads to nowhere (just the general page of the forum). In … what ?!? So I wonder what is the meaning of the message, its intent and use ? Or is it just a forum bug ? PS: surprisingly, this post appears in Forums general page (https://developer.apple.com/forums/latest), but not in forums feedback (https://developer.apple.com/forums/tags/forums-feedback) PS2: it appears, but after all the pinned messages which are older. Really confusing… I posted a bug report on this: Jun 23, 2024 at 9:29 PM – FB14024970
5
0
874
Jun ’24
Migrating from ObservableObject to Observable in SwiftUI but still run on older OS
I prepare an app to migrate from ObservableObject to Observable, from EnvironmentObject to Environment(MyClass.self) and so so forth. That works OK, very simple. But, that forces to run on macOS 14 or more recent. So I would like to have it conditionally, such as: if macOS 14 available @Environment(ActiveConfiguration.self) var activeConfiguration: ActiveConfiguration otherwise @EnvironmentObject var activeConfiguration: ActiveConfiguration The same for the class declaration: if macOS 14 available @Observable class ActiveConfiguration { var config = Configuration() } otherwise class ActiveConfiguration : ObservableObject { @Published var config = Configuration() } Is there a way to achieve this (I understand it is not possible through extensions of Macros, as we can do for modifiers) ? Could I define 2 classes for ActiveConfiguration, but then what about @Environment ?
1
0
597
Apr ’24
Using Color() in background modifier in SwiftUI does not work with Xcode 15.3
I had this code working properly in Xcode 17.0.1, with macOS target as 12.4 struct SyntheseView: View { @AppStorage("isDarkMode") var isDarkMode = false // more declarations ……… var body: some View { VStack { ZStack { // code ………………… } .frame(width: 500, height: 300) .background(isDarkMode ? Color(red: 0, green: 0, blue: 120/255) : Color(red: 1, green: 1, blue: 186/255)) } // VStack In Xcode 15.3, I get the error The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions If I comment out the background modifier, no issue. I converted all parameters in Color to Double without success If I replace by a fixed color as .background(.blue) No error. Even the simple .background(Color(red: 0.0, green: 0.0, blue: 0.5)) causes the error. But: .background(isDarkMode ? .blue : .red) does work. I tried to define the Colors as static color extensions to no avail. Another bizarre point is that a similar pattern works OK for another View. Did something change in Xcode 17.3 ?
1
0
749
Mar ’24
New 'Same Here' button on the forum
I've noticed there is a new 'Same Here' button showing on any post (except your own posts). I first thought it was a link to a similar question… Specially when the button just says 'Same here' without any badge value. But no, it is just similar to a like… I guess the goal is to avoid and speed up instead of posting a reply or a comment 'Same here'. Unfortunately, it is not possible to undo and no way to know who posted. As your own posts do not show the button, does it mean you cannot know how many share the same issue than the one you posted ? If so, that's bizarre. Hope it will show the counter at least when it is non zero. Let me see how many 'Same here' on this post… .
5
1
1.1k
Feb ’24
CameraUI SpatialVideo library error
This app allows to take photos. It works OK, but since recently I get the following error message: ERROR: PHOTO not found in table CameraUI-SpatialVideo of bundle CFBundle 0x283e96220 </System/Library/PrivateFrameworks/CameraUI.framework> (not loaded) What is this spatial video ? I'm just using still images, not using CameraUI.framework.
0
0
574
Jan ’24
Forcing screen orientation for a VC
This is an often asked question, but I just have a partial answer so far. There are some views (not all) that I need to present in Portrait only when running on iPhone. If I come from a TabBar, I just add the following code in the TabBar controller override open var supportedInterfaceOrientations : UIInterfaceOrientationMask { if UIDevice.current.userInterfaceIdiom == .phone { return [.portrait, .portraitUpsideDown] } } But I need to do the same when I get to the destination VC by a segue fired from a plain UIViewController or a Cell in a TableView. If I put the code in the destination controller, it has no effect. If I put in the originating VC, it works when segue is triggered from code (case 2 below). But I cannot make it work when segue is triggered in storyboard from the accessory action in the cell of the TableView. Where should I declare the supportedInterfaceOrientations ? Should I do it in the navigation root ? If so, how ? I tried in an extension UINavigationController, to no avail. or should I trigger the segue from accessory, not directly in storyboard but through an IBAction in code ? If that may help, an overview of storyboard setup: Also tried solution described here to no avail either: https://www.appsdeveloperblog.com/disable-rotation-of-uiviewcontroller-embedded-into-uinavigationcontroller/
1
0
654
Jan ’24