Code Monkey home page Code Monkey logo

swiftyopencc's Introduction

Swifty Open Chinese Convert

Github CI Status platforms codebeat badge

Swift port of Open Chinese Convert

Requirements

  • macOS 10.10+ / iOS 8.0+ / tvOS 9.0+ / watchOS 2.0+
  • Swift 5.0

Usage

Quick Start

import OpenCC

let str = "鼠标里面的硅二极管坏了,导致光标分辨率降低。"
let converter = try! ChineseConverter(option: [.traditionalize, .twStandard, .twIdiom])
converter.convert(str)
// 滑鼠裡面的矽二極體壞了,導致游標解析度降低。

Documentation

Github Pages (100% Documented)

License

SwiftyOpenCC is available under the MIT license. See the LICENSE file.

swiftyopencc's People

Contributors

ddddxxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

swiftyopencc's Issues

在iphone5上面會crash

mach_vm_map(size=3852439552) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

只有在只有比較低memory的實體機上面會crash,模擬器看不出來的
實際測試iphone5無法執行ChineseConverter,因為一次配置過大記憶體導致當機。

Archiving with XCode 10.2.1

When archiving with XCode 10.2.1, the following errors comes out
ailed to write to /Users/myrickchow/Library/Developer/Xcode/DerivedData/read4u-flqluiivbuzymtclwmomwnukiqcm/Build/Intermediates.noindex/ArchiveIntermediates/read4u/BuildProductsPath/Release-iphoneos/AF097B9D-58CD-3C37-817C-6B08CF709CEA.bcsymbolmap: Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied" Command PhaseScriptExecution failed with a nonzero exit code

My Cartfile is
github "ddddxxx/SwiftyOpenCC" "v1.0.0"

Thank you for your help

Support Xcode 10.2

/usr/bin/xcrun xcodebuild -workspace /private/var/www/xcz-ios/Carthage/Checkouts/SwiftyOpenCC/OpenCC.xcworkspace -scheme OpenCC\ macOS -configuration Release -derivedDataPath /Users/hustlzp/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/SwiftyOpenCC/v0.2.2 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/rr/xgdjh1jd35bdrqzf5xd6c8r00000gn/T/SwiftyOpenCC SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /var/www/xcz-ios/Carthage/Checkouts/SwiftyOpenCC)User defaults from command line:
IDEArchivePathOverride = /var/folders/rr/xgdjh1jd35bdrqzf5xd6c8r00000gn/T/SwiftyOpenCC
IDEDerivedDataPathOverride = /Users/hustlzp/Library/Caches/org.carthage.CarthageKit/DerivedData/10.2_10E125/SwiftyOpenCC/v0.2.2

Build settings from command line:
CARTHAGE = YES
CLANG_ENABLE_CODE_COVERAGE = NO
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS = NO
ONLY_ACTIVE_ARCH = NO
SKIP_INSTALL = YES
STRIP_INSTALLED_PRODUCT = NO

--- xcodebuild: WARNING: Unable to open project file '/var/www/xcz-ios/Carthage/Checkouts/SwiftyOpenCC/OpenCC.playground' in workspace '/private/var/www/xcz-ios/Carthage/Checkouts/SwiftyOpenCC/OpenCC.xcworkspace'.
note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: SWIFT_VERSION '3.0' is unsupported, supported versions are: 4.0, 4.2, 5.0. (in target 'OpenCC macOS')

** ARCHIVE FAILED **

在真机上有错误发生

malloc: *** mach_vm_map(size=3852439552) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

模拟器上挺好使,但在真机上运行,当ChineseConverter初始化时就出现上述错误:
let converter = ChineseConverter(option: [.traditionalize, .TWStandard, .TWIdiom])

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.