简体   繁体   中英

Xcode 7.3: app delegate can't access its own objects, context is claiming to capture an objective-C object but self isn't available

In xcode 7.3 on MacOS 10.11.3 and 10.11.4, when I stop the debugger inside any app delegate method and try to examine any object instantiated inside the app delegate, or even the app delegate itself, I get this warning in the debugger:

 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

This particular time I was in the app delegate's application:didFinishLaunchingWithOptions: method , but stopping in any method in the app delegate, at any point in running the app, gives the same error when trying to look at any of the app delegate's objects.

This does not happen with xcode 7.2. I do notice that in 7.2 that self for the app delegate is listed as (AppDelegate *), while in 7.3 it is (AppDelegate *const). Clicking on the disclosure arrow next to self for the app delegate does not reveal anything in 7.3, while it does in 7.2.

This is both in the simulator and on an actual device.

Any ideas as to what might be wrong?

August

I meet problems too with Object C (not tested on swift 2). I try down command line tool to 7.2.1 but not working, after 1 hour I try access property by "[]" instead "." . It worked =)).

Example:

 [Restaurant name]

instead of

Restaurant.name

Updated : found another ways to fix this bug for object C project

Xcode 7.3 debugger not showing custom class variables

Hope it helpfull

在“构建设置”中,尝试将“ Precompile Prefix Header设置为“ NO

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM