Commit fcb9459bc306d4996f023fe96b8f8b373abbcb65

Authored by yinqiaojuan
1 parent 0caff895

0.1.16修改提示

CNLiveUploadManager.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveUploadManager' 10 s.name = 'CNLiveUploadManager'
11 - s.version = '0.1.15' 11 + s.version = '0.1.16'
12 s.summary = '压缩上传,组件化中加入新参数加入outPath,不在直接取' 12 s.summary = '压缩上传,组件化中加入新参数加入outPath,不在直接取'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
@@ -41,6 +41,7 @@ Pod::Spec.new do |s| @@ -41,6 +41,7 @@ Pod::Spec.new do |s|
41 s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => 'CNLiveTripartiteManagement/PLShortVideoKit' } 41 s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => 'CNLiveTripartiteManagement/PLShortVideoKit' }
42 42
43 s.frameworks = 'UIKit' 43 s.frameworks = 'UIKit'
  44 + s.dependency 'CNLiveTripartiteManagement/AFNetworking'
44 s.dependency 'CNLiveRequestBastKit' 45 s.dependency 'CNLiveRequestBastKit'
45 s.dependency 'CNLiveTripartiteManagement/MJExtension' 46 s.dependency 'CNLiveTripartiteManagement/MJExtension'
46 s.dependency 'CNLiveTripartiteManagement/YYKit' 47 s.dependency 'CNLiveTripartiteManagement/YYKit'
@@ -50,6 +51,7 @@ Pod::Spec.new do |s| @@ -50,6 +51,7 @@ Pod::Spec.new do |s|
50 s.dependency 'CNLiveBusinessTools' 51 s.dependency 'CNLiveBusinessTools'
51 s.dependency 'CNLiveBaseTools' 52 s.dependency 'CNLiveBaseTools'
52 53
  54 +
