Skip to content

Commit

Permalink
MOD: update readme and fix typo
Browse files Browse the repository at this point in the history
Change-Id: I9d10ad8f2f9b5876311868dd1bc3ff92aa7db829
  • Loading branch information
shangcr committed Apr 27, 2020
1 parent 995a604 commit c2afba8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,17 @@ To use YTKNetwork add the following to your Podfile

Or add this in your Cartfile:

github "yuantiku/YTKNetwork" ~> 2.0
github "yuantiku/YTKNetwork" ~> 3.0

## Requirements

| YTKNetwork Version | AFNetworking Version | Minimum iOS Target | Note |
|:------------------:|:--------------------:|:-------------------:|:-----|
| 3.x | 4.x | iOS 9 | Xcode 11+ is required. |
| 2.x | 3.x | iOS 7 | Xcode 7+ is required. |
| 1.x | 2.x | iOS 6 | n/a |

YTKNetwork is based on AFNetworking. You can find more detail about version compability at [AFNetworking README](https://github.com/AFNetworking/AFNetworking).
YTKNetwork is based on AFNetworking. You can find more detail about version compatibility at [AFNetworking README](https://github.com/AFNetworking/AFNetworking).

## Guide & Demo

Expand All @@ -77,14 +78,15 @@ YTKNetwork is based on AFNetworking. You can find more detail about version comp
* [veecci][veecciGithub]
* [tangqiaoboy][tangqiaoboyGithub]
* [skyline75489][skyline75489Github]
* [joeshang][joeshangGithub]

## Acknowledgements

* [AFNetworking]
* [AFDownloadRequestOperation]

Thanks for their great work.
 

## License

YTKNetwork is available under the MIT license. See the LICENSE file for more info.
Expand All @@ -103,3 +105,4 @@ YTKNetwork is available under the MIT license. See the LICENSE file for more inf
[maojjGithub]:https://github.com/maojj
[veecciGithub]:https://github.com/veecci
[skyline75489Github]:https://github.com/skyline75489
[joeshangGithub]:https://github.com/joeshang
8 changes: 4 additions & 4 deletions YTKNetwork/YTKBaseRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ typedef void(^YTKRequestCompletionBlock)(__kindof YTKBaseRequest *request);
/// will be called on the main queue.
@property (nonatomic, copy, nullable) YTKRequestCompletionBlock failureCompletionBlock;

/// This can be used to add several accossories object. Note if you use `addAccessory` to add acceesory
/// This can be used to add several accessories object. Note if you use `addAccessory` to add accessory
/// this array will be automatically created. Default is nil.
@property (nonatomic, strong, nullable) NSMutableArray<id<YTKRequestAccessory>> *requestAccessories;

Expand Down Expand Up @@ -259,7 +259,7 @@ typedef void(^YTKRequestCompletionBlock)(__kindof YTKBaseRequest *request);
/// @name Subclass Override
///=============================================================================

/// Called on background thread after request succeded but before switching to main thread. Note if
/// Called on background thread after request succeeded but before switching to main thread. Note if
/// cache is loaded, this method WILL be called on the main thread, just like `requestCompleteFilter`.
- (void)requestCompletePreprocessor;

Expand All @@ -284,14 +284,14 @@ typedef void(^YTKRequestCompletionBlock)(__kindof YTKBaseRequest *request);
/// Otherwise the result URL may not be correctly formed. See also `URLString:relativeToURL`
/// for more information.
///
/// Additionaly, if `requestUrl` itself is a valid URL, it will be used as the result URL and
/// Additionally, if `requestUrl` itself is a valid URL, it will be used as the result URL and
/// `baseUrl` will be ignored.
- (NSString *)requestUrl;

/// Optional CDN URL for request.
- (NSString *)cdnUrl;

/// Requset timeout interval. Default is 60s.
/// Request timeout interval. Default is 60s.
///
/// @discussion When using `resumableDownloadPath`(NSURLSessionDownloadTask), the session seems to completely ignore
/// `timeoutInterval` property of `NSURLRequest`. One effective way to set timeout would be using
Expand Down
2 changes: 1 addition & 1 deletion YTKNetwork/YTKBatchRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ NS_ASSUME_NONNULL_BEGIN
/// Tag can be used to identify batch request. Default value is 0.
@property (nonatomic) NSInteger tag;

/// This can be used to add several accossories object. Note if you use `addAccessory` to add acceesory
/// This can be used to add several accessories object. Note if you use `addAccessory` to add acceesory
/// this array will be automatically created. Default is nil.
@property (nonatomic, strong, nullable) NSMutableArray<id<YTKRequestAccessory>> *requestAccessories;

Expand Down
2 changes: 1 addition & 1 deletion YTKNetwork/YTKChainRequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef void (^YTKChainCallback)(YTKChainRequest *chainRequest, YTKBaseRequest *
/// The delegate object of the chain request. Default is nil.
@property (nonatomic, weak, nullable) id<YTKChainRequestDelegate> delegate;

/// This can be used to add several accossories object. Note if you use `addAccessory` to add acceesory
/// This can be used to add several accessories object. Note if you use `addAccessory` to add acceesory
/// this array will be automatically created. Default is nil.
@property (nonatomic, strong, nullable) NSMutableArray<id<YTKRequestAccessory>> *requestAccessories;

Expand Down
2 changes: 1 addition & 1 deletion YTKNetwork/YTKNetworkAgent.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ - (NSString *)buildRequestUrl:(YTKBaseRequest *)request {
baseUrl = [_config baseUrl];
}
}
// URL slash compability
// URL slash compatibility
NSURL *url = [NSURL URLWithString:baseUrl];

if (baseUrl.length > 0 && ![baseUrl hasSuffix:@"/"]) {
Expand Down
2 changes: 1 addition & 1 deletion YTKNetwork/YTKNetworkPrivate.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ + (BOOL)validateResumeData:(NSData *)data {
return [[NSFileManager defaultManager] fileExistsAtPath:localFilePath];
#endif
// After iOS 9 we can not actually detects if the cache file exists. This plist file has a somehow
// complicated structue. Besides, the plist structure is different between iOS 9 and iOS 10.
// complicated structure. Besides, the plist structure is different between iOS 9 and iOS 10.
// We can only assume that the plist being successfully parsed means the resume data is valid.
return YES;
}
Expand Down

0 comments on commit c2afba8

Please sign in to comment.