Download this file
| 1 | import Foundation |
| 2 | |
| 3 | public func sheetsMacString(_ key: String) -> String { |
| 4 | NSLocalizedString(key, tableName: "Mac", bundle: SheetsResources.bundle, comment: "") |
| 5 | } |
| 6 | |
| 7 | // SwiftPM's generated lookup checks the executable bundle root and then an |
| 8 | // absolute build-machine path. Installed macOS apps put resources in Contents/Resources. |
| 9 | enum SheetsResources { |
| 10 | static let bundle: Bundle = { |
| 11 | if let url = Bundle.main.url(forResource: "SheetsNative_SheetsKit", withExtension: "bundle"), |
| 12 | let bundle = Bundle(url: url) { return bundle } |
| 13 | return .module |
| 14 | }() |
| 15 | } |
| 16 | |