Post

Replies

Boosts

Views

Activity

Reply to Dismiss window with an ID on macOS <14
Did you consider using NSNotification instead ? addObserver in the window, which will close it Declare at top level (outside any class) public static let kForceClose = Notification.Name("forceClose") In viewDidLoad of the NSWindowController: NotificationCenter.default.addObserver(self, selector: #selector(closeIt(_:)), name: .kClose, object: nil) @objc func forceClose(_ sender: Notification) { self.window?.close() } Send notification in Button IBAction NotificationCenter.default.post(name: .kForceClose, object: self)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to Applying Custom Rounded Corners to a macOS Window
This should give a solution: https://stackoverflow.com/questions/42762856/nswindow-with-round-corners-in-swift let effect = NSVisualEffectView(frame: NSRect(x: 0, y: 0, width: 0, height: 0)) effect.blendingMode = .behindWindow effect.state = .active effect.material = .dark effect.wantsLayer = true effect.layer?.cornerRadius = 15.0 window.contentView = effect window.titlebarAppearsTransparent = true window.titleVisibility = .hidden window.isOpaque = false window.backgroundColor = .clear Does it ?
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’24
Reply to Task, onAppear, onDisappear modifiers run twice
I could not test on iOS 17 (my sample project crashes Xcode 15.3). Do you confirm it works there ? I see the same on iOS 18: DetailView initialized DetailView appeared DetailView task executed -->> button tapped DetailView disappeared DetailView appeared DetailView disappeared DetailView task executed This discussion may be interesting to read, even it did not let me understand what happens: https://fatbobman.com/en/posts/mastering_swiftui_task_modifier/
Topic: UI Frameworks SubTopic: SwiftUI
Oct ’24
Reply to Rejection from App Store Review
Welcome to the forum. There are multiple reasons for spam rejection. your app is too similar to another app or shares a lot of similar code with another app your app belongs to a category which is over crowded and thus rejected unless it has very specific and valuable features Could you show the complete rejection message and tell which category your app is ?
Oct ’24
Reply to Toolbar buttons in HStack merge with menu when .buttonStyle(…) is set
Reproduced the problem. All buttons are put behind the first in the HStack. Removing buttonStyle on the last button (whatever style) .buttonStyle(.borderedProminent) solves the problem. Or removing the menu also solves. Removing the Stack does NOT solve. So, HStack is not the problem. Bizarre. This fails as well. No Menu, one button without style ToolbarItem(placement: .bottomBar) { HStack { Button {} label: { Label("Foo", systemImage: "square") } .buttonStyle(.bordered) Button {} label: { Label("Bar", systemImage: "circle") } // .buttonStyle(.borderless) // Menu { // Button {} label: { Label("One", systemImage: "figure.arms.open") } // Button {} label: { Label("Two", systemImage: "figure.2.arms.open") } // } label: { Label("Baz", systemImage: "star") } Button {} label: { Label("Quux", systemImage: "triangle") } .buttonStyle(.borderedProminent) // Causes buttons to stack on one another } Restoring the style for the circle makes it work. So issue seems to be when one item has no style (which is the case of Menu) But if we remove style of a second item, it works. => Problem when 2 items in the toolbar have style and some other has not…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to Guideline 5.2.3 - Legal - Intellectual Property - Audio/Video Downloading
Guideline is very clear: 5.2.3 Audio/Video Downloading: Apps should not facilitate illegal file sharing or include the ability to save, convert, or download media from third-party sources (e.g. Apple Music, YouTube, SoundCloud, Vimeo, etc.) without explicit authorization from those sources. Streaming of audio/video content may also violate Terms of Use, so be sure to check before your app accesses those services. Authorization must be provided upon request. For you to solve, you have to get the explicit authorisation from the platforms. Some apps also offer similar features. So, how were these apps published? Do you know if they got such authorisation ? In any case, the fact that other app with similar feature has passed the review, in compliance with guidelines or not, is never an argument. And those apps, if not in compliance, may be rejected at a future review.
Oct ’24
Reply to Don't do the 18.0 update
Read here: https://www.reddit.com/r/iOSBeta/comments/1di0gub/ios_18_db1_empty_calendar/ I powered off my phone and it fixed the problem! Hope that works for you as well. If not working, may have a look here: https://www.youtube.com/watch?v=h0VPocWXc9g
Oct ’24
Reply to iOS 18.1 issues
Welcome to the forum. Your question is not about app development. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com and provide as miuch information as possible on your iPhone configuration. You're not the only one experiencing issue, so multiple bug report may help speed up the correction.
Oct ’24
Reply to Ios 18.1 bug, fix asap
Welcome to the forum. Your question is not about app development. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com You wrote:  a screen randomly pops up which screen ? random or always the same ?
Oct ’24
Reply to iOS 18 calculator functions
Welcome to the forum. Your question is not about app development, it is about app usage. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com Don't forget to close the thread by marking the correct answer.
Oct ’24
Reply to Dismiss window with an ID on macOS <14
Did you consider using NSNotification instead ? addObserver in the window, which will close it Declare at top level (outside any class) public static let kForceClose = Notification.Name("forceClose") In viewDidLoad of the NSWindowController: NotificationCenter.default.addObserver(self, selector: #selector(closeIt(_:)), name: .kClose, object: nil) @objc func forceClose(_ sender: Notification) { self.window?.close() } Send notification in Button IBAction NotificationCenter.default.post(name: .kForceClose, object: self)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Applying Custom Rounded Corners to a macOS Window
This should give a solution: https://stackoverflow.com/questions/42762856/nswindow-with-round-corners-in-swift let effect = NSVisualEffectView(frame: NSRect(x: 0, y: 0, width: 0, height: 0)) effect.blendingMode = .behindWindow effect.state = .active effect.material = .dark effect.wantsLayer = true effect.layer?.cornerRadius = 15.0 window.contentView = effect window.titlebarAppearsTransparent = true window.titleVisibility = .hidden window.isOpaque = false window.backgroundColor = .clear Does it ?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Task, onAppear, onDisappear modifiers run twice
I could not test on iOS 17 (my sample project crashes Xcode 15.3). Do you confirm it works there ? I see the same on iOS 18: DetailView initialized DetailView appeared DetailView task executed -->> button tapped DetailView disappeared DetailView appeared DetailView disappeared DetailView task executed This discussion may be interesting to read, even it did not let me understand what happens: https://fatbobman.com/en/posts/mastering_swiftui_task_modifier/
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Oct ’24
Reply to Rejection from App Store Review
Welcome to the forum. There are multiple reasons for spam rejection. your app is too similar to another app or shares a lot of similar code with another app your app belongs to a category which is over crowded and thus rejected unless it has very specific and valuable features Could you show the complete rejection message and tell which category your app is ?
Replies
Boosts
Views
Activity
Oct ’24
Reply to Toolbar buttons in HStack merge with menu when .buttonStyle(…) is set
Reproduced the problem. All buttons are put behind the first in the HStack. Removing buttonStyle on the last button (whatever style) .buttonStyle(.borderedProminent) solves the problem. Or removing the menu also solves. Removing the Stack does NOT solve. So, HStack is not the problem. Bizarre. This fails as well. No Menu, one button without style ToolbarItem(placement: .bottomBar) { HStack { Button {} label: { Label("Foo", systemImage: "square") } .buttonStyle(.bordered) Button {} label: { Label("Bar", systemImage: "circle") } // .buttonStyle(.borderless) // Menu { // Button {} label: { Label("One", systemImage: "figure.arms.open") } // Button {} label: { Label("Two", systemImage: "figure.2.arms.open") } // } label: { Label("Baz", systemImage: "star") } Button {} label: { Label("Quux", systemImage: "triangle") } .buttonStyle(.borderedProminent) // Causes buttons to stack on one another } Restoring the style for the circle makes it work. So issue seems to be when one item has no style (which is the case of Menu) But if we remove style of a second item, it works. => Problem when 2 items in the toolbar have style and some other has not…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Guideline 5.2.3 - Legal - Intellectual Property - Audio/Video Downloading
Guideline is very clear: 5.2.3 Audio/Video Downloading: Apps should not facilitate illegal file sharing or include the ability to save, convert, or download media from third-party sources (e.g. Apple Music, YouTube, SoundCloud, Vimeo, etc.) without explicit authorization from those sources. Streaming of audio/video content may also violate Terms of Use, so be sure to check before your app accesses those services. Authorization must be provided upon request. For you to solve, you have to get the explicit authorisation from the platforms. Some apps also offer similar features. So, how were these apps published? Do you know if they got such authorisation ? In any case, the fact that other app with similar feature has passed the review, in compliance with guidelines or not, is never an argument. And those apps, if not in compliance, may be rejected at a future review.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Don't do the 18.0 update
Read here: https://www.reddit.com/r/iOSBeta/comments/1di0gub/ios_18_db1_empty_calendar/ I powered off my phone and it fixed the problem! Hope that works for you as well. If not working, may have a look here: https://www.youtube.com/watch?v=h0VPocWXc9g
Replies
Boosts
Views
Activity
Oct ’24
Reply to iOS 18.1 issues
Welcome to the forum. Your question is not about app development. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com and provide as miuch information as possible on your iPhone configuration. You're not the only one experiencing issue, so multiple bug report may help speed up the correction.
Replies
Boosts
Views
Activity
Oct ’24
Reply to Ios 18.1 bug, fix asap
Welcome to the forum. Your question is not about app development. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com You wrote:  a screen randomly pops up which screen ? random or always the same ?
Replies
Boosts
Views
Activity
Oct ’24
Reply to iOS 18 calculator functions
Welcome to the forum. Your question is not about app development, it is about app usage. So you'd better ask on Apple Support Community: https://discussions.apple.com/welcome Or file a bug report here: https://feedbackassistant.apple.com Don't forget to close the thread by marking the correct answer.
Replies
Boosts
Views
Activity
Oct ’24