Hey Blake, thanks for the reachability update! This looks great.
I'm porting over one of our projects to use the newest code from
master.
In a few places, we check for network availability before doing
things, e.g.
if ([[RKClient sharedClient] isNetworkReachable]) {
// Load remote ad
}
else {
// Show local ad instead of showing failed remote ad
}
However, I'm getting an assertion,
*** Assertion failure in -[RKReachabilityObserver
validateIntrospection], /path.../RKReachabilityObserver.m:291
*** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Cannot inspect
reachability state: no reachabilityFlags available. Be sure to check
isReachabilityDetermined'
Do I need to check it every time I try to call [[RKClient
sharedClient] isNetworkReachable] ? And if reachability is not
determined, would it make more sense to just go for it with the
request, or wait?
For example, like this?
if ([[[RKClient sharedClient] reachabilityObserver]
isReachabilityDetermined]) {
if ([[RKClient sharedClient] isNetworkReachable]) {
// Load remote ad
}
else {
// Show local ad instead of showing failed remote ad
}
}
else {
// ?
}
Larry
On Oct 20, 2:24 pm, Blake Watters <
blakewatt...@gmail.com> wrote:
> I pushed a fix a little while ago where non-hostname based initialization was failing to schedule the observer properly. Should fix your issue Christian
>
> --
> Blake Watters
> Sent with Sparrow (
http://www.sparrowmailapp.com)
>
>
>
>
>
>
>
> On Thursday, October 20, 2011 at 2:20 PM, Christian wrote:
> > The notification doesn't seem to fire when turning airplay mode on and
> > off. Is this to be expected?
>
> > I was checking for RKReachabilityDidChange (or whatever it's called
> > now) notification.
>
> > > 2011/10/19 Ming Yeow Ng <
mingy...@gmail.com (
http://gmail.com)>
>
> > > > Hi Blake, I hit on a pretty severe error that i never noticed before
> > > > on previous versions
>
> > > > Essentially, some weird "caching" seems to be happening.
>
> > > > - i used the application for a while (iOS 4.3.3, commit
> > > > 935f6dee913f47b147fa9c465dd569b38635010f)
> > > > - i realized that the content was not being updated even when there is
> > > > new content coming in
> > > > - for certain calls, it seems like the phone was retrieving data from
> > > > the server, but there is not request hitting the server
> > > > - it becomes weird when i exited the application, explicitly quit the
> > > > app from the multi-tasking bar
> > > > - when the app is open again, the older data set gets loaded, even
> > > > when the server traces no requests
> > > > - i restarted the phone, but the older data gets loaded again
>
> > > > The only thing i can think of is that some data is cached in some way
> > > > on the phone, and e phone is not making any server calls, but using
> > > > that data instead.
>
> > > > I have coredata for a separate purpose, but i have not set up restkit
> > > > to use it in anyway.
>
> > > > Any idea if the latest fixes might be causing this?
>
> > > > This could just be an edge case, but it is severe enough that i feel e
> > > > need to voice it out here.
>
> > > > M
>
> > > > On Oct 19, 4:37 pm, Ivan Vuèica <
ivuc...@gmail.com (
http://gmail.com)> wrote:
> > > > > Nevermind.
>
> > > > > Looks like it's got more to do with RestKit being sensitive about
> > > > recreating
> > > > > the object manager. I moved the instantiation of RKObjectManager and
> > > > mapping
> > > > > setup to -init. Still, it doesn't seem right that reachability observer
> > > > > should be sensitive about re-creating the object manager.
>
> > > > > > On Wed, Oct 19, 2011 at 10:18, Thomas <
tho...@griwenka.de (
http://griwenka.de)> wrote:
>
> > > > > > > In my app your fixes just work. Thank you very much for your fast
> > > > > > > help.
>
> > > > > > > With best regards,
> > > > > > > Thomas
>
> > > > > > > On 19 Okt., 05:27, Blake Watters <
blakewatt...@gmail.com (
http://gmail.com)> wrote:
> > > > > > > > The cleanups are now in place. I believe it should be good for
> > > > merging
> > > > > > > and general use
>
> > > > > > > > --
> > > > > > > > Blake Watters
> > > > > > > > Sent with Sparrow (
http://www.sparrowmailapp.com)
>
> > > > > > > > On Tuesday, October 18, 2011 at 11:12 PM, Blake Watters wrote:
> > > > > > > > > I am about to push another round of cleanups to realign the
> > > > > > > dependencies within RKClient with the new reachability code. Will send
> > > > a
> > > > > > > note when its available and I anticipate merging to master some time
> > > > > > > tomorrow.
>
> > > > > > > > > --
> > > > > > > > > Blake Watters
> > > > > > > > > Sent with Sparrow (
http://www.sparrowmailapp.com)
>
> > > > > > > > > On Tuesday, October 18, 2011 at 10:43 PM, Ming Yeow Ng wrote:
>
> > > > > > > > > > I have tested the new version on the iPhone 4 and iPad1, and it
> > > > > > > seems
> > > > > > > > > > to resolve a few crash/reachability issues we had
>
> > > > > > > > > > we are pushing out to a few users with prior problems, will get
> > > > back
> > > > > > > > > > as we hear from them
>
> > > > > > > > > > M
>
> > > > > > > > > > On Oct 18, 11:30 pm, Thomas <
tho...@griwenka.de (
http://griwenka.de) (
> > > >
http://griwenka.de)>
> > > > > > > wrote:
> > > > > > > > > > > Hi Blake,
>
> > > > > > > > > > > I fetched your commit and build a new version of my app.
> > > > Tested
> > > > > > > the
> > > > > > > > > > > app in the simulator and on an iPhone4 and on an iPod touch
> > > > 3rd
> > > > > > > > > > > generation. Everything seems to work fine. No more assertions
> > > > and
> > > > > > > no
> > > > > > > > > > > more stuck in offline mode during the first few tests. I
> > > > pushed
> > > > > > > the
> > > > > > > > > > > new version to my testers and I think I get some response
> > > > during
> > > > > > > the
> > > > > > > > > > > next 24 hours. It is late afternoon here in germany.
>
> > > > > > > > > > > Thanks for your fast response. Restkit is awesome.
>
> > > > > > > > > > > With best regards,
> > > > > > > > > > > Thomas
>
> > > > > > > > > > > On 18 Okt., 15:25, Blake Watters <
blakewatt...@gmail.com (
http://gmail.com) (
> ...
>
> read more »