Closed Spokane-Dude closed 10 years ago
Are you sure it isn't leeching? Have you set a breakpoint in the callback block? The methods are asynchronous, so setting a breakpoint at the end will not help. The Magical Record example at github is the best way to see how to set it up.
It "leeches" every time I run the app with no changes to any of the code... if it were leeching, it would only do it once, yes?
And I have followed the MR example and believe I have set it up accordingly.
Regards, Rolf
Drew McCormack mailto:notifications@github.com June 20, 2014 at 9:17 AM
Are you sure it isn't leeching? Have you set a breakpoint in the callback block? The methods are asynchronous, so setting a breakpoint at the end will not help. The Magical Record example at github is the best way to see how to set it up.
— Reply to this email directly or view it on GitHub https://github.com/drewmccormack/ensembles/issues/155#issuecomment-46697205.
Does it callback the completion block? If so, is the error non-nil?
On 20 Jun 2014, at 18:28, Spokane-Dude notifications@github.com wrote:
It "leeches" every time I run the app with no changes to any of the code... if it were leeching, it would only do it once, yes?
And I have followed the MR example and believe I have set it up accordingly.
Regards, Rolf
Drew McCormack mailto:notifications@github.com June 20, 2014 at 9:17 AM
Are you sure it isn't leeching? Have you set a breakpoint in the callback block? The methods are asynchronous, so setting a breakpoint at the end will not help. The Magical Record example at github is the best way to see how to set it up.
— Reply to this email directly or view it on GitHub https://github.com/drewmccormack/ensembles/issues/155#issuecomment-46697205.
— Reply to this email directly or view it on GitHub.
Changed the code to: // now leech it... if(!ensemble.isLeeched) { [ensemble leechPersistentStoreWithCompletion: ^(NSError *error) { if(error) NSLog(@"Could not leech to ensemble: %@", error); else NSLog(@"leeched successfully!"); }]; } and it does NOT enter the completion block...
Is the ensemble non-nil? You can use CDESetCurrentLogLevel with a setting of verbose to get detailed logging. Perhaps that will show where it is stopping.
On 20 Jun 2014, at 18:34, Spokane-Dude notifications@github.com wrote:
Changed the code to: // now leech it... if(!ensemble.isLeeched) { [ensemble leechPersistentStoreWithCompletion: ^(NSError *error) { if(error) NSLog(@"Could not leech to ensemble: %@", error); else NSLog(@"leeched successfully!"); }]; } and it does NOT enter the completion block...
— Reply to this email directly or view it on GitHub.
Best way is to look at the Magical Record example at github. I think that will show you. The function is in CDEDefines.h
Eg. CDESetCurrentLoggingLevel(CDELoggingLevelVerbose);
On 20 Jun 2014, at 18:44, Spokane-Dude notifications@github.com wrote:
OK... I need help on this: how do I set CDESetCurrentLoggingLevel ? (I've looked and tried different syntax, but keep getting an error..)
— Reply to this email directly or view it on GitHub.
I figured it out and deleted my post... too late, I guess... sorry for the lame question...
Nothing was logged to the console... btw, I am running the latest update...
If you aren’t seeing anything, I really suspect that the ensemble is nil for some reason. Have you checked that in the debugger?
On 20 Jun 2014, at 18:51, Spokane-Dude notifications@github.com wrote:
Uh... where is the log output? (I assumed NSLog; if so, nothing was logged)
— Reply to this email directly or view it on GitHub.
No, ensemble is NOT nil (see image below)
I'm wondering... since I used CocoaPods to do the update, which apparently went OK, maybe I should delete ensembles and re-install using CocoaPods (no update)... is there a way to tell which version of ensemble I have in my code (ie NSLog it)?
All I can suggest is breaking before the leech, and stepping through the code to isolate the problem. There are many apps using the framework, so something strange must be going on here.
On 20 Jun 2014, at 19:26, Spokane-Dude notifications@github.com wrote:
No, ensemble is NOT nil (see image below)
— Reply to this email directly or view it on GitHub.
One last question: is it safe to just remove the Pods project in XCode to effect a clean install using CocoaPods?
Ah, I don't really know. That's more a Cocoapods question. I think it would be OK, but maybe worth searching on Cocoapods.
On 20 Jun 2014, at 19:49, Spokane-Dude notifications@github.com wrote:
One last question: is it safe to just remove the Pods project in XCode to effect a clean install using CocoaPods?
— Reply to this email directly or view it on GitHub.
I have setup Ensembles according to the book and the MagicalRecord example. This is my code:
When I look at the ensemble symbols in the Debugger, after the above code is executed, this is what I see:![screen shot 2014-06-19 at 9 06 07 am](https://cloud.githubusercontent.com/assets/383775/3329950/cd7f6ce8-f7cb-11e3-98de-7c2632979258.png)
Any ideas why it's not working?