Skip to content

Commit 0dfaaf8

Browse files
committed
Add stubs for missing NSData methods
These were category methods that were not properly imported during the first pass at NSData
1 parent 125e117 commit 0dfaaf8

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Foundation/NSData.swift

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,33 @@ public class NSMutableData : NSData {
482482
}
483483
}
484484

485+
extension NSData {
486+
487+
/* Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64.
488+
*/
489+
public convenience init?(base64EncodedString base64String: String, options: NSDataBase64DecodingOptions) {
490+
NSUnimplemented()
491+
}
492+
493+
/* Create a Base-64 encoded NSString from the receiver's contents using the given options.
494+
*/
495+
public func base64EncodedStringWithOptions(options: NSDataBase64EncodingOptions) -> String {
496+
NSUnimplemented()
497+
}
498+
499+
/* Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64.
500+
*/
501+
public convenience init?(base64EncodedData base64Data: NSData, options: NSDataBase64DecodingOptions) {
502+
NSUnimplemented()
503+
}
504+
505+
/* Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options.
506+
*/
507+
public func base64EncodedDataWithOptions(options: NSDataBase64EncodingOptions) -> NSData {
508+
NSUnimplemented()
509+
}
510+
}
511+
485512
extension NSMutableData {
486513

487514
public func appendBytes(bytes: UnsafePointer<Void>, length: Int) {

0 commit comments

Comments
 (0)