diff --git a/McBopomofo.xcodeproj/project.pbxproj b/McBopomofo.xcodeproj/project.pbxproj index cf55529d..52765b70 100644 --- a/McBopomofo.xcodeproj/project.pbxproj +++ b/McBopomofo.xcodeproj/project.pbxproj @@ -49,7 +49,6 @@ 6AFF97F3253B299E007F1C49 /* OVNonModalAlertWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */; }; D427A9C125ED28CC005D43E0 /* OpenCCBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */; }; D48550A325EBE689006A204C /* OpenCC in Frameworks */ = {isa = PBXBuildFile; productRef = D48550A225EBE689006A204C /* OpenCC */; }; - E7582E69262A528E0003B31B /* OpenCCDictionary.bundle in Embed PlugIns */ = {isa = PBXBuildFile; fileRef = E7582E68262A528E0003B31B /* OpenCCDictionary.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -69,20 +68,6 @@ }; /* End PBXContainerItemProxy section */ -/* Begin PBXCopyFilesBuildPhase section */ - D48550BE25EC0D97006A204C /* Embed PlugIns */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 13; - files = ( - E7582E69262A528E0003B31B /* OpenCCDictionary.bundle in Embed PlugIns */, - ); - name = "Embed PlugIns"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ 6A0421A615FEF3F50061ED63 /* FastLM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FastLM.cpp; sourceTree = ""; }; 6A0421A715FEF3F50061ED63 /* FastLM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FastLM.h; sourceTree = ""; }; @@ -227,6 +212,7 @@ 6AFF97F1253B299E007F1C49 /* OVNonModalAlertWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OVNonModalAlertWindowController.m; sourceTree = ""; }; D427A9BF25ED28CC005D43E0 /* McBopomofo-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "McBopomofo-Bridging-Header.h"; sourceTree = ""; }; D427A9C025ED28CC005D43E0 /* OpenCCBridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenCCBridge.swift; sourceTree = ""; }; + D47412EF273BFBFB0036C336 /* OpenCCDictionary.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = OpenCCDictionary.bundle; path = "../../Library/Developer/Xcode/DerivedData/McBopomofo-czkkfmaoaedhszarcriztoynjmen/SourcePackages/checkouts/SwiftyOpenCC/OpenCCDictionary.bundle"; sourceTree = ""; }; E7582E68262A528E0003B31B /* OpenCCDictionary.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = OpenCCDictionary.bundle; path = "../../../Library/Developer/Xcode/DerivedData/McBopomofo-cqkraatnslbuvlhcaetfahesllst/SourcePackages/checkouts/SwiftyOpenCC/OpenCCDictionary.bundle"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -274,6 +260,7 @@ 6A0D4EA515FC0D2D00ABF4B3 /* Frameworks */ = { isa = PBXGroup; children = ( + D47412EF273BFBFB0036C336 /* OpenCCDictionary.bundle */, 6A0D4EA915FC0D2D00ABF4B3 /* AppKit.framework */, 6A38BC2915FC161000A8A51F /* Carbon.framework */, 6A0D4EA615FC0D2D00ABF4B3 /* Cocoa.framework */, @@ -526,7 +513,6 @@ 6A0D4E9E15FC0D2D00ABF4B3 /* Sources */, 6A0D4E9F15FC0D2D00ABF4B3 /* Frameworks */, 6A0D4EA015FC0D2D00ABF4B3 /* Resources */, - D48550BE25EC0D97006A204C /* Embed PlugIns */, ); buildRules = ( ); @@ -1146,8 +1132,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/ddddxxx/SwiftyOpenCC.git"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 1.0.1; + kind = revision; + revision = 1d8105a0f7199c90af722bff62728050c858e777; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/Source/OpenCCBridge.swift b/Source/OpenCCBridge.swift index e67cfa9b..a9c63989 100644 --- a/Source/OpenCCBridge.swift +++ b/Source/OpenCCBridge.swift @@ -8,14 +8,7 @@ class OpenCCBridge : NSObject { private var conveter: ChineseConverter? override init() { - let mainBundle = Bundle.main - let dictionaryBundleUrl = mainBundle.bundleURL - .appendingPathComponent("Contents", isDirectory: true) - .appendingPathComponent("Plugins", isDirectory: true) - .appendingPathComponent("OpenCCDictionary.bundle") - if let dictionaryBundle = Bundle(url:dictionaryBundleUrl) { - try? conveter = ChineseConverter(bundle: dictionaryBundle, option: .simplify) - } + try? conveter = ChineseConverter(options: .simplify) super.init() }