TAILIEUCHUNG - Praise for The iPhone Developer’s Cookbook 2nd phần 8

Khi mặt nạ của bạn bao gồm loại trực tuyến như là tốt (GKPeerPickerConnectionTypeOnline), bảng chọn đầu tiên yêu cầu người sử dụng loại kết nối để sử dụng trước khi di chuyển hoặc giao diện kết nối gần đó Hình 12-2 hoặc một giao diện tùy chỉnh trực tuyến là bạn phải xây dựng cho mình . | One More Thing FTPHelper 587 Listing 13-2 shows the interface for the FTPHelper class and the protocol for its delegate. It provides its functionality via simple class methods. Listing 13-2 FTPHelper protocol FTPHelperDelegate NSObject optional Successes - void receivedListing NSDictionary listing - void downloadFinished - void dataUploadFinished NSNumber bytes - void progressAtPercent NSNumber aPercent Failures - void listingFailed - void dataDownloadFailed NSString reason - void dataUploadFailed NSString reason - void credentialsMissing @end interface FTPHelper NSObject NSString urlString id FTPHelperDelegate delegate NSString uname NSString pword NSMutableArray fileListings NSString filePath property retain NSString urlString property retain id delegate property retain NSString uname property retain NSString pword property retain NSMutableArray fileListings property retain NSString filePath valid after download FTPHelper sharedInstance void download NSString anItem void upload NSString anItem void list NSString aURLString NSString textForDirectoryListing CFDictionaryRef dictionary @end 588 Chapter 13 Networking Summary This chapter introduced a wide range network supporting saw how to check for network connectivity work with keychains for secure authentication challenges upload and download data via NSURLConnection via FTP and more. Here are a few thoughts to take away with you before leaving this chapter Most of Apple s networking support is provided through very low-level C-based routines. If you can find a friendly Objective-C wrapper to simplify your programming work consider using it. The only drawback occurs when you specifically need tight networking control at the most basic level of your application. There was not space in this chapter to discuss more detailed authentication schemes for data APIs. If you need access to OAuth for example search for existing Cocoa implementations. A number are available in open source repositories and .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.