Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 265
August Avatar asked Mar 22 '16 18:03

August


2 Answers

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

like image 101
user3034751 Avatar answered Nov 10 '22 00:11

user3034751


In Build Settings, try setting Precompile Prefix Header to NO.

like image 22
Mojo66 Avatar answered Nov 10 '22 01:11

Mojo66