Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have also had a problem with <strong>Attempting to create USE_BLOCK_IN_FRAME variable with block that isn't in the frame</strong>. Although mine wasn't anything to do with NSFetchedResultsControllers.</p> <h2>Possibly Your Problem</h2> <p>I noticed you mention you are using a singleton, so maybe your problem is solved at this link:</p> <p><a href="http://npenkov.com/2011/08/01/solving-issues-like-warning-attempting-to-create-use_block_in_frame-variable-with-block-that-isnt-in-the-frame/" rel="nofollow">http://npenkov.com/2011/08/01/solving-issues-like-warning-attempting-to-create-use_block_in_frame-variable-with-block-that-isnt-in-the-frame/</a></p> <p>From the link:</p> <blockquote> <p>Exactly in session manager I used the macro, before @synthesize – this was the problem, static definitions should not appear before synthesized methods. So if you have something like:</p> </blockquote> <pre><code>SYNTHESIZE_SINGLETON_FOR_CLASS(SessionManager) @synthesize loggedUserId, ... </code></pre> <blockquote> <p>Just replace it with:</p> </blockquote> <pre><code>@synthesize loggedUserId, ... SYNTHESIZE_SINGLETON_FOR_CLASS(SessionManager) enter code here </code></pre> <h2>My problem</h2> <p>The problem I had was to do with duplicating a variable declaration, in this case the variable inherited from NSManagedObject :</p> <pre><code>- (void)functionThatDoesSomething { VariableInheritedFromNSMObj *variableA = nil; for (VariableInheritedFromNSMObj *variableA in [self containerObject]) { NSLog(@"a = %@\n", [variableA name]); } [variableA setName:@"StackOverflow"]; } </code></pre> <p>Moving the first line, where variableA is initialised to nil, to after the loop fixed the problem. In my production code I then changed the name of one of the variables.</p> <p>Hope that helps you or someone else who comes across this problem. This error seems to manifest itself in many different ways.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload