Post

Replies

Boosts

Views

Activity

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
669
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
953
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
965
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
1.1k
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
770
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
877
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.2k
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
649
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
773
Jan ’24
View appears transparent over tableView, whatever alpha channel
I have a view in storyboard, with a tableView and a coloured UIView. The UIView is declared after tableView, so it appears on top of tableView. However, it appears semi transparent over the tableView. In addition, I cannot set its alpha channel to values other than 1 or 0 (e.g., 0.9) But if I create the view programmatically, the view if fully opaque as expected. What am I missing ?
1
0
966
Dec ’23
Why does the superview of a UITableViewController turns nil after unwindSegue ?
Here is the set up. I have a UITableViewController (controller 1), to which I get from a controller (0) As I need to add a searchView atop the tableView, I addSubview to the superview. This is done in viewWillAppear self.view.superview?.addSubview(searchView) // AboveTableView searchView.isHidden = true print("willAppear", self.view.superview, self.tableView.superview) It works perfectly well, I get: willAppear Optional(<UIViewControllerWrapperView: 0x103d2eef0; frame = (0 0; 393 852); autoresize = W+H; layer = <CALayer: From this VC, I segue to another VC (2) with a show segue and comes back with an unwindSegue to return to (1). Problem is that no, superviews are nil. @IBAction func unwindToTableViewController(_ sender: UIStoryboardSegue) { print("unwind", self.view.superview, self.tableView.superview) } gives unwind nil nil If I step back from this controller (1) to the controller (0) from which I segued and segue again to the TableViewController (1), everything works as expected. In addition, if I go from 1 -> 2 by instantiating (2), everything works OK when I unwind to (1). I know a solution is to refactor code replacing UITableViewController with a UIViewController and embed a TableView inside. But I would like to understand why my present design does not work.
3
0
1k
Dec ’23
Are storyboard and UIKit due to disappear ?
I read in Xcode 15.2 release notes that @IBDesignable and @Inspectable are deprecated and will disappear in a future release. After the abandon of WatchKit and its storyboard, replaced by SwiftUI, does it mean storyboards (and consequently UIKit) will progressively disappear, leaving developers alone with SwiftUI to design apps (IMHO, inadequate to design complex UI: for instance, I always struggle to position precisely objects for all devices sizes as we miss constraints manager in SwiftUI) ? For sure, IBDesignable is (was) whimsical, but a very useful tool to design sophisticated UI. Replacing by #Preview does not make it. I also understand that Xcode is a very complex piece of code and that maintaining and evolving some tools (as IBDesignable) requires effort. But isn't it what we expect from Apple ? To provide us with the best tools and keep on the promise of WYSIWYG environments, all along ? Is it only me or do others share this view ?
2
0
2.2k
Dec ’23
AppstoreConnect does not show units and sales of last days
Today, on Dec 14, when I look for units or sales, all that occurred after December 3rd is ignored. Tens were downloaded since dec 3rd, and I could see them when connecting earlier today. When I want to set the time period, I see that any date beyond Dec 3rd is greyed (see attached screenshot). It used to work a few hours ago. This occurred immediately after updating MacOS to 14.2, but I tested on a Mac running 12.6 with the same result. Is it only me or does anyone see the same issue ? I filed a bug report: FB13468285
10
0
1.7k
Dec ’23