Skip to content

Commit

Permalink
More code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
markemer committed Dec 17, 2024
1 parent 267d623 commit a782f5b
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions ios/Capacitor/Capacitor/JSExport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,28 +152,6 @@ internal class JSExport {
return lines.joined(separator: "\n")
}

// static func exportCordovaPluginsJS(userContentController: WKUserContentController) throws {
// if let pluginsJSFolder = Bundle.main.url(forResource: "public/plugins", withExtension: nil) {
// self.injectFilesForFolder(folder: pluginsJSFolder, userContentController: userContentController)
// }
// }

// static func injectFilesForFolder(folder: URL, userContentController: WKUserContentController) {
// let fileManager = FileManager.default
// do {
// let fileURLs = try fileManager.contentsOfDirectory(at: folder, includingPropertiesForKeys: nil, options: [])
// for fileURL in fileURLs {
// if fileURL.hasDirectoryPath {
// injectFilesForFolder(folder: fileURL, userContentController: userContentController)
// } else {
// try self.injectFile(fileURL: fileURL, userContentController: userContentController)
// }
// }
// } catch {
// CAPLog.print("Error while enumerating files")
// }
// }

static func injectFile(fileURL: URL, userContentController: WKUserContentController) throws {
do {
let data = try String(contentsOf: fileURL, encoding: .utf8)
Expand Down

0 comments on commit a782f5b

Please sign in to comment.