在MacOS 10.11.3和10.11.4上的xcode 7.3中,当我在任何app委托方法中停止调试器并尝试检查在app委托中实例化的任何对象,甚至是app委托本身时,我在调试器中收到此警告:
error: warning: Stopped in a context claiming to capture an Objective-C object pointer, but 'self' isn't available; pretending we are in a generic context
error: member reference type 'AppDelegate *const' is a pointer; did you mean to use '->'?
error: incomplete definition of type 'AppDelegate'
note: forward declaration of 'AppDelegate'
error: 2 errors parsing expression
Run Code Online (Sandbox Code Playgroud)
这个特定的时间我在app委托中application:didFinishLaunchingWithOptions: method,但在app 代理中的任何方法停止,在运行应用程序的任何时候,在尝试查看任何app delegate的对象时都会出现相同的错误.
xcode 7.2不会发生这种情况.我注意到在7.2中self,app委托被列为(AppDelegate*),而在7.3中它是(AppDelegate*const).单击自定义旁边的显示箭头以显示应用程序委托,但在7.3中没有显示任何内容,而在7.2中则显示.
这是在模拟器和实际设备上.
关于什么可能是错的任何想法?
八月
我有一个奇怪的问题。我的iPad应用在iOS12上运行良好,但在padOS13上却显示问题。
在模拟器上,它不会显示在扩展坞中。在设备上,它会显示在扩展坞中,但是点击该位置不会启动它。
我已将断点放入applicationWillEnterForeground,applicationDidBecomeActive等的应用程序委托方法中,并在iOS 12上被调用。他们没有在13。
我(尚未)使用场景,我仍在阅读它们。但是我在应用程序委托上有一个window属性,因此此时我不应该要求使用场景。至少从我所读到的关于退出场景的内容来看。
我不确定如何解决此问题。在扩展坞中轻按应用程序不会导致任何消息激活。我可以点击应用程序图标,它将重新打开,但是停靠栏图标无响应。但是它在12上工作正常。这非常令人沮丧!
有什么建议吗?