53 55
54 56
55 57
CNLiveUploadManager/Classes/CNLiveUploadManager.m
@@ -1649,9 +1649,16 @@ static CNLiveUploadManager *_uploadManager; @@ -1649,9 +1649,16 @@ static CNLiveUploadManager *_uploadManager;
1649 1649
1650 } else {//请求token失败 1650 } else {//请求token失败
1651 1651
1652 - NSError *error = [NSError errorWithDomain:@"请求token失败" code:100 userInfo:@{NSLocalizedDescriptionKey:@"请求token失败,请重新获取"}];  
1653 - !failure ? : failure(nil,error);  
1654 - return; 1652 + NSInteger code = error.code;
  1653 + NSString * errorStr = error.localizedDescription;
  1654 + NSError *error;
  1655 + if (code == - 1001 || code == -1009) {
  1656 + error = [NSError errorWithDomain:@"网络连接错误,请检查您的网络" code:code userInfo:@{NSLocalizedDescriptionKey:@"网络连接错误,请检查您的网络"}];
  1657 + }else {
  1658 + error = [NSError errorWithDomain:errorStr code:code userInfo:@{NSLocalizedDescriptionKey:errorStr}];
  1659 + }
  1660 + !failure ? : failure(nil,error);
  1661 + return;
1655 } 1662 }
1656 1663
1657 }]; 1664 }];
@@ -1680,9 +1687,16 @@ static CNLiveUploadManager *_uploadManager; @@ -1680,9 +1687,16 @@ static CNLiveUploadManager *_uploadManager;
1680 1687
1681 } else {//请求token失败 1688 } else {//请求token失败
1682 1689
1683 - NSError *error = [NSError errorWithDomain:@"请求token失败" code:100 userInfo:@{NSLocalizedDescriptionKey:@"请求token失败,请重新获取"}];  
1684 - !failure ? : failure(nil,error);  
1685 - return; 1690 + NSInteger code = error.code;
  1691 + NSString * errorStr = error.localizedDescription;
  1692 + NSError *error;
  1693 + if (code == - 1001 || code == -1009) {
  1694 + error = [NSError errorWithDomain:@"网络连接错误,请检查您的网络" code:code userInfo:@{NSLocalizedDescriptionKey:@"网络连接错误,请检查您的网络"}];
  1695 + }else {
  1696 + error = [NSError errorWithDomain:errorStr code:code userInfo:@{NSLocalizedDescriptionKey:errorStr}];
  1697 + }
  1698 + !failure ? : failure(nil,error);
  1699 + return;
1686 } 1700 }
1687 1701
1688 }]; 1702 }];
@@ -1712,8 +1726,16 @@ static CNLiveUploadManager *_uploadManager; @@ -1712,8 +1726,16 @@ static CNLiveUploadManager *_uploadManager;
1712 } else {//请求token失败 1726 } else {//请求token失败
1713 1727
1714 1728
1715 - !failure ? : failure(nil,error);  
1716 - return; 1729 + NSInteger code = error.code;
  1730 + NSString * errorStr = error.localizedDescription;
  1731 + NSError *error;
  1732 + if (code == - 1001 || code == -1009) {
  1733 + error = [NSError errorWithDomain:@"网络连接错误,请检查您的网络" code:code userInfo:@{NSLocalizedDescriptionKey:@"网络连接错误,请检查您的网络"}];
  1734 + }else {
  1735 + error = [NSError errorWithDomain:errorStr code:code userInfo:@{NSLocalizedDescriptionKey:errorStr}];
  1736 + }
  1737 + !failure ? : failure(nil,error);
  1738 + return;
1717 } 1739 }
1718 1740
1719 }]; 1741 }];
@@ -1741,9 +1763,16 @@ static CNLiveUploadManager *_uploadManager; @@ -1741,9 +1763,16 @@ static CNLiveUploadManager *_uploadManager;
1741 1763
1742 } else {//请求token失败 1764 } else {//请求token失败
1743 1765
1744 - NSError *error = [NSError errorWithDomain:@"请求token失败" code:100 userInfo:@{NSLocalizedDescriptionKey:@"请求token失败,请重新获取"}];  
1745 - !failure ? : failure(nil,error);  
1746 - return; 1766 + NSInteger code = error.code;
  1767 + NSString * errorStr = error.localizedDescription;
  1768 + NSError *error;
  1769 + if (code == - 1001 || code == -1009) {
  1770 + error = [NSError errorWithDomain:@"网络连接错误,请检查您的网络" code:code userInfo:@{NSLocalizedDescriptionKey:@"网络连接错误,请检查您的网络"}];
  1771 + }else {
  1772 + error = [NSError errorWithDomain:errorStr code:code userInfo:@{NSLocalizedDescriptionKey:errorStr}];
  1773 + }
  1774 + !failure ? : failure(nil,error);
  1775 + return;
1747 } 1776 }
1748 1777
1749 }]; 1778 }];
@@ -1771,10 +1800,16 @@ static CNLiveUploadManager *_uploadManager; @@ -1771,10 +1800,16 @@ static CNLiveUploadManager *_uploadManager;
1771 [[CNLiveUploadManager shareInsance] qnUploadVideoLimitWithToken:token asset:asset limitType:limitType outputPath:outputPath progress:progress success:success failure:failure]; 1800 [[CNLiveUploadManager shareInsance] qnUploadVideoLimitWithToken:token asset:asset limitType:limitType outputPath:outputPath progress:progress success:success failure:failure];
1772 1801
1773 } else {//请求token失败 1802 } else {//请求token失败
1774 -  
1775 - NSError *error = [NSError errorWithDomain:@"请求token失败" code:100 userInfo:@{NSLocalizedDescriptionKey:@"请求token失败,请重新获取"}];  
1776 - !failure ? : failure(nil,error);  
1777 - return; 1803 + NSInteger code = error.code;
  1804 + NSString * errorStr = error.localizedDescription;
  1805 + NSError *error;
  1806 + if (code == - 1001 || code == -1009) {
  1807 + error = [NSError errorWithDomain:@"网络连接错误,请检查您的网络" code:code userInfo:@{NSLocalizedDescriptionKey:@"网络连接错误,请检查您的网络"}];
  1808 + }else {
  1809 + error = [NSError errorWithDomain:errorStr code:code userInfo:@{NSLocalizedDescriptionKey:errorStr}];
  1810 + }
  1811 + !failure ? : failure(nil,error);
  1812 + return;
1778 } 1813 }
1779 1814
1780 }]; 1815 }];
@@ -1800,9 +1835,16 @@ static CNLiveUploadManager *_uploadManager; @@ -1800,9 +1835,16 @@ static CNLiveUploadManager *_uploadManager;
1800 [[CNLiveUploadManager shareInsance] uploadRequestPLShortVideoLimitWithToken:token asset:asset outputPath:outputPath limitType:limitType transcode: transcode progress:progress success:success failure:failure]; 1835 [[CNLiveUploadManager shareInsance] uploadRequestPLShortVideoLimitWithToken:token asset:asset outputPath:outputPath limitType:limitType transcode: transcode progress:progress success:success failure:failure];
1801 1836
1802 } else {//请求token失败 1837 } else {//请求token失败
1803 - NSError *error = [NSError errorWithDomain:@"请求token失败" code:100 userInfo:@{NSLocalizedDescriptionKey:@"请求token失败,请重新获取"}];  
1804 - !failure ? : failure(nil,error);  
1805 - return; 1838 + NSInteger code = error.code;
  1839 + NSString * errorStr = error.localizedDescription;
  1840 + NSError *error;
  1841 + if (code == - 1001 || code == -1009) {
  1842 + error = [NSError errorWithDomain:@"网络连接错误,请检查您的网络" code:code userInfo:@{NSLocalizedDescriptionKey:@"网络连接错误,请检查您的网络"}];
  1843 + }else {
  1844 + error = [NSError errorWithDomain:errorStr code:code userInfo:@{NSLocalizedDescriptionKey:errorStr}];
  1845 + }
  1846 + !failure ? : failure(nil,error);
  1847 + return;
1806 } 1848 }
1807 1849
1808 }]; 1850 }];
Example/CNLiveUploadManager.xcodeproj/project.pbxproj
@@ -361,6 +361,7 @@ @@ -361,6 +361,7 @@
361 "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework", 361 "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework",
362 "${BUILT_PRODUCTS_DIR}/HappyDNS/HappyDNS.framework", 362 "${BUILT_PRODUCTS_DIR}/HappyDNS/HappyDNS.framework",
363 "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", 363 "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework",
  364 + "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework",
364 "${BUILT_PRODUCTS_DIR}/Qiniu/Qiniu.framework", 365 "${BUILT_PRODUCTS_DIR}/Qiniu/Qiniu.framework",
365 "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", 366 "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
366 "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework", 367 "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework",
@@ -379,6 +380,7 @@ @@ -379,6 +380,7 @@
379 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework", 380 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework",
380 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HappyDNS.framework", 381 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HappyDNS.framework",
381 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", 382 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework",
  383 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework",
382 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Qiniu.framework", 384 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Qiniu.framework",
383 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", 385 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
384 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework", 386 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework",