Наконец добрался до submission в mac app store. Прислали первые замечания что исправить.
Одно касалось лишних entitlements для sandbox. Убрал лишнее.
Но одно замечание я не совсем понимаю. Текст с претензиями следующий.
Design Preamble
The user interface of your app is not consistent with the macOS Human Interface Guidelines.
Specifically, we found that when the user closes the main application window there is no menu item to re-open it.
Next Steps
It would be appropriate for the app to implement a Window menu that lists the main window so it can be reopened, or provide similar functionality in another menu item. macOS Human Interface Guidelines state that “The menu bar [a]lways contains [a] Window menu”.
Alternatively, if the application is a single-window app, it might be appropriate to save data and quit the app when the main window is closed.
For information on managing windows in macOS, please review the following sections in Apple Human Interface Guidelines:
- The Menu Bar and Its Menus
- The Window Menu
- The File Menu
- Clicking in the Dock
- Window Behavior
Please evaluate how you can implement the appropriate changes, and resubmit your app for review.
В программе не было Window menu в Main menu. На мой взгляд лишнее в моей программе, но если хотят нет проблем, вернул Window menu в Main menu. Но в Window menu нет item для reopen window если окно закрыто. В других программах тоже этой опции нет.
Для открытия программы из Dock использую следующий код, и у меня из дока программа открывается после закрытия.
Если вопрос был только чтобы вернуть Window menu в Main menu то все ясно, но если вопрос еще о том чтобы reopen после закрытия программы то не понимаю где проблема, из док у меня открывается а из Window menu такой опции для reopen нет - после minimise есть но после close нет.
@IBOutlet weak var myWindow: NSWindow!
// function to reopen from Dock
func applicationShouldHandleReopen(_ sender: NSApplication, hasVisibleWindows flag: Bool) -> Bool
{
if flag == false
{
myWindow!.orderFront(self)
}
else
{
myWindow!.makeKeyAndOrderFront(self)
}
return true
}