Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1046)

Unified Diff: webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m

Issue 1690313002: Update iOS AppRTCDemo to use the updated Objective-C API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m
diff --git a/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m
index 3ba85563d472e192c0003a1f4a65aa10bd047a22..ca0656dc988629f6b61cc144c6f01bac594aad36 100644
--- a/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m
+++ b/webrtc/examples/objc/AppRTCDemo/RTCICEServer+JSON.m
@@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
-#import "RTCICEServer+JSON.h"
+#import "RTCIceServer+JSON.h"
static NSString const *kRTCICEServerUsernameKey = @"username";
static NSString const *kRTCICEServerPasswordKey = @"password";
@@ -16,17 +16,17 @@ static NSString const *kRTCICEServerUrisKey = @"uris";
static NSString const *kRTCICEServerUrlKey = @"urls";
static NSString const *kRTCICEServerCredentialKey = @"credential";
-@implementation RTCICEServer (JSON)
+@implementation RTCIceServer (JSON)
-+ (RTCICEServer *)serverFromJSONDictionary:(NSDictionary *)dictionary {
++ (RTCIceServer *)serverFromJSONDictionary:(NSDictionary *)dictionary {
NSString *url = dictionary[kRTCICEServerUrlKey];
NSString *username = dictionary[kRTCICEServerUsernameKey];
NSString *credential = dictionary[kRTCICEServerCredentialKey];
username = username ? username : @"";
credential = credential ? credential : @"";
- return [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:url]
- username:username
- password:credential];
+ return [[RTCIceServer alloc] initWithURLStrings:@[url]
+ username:username
+ credential:credential];
}
+ (NSArray *)serversFromCEODJSONDictionary:(NSDictionary *)dictionary {
@@ -35,10 +35,10 @@ static NSString const *kRTCICEServerCredentialKey = @"credential";
NSArray *uris = dictionary[kRTCICEServerUrisKey];
hjon_webrtc 2016/02/12 17:34:56 Should one IceServer be created with all of these
NSMutableArray *servers = [NSMutableArray arrayWithCapacity:uris.count];
for (NSString *uri in uris) {
- RTCICEServer *server =
- [[RTCICEServer alloc] initWithURI:[NSURL URLWithString:uri]
- username:username
- password:password];
+ RTCIceServer *server =
+ [[RTCIceServer alloc] initWithURLStrings:@[uri]
+ username:username
+ credential:password];
[servers addObject:server];
}
return servers;

Powered by Google App Engine
This is Rietveld 408576698