Skip to content

Commit 7236f1f

Browse files
author
garenwang
committed
demo修复
1 parent 21c00f4 commit 7236f1f

File tree

4 files changed

+15
-21
lines changed

4 files changed

+15
-21
lines changed

Podfile.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
PODS:
2-
- QCloudCore (6.0.1):
3-
- QCloudCore/Default (= 6.0.1)
4-
- QCloudCore/Default (6.0.1)
5-
- QCloudCOSXML (6.0.1):
6-
- QCloudCOSXML/Default (= 6.0.1)
7-
- QCloudCOSXML/Default (6.0.1):
8-
- QCloudCore (= 6.0.1)
2+
- QCloudCore (6.0.9):
3+
- QCloudCore/Default (= 6.0.9)
4+
- QCloudCore/Default (6.0.9)
5+
- QCloudCOSXML (6.0.9):
6+
- QCloudCOSXML/Default (= 6.0.9)
7+
- QCloudCOSXML/Default (6.0.9):
8+
- QCloudCore (= 6.0.9)
99

1010
DEPENDENCIES:
1111
- QCloudCore (from `.`)
@@ -18,9 +18,9 @@ EXTERNAL SOURCES:
1818
:path: "."
1919

2020
SPEC CHECKSUMS:
21-
QCloudCore: 032304013ef6d8deddfa0b88345442024a225aa8
22-
QCloudCOSXML: 26f0f5d44a5ce88fa53f3443c04613be03710265
21+
QCloudCore: e02371dbd5990ae86892786aad0155125015cee1
22+
QCloudCOSXML: b09992ac9d0fb328ee55d314ca9133d1dd360b56
2323

2424
PODFILE CHECKSUM: 384b99448c6c2fa2f931b43a3eacbd13f1ec5751
2525

26-
COCOAPODS: 1.10.1
26+
COCOAPODS: 1.11.3
Binary file not shown.

QCloudCOSXMLDemo/AppDelegate.m

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
8181
[self setupCOSXMLShareService];
8282
self.credentialFenceQueue = [QCloudCredentailFenceQueue new];
8383
self.credentialFenceQueue.delegate = self;
84-
85-
[QCloudCOSXMLConfiguration sharedInstance].currentRegion = kRegion;
86-
QCloudServiceConfiguration* configuration = [[QCloudCOSXMLService defaultCOSXML].configuration copy];
87-
configuration.endpoint.regionName = kRegion;
88-
[QCloudCOSTransferMangerService registerCOSTransferMangerWithConfiguration:configuration withKey:kRegion];
89-
90-
[QCloudCOSXMLService registerCOSXMLWithConfiguration:configuration withKey:kRegion];
91-
84+
9285
QCloudMyBucketListCtor * bucketList = [[QCloudMyBucketListCtor alloc]init];
9386
_window = [[UIWindow alloc]initWithFrame:SCREEN_FRAME];
9487
[_window makeKeyAndVisible];
9588
UINavigationController * navRoot = [[UINavigationController alloc]initWithRootViewController:bucketList];
9689
_window.rootViewController = navRoot;
97-
90+
9891
return YES;
9992
}
10093
//后台上传要实现该方法

QCloudCOSXMLDemo/QCloudMyBucketListCtor.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
111111
QCloudServiceConfiguration* configuration = [[QCloudCOSXMLService defaultCOSXML].configuration copy];
112112
configuration.endpoint.regionName = regionName;
113113
[QCloudCOSTransferMangerService registerCOSTransferMangerWithConfiguration:configuration withKey:regionName];
114-
115-
[QCloudCOSXMLService registerCOSXMLWithConfiguration:configuration withKey:regionName];
114+
if ([QCloudCOSXMLService hasServiceForKey:regionName]) {
115+
[QCloudCOSXMLService registerCOSXMLWithConfiguration:configuration withKey:regionName];
116+
}
116117
[self.navigationController pushViewController:[QCloudFileListCtor new] animated:YES];
117118

118119
}

0 commit comments

Comments
 (0)