【发布时间】:2016-11-18 19:44:53
【问题描述】:
我正在尝试在 Mac App Store 中发布我的应用程序更新。我已经在运行 macOS Sierra 的 Macbook Pro 上对其进行了测试。但是这个版本被拒绝了 4 次,因为当 Apple Review Team 测试我的应用程序时,其中一个主窗口显示为空白。
这是我所拥有的:
- 有 LPChannelsWindowController 类,带有 .h、.m 文件并自动生成 .xib 文件。
- 在 AppDelegate 中有此窗口的强属性
- 还有带有 .h、.m 和 .xib 文件的 LPChannelsViewController 类。 .xib 文件包含所有控件和对 LPChannelsViewController.m 中插座的引用
这就是我初始化这个窗口的方式:
self.channelsListWindowController = [[LPChannelsWindowController alloc] initWithWindowNibName:NSStringFromClass(LPChannelsWindowController.class)];
[self.channelsListWindowController show];
在显示方法中:
[NSApp activateIgnoringOtherApps:YES];
[self showWindow:nil];
[self.window makeKeyAndOrderFront:self];
windowDidLoad:
[super windowDidLoad];
self.channelsVC = [[LPChannelsViewController alloc] initWithNibName:NSStringFromClass(LPChannelsViewController.class) bundle:nil];
self.window.contentView = self.channelsVC.view;
self.window.contentViewController = self.channelsVC;
self.window.title = @"Manage channels";
self.channelsVC.containingWindow = self.window;
它在我的 Macbook 上运行良好,但 Apple Review Teams 每次都会向我发送此屏幕截图。而且我想不出这里可能出了什么问题。
甚至这个窗口的标题也没有改变。这就是为什么我认为调用 windowDidLoad 时可能没有初始化 LPChannelsWindowController 的 window 属性。还是根本没有调用 windowDidLoad?
【问题讨论】:
-
你是 100% 你的 xib 被称为 LPChannelsWindowController.xib?
-
是的,我检查了这个。否则它不会在所有的mac上工作,即使是我自己。但它适用于我的 Macbook Pro。
-
您在什么类型的帐户下测试您的应用程序?行政、标准、客人...选择一个,免费获得一个。
-
我尝试了访客帐户和标准帐户,在我的 Macbook 上没有任何问题。
标签: objective-c macos cocoa