Wrox Programmer Forums
|
BOOK: Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad
This is the forum to discuss the Wrox book Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad by Jack Cox, Nathan Jones, John Szumski; ISBN: 978-1-118-36240-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional iOS Network Programming: Connecting the Enterprise to the iPhone and iPad section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 14th, 2014, 07:06 AM
Registered User
 
Join Date: Mar 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Errata Chapter 5: Handling Errors

Hello,

Thank you for the great book. It is a pleasure to read and an awesome source for all aspects of iOS network programming.

I might be wrong but in the "networkChanged" method on page 100 a Reachability object is directly compared with a NetworkStatus value.
For my understanding the method should better read:

Code:
- (void)networkChanged:(NSNotification*)notification {
    Reachability *reachability = [notification object];
    NetworkStatus status = [reachability currentReachabilityStatus];
    
    if (status == ReachableViaWWAN) {
        // Reachable vie WWAN
    }
    ...
Cheers,

Last edited by foxtrott; March 14th, 2014 at 05:26 PM..
 
Old March 16th, 2014, 04:58 PM
Wrox Author
 
Join Date: Oct 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Foxtrott,

You are correct. The example in that section does contain a defect that it is not reading the correct property to properly ascertain the network status.

Sorry for the mistake.

Jack Cox





Similar Threads
Thread Thread Starter Forum Replies Last Post
Lesson 21 Try It (Handling Errors) Mech_1000 BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer 3 February 21st, 2013 10:49 AM
php stopped handling errors gkman BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 4 February 19th, 2012 01:27 PM
handling all types of errors kliu9 Excel VBA 2 March 9th, 2005 01:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.