Skip to content

Commit

Permalink
Make interfaces public
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrymarino committed Aug 2, 2022
1 parent ae03526 commit 82dcd69
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sources/BKBuildService/BPlistConverter.swift
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import Foundation

// Credits to: https://gist.github.com/ngbaanh/7c437d99bea75161a59f5af25be99de4
class BPlistConverter {
public class BPlistConverter {
struct PlistMimeType {
static let xmlPlist = "text/x-apple-plist+xml"
static let binaryPlist = "application/x-apple-binary-plist"
}

//// Visible Stuffs ////////////////////////////////////////////////////////
convenience init?(binaryData: Data, quiet: Bool = true) {
public convenience init?(binaryData: Data, quiet: Bool = true) {
self.init(binaryData, format: .binaryFormat_v1_0, quiet: quiet)
}

convenience init?(xml: String, quiet: Bool = true) {
public convenience init?(xml: String, quiet: Bool = true) {
guard let xmlData = xml.data(using: .utf8) else { return nil }
self.init(xmlData, format: .xmlFormat_v1_0, quiet: quiet)
}

func convertToXML() -> String? {
public func convertToXML() -> String? {
guard let xmlData = convert(to: .xmlFormat_v1_0) else { return nil }
return String.init(data: xmlData, encoding: .utf8)
}

func convertToBinary() -> Data? {
public func convertToBinary() -> Data? {
return convert(to: .binaryFormat_v1_0)
}

Expand Down

0 comments on commit 82dcd69

Please sign in to comment.