From a4aeb3d436430107e66ea8f9a39f59167d4002eb Mon Sep 17 00:00:00 2001 From: Xin Hong Date: Tue, 20 Aug 2019 14:44:28 +0800 Subject: [PATCH 1/3] feature: cocoapods support --- HanziPinyin.podspec | 22 ++++++++++++++++++++++ HanziPinyin/Supporting Files/Info.plist | 2 +- HanziPinyinExample/Info.plist | 4 ++-- README.md | 10 ++++++++++ 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100755 HanziPinyin.podspec diff --git a/HanziPinyin.podspec b/HanziPinyin.podspec new file mode 100755 index 0000000..1758bd3 --- /dev/null +++ b/HanziPinyin.podspec @@ -0,0 +1,22 @@ +Pod::Spec.new do |s| + + s.name = "HanziPinyin" + s.version = "0.0.9" + s.summary = "A lightweight Swift library supporting convertion between Chinese(both Simplified and Tranditional) characters and Pinyin." + + s.homepage = "https://github.com/hongxinhope/HanziPinyin" + s.license = { :type => "MIT", :file => "LICENSE.md" } + s.author = "Xin Hong" + + s.source = { :git => "https://github.com/hongxinhope/HanziPinyin.git", :tag => s.version.to_s } + s.source_files = "HanziPinyin/*.swift" + s.resource_bundles = { + 'HanziPinyin' => ['HanziPinyin/Resources/*.txt'], + } + + s.platform = :ios, "8.0" + s.requires_arc = true + + s.frameworks = "Foundation" + +end diff --git a/HanziPinyin/Supporting Files/Info.plist b/HanziPinyin/Supporting Files/Info.plist index bc568f7..eabb8de 100644 --- a/HanziPinyin/Supporting Files/Info.plist +++ b/HanziPinyin/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.0.8 + 0.0.9 CFBundleSignature ???? CFBundleVersion diff --git a/HanziPinyinExample/Info.plist b/HanziPinyinExample/Info.plist index 44dfdc5..32a3359 100644 --- a/HanziPinyinExample/Info.plist +++ b/HanziPinyinExample/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.0.8 + 0.0.9 CFBundleSignature ???? CFBundleVersion - 8 + 9 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/README.md b/README.md index f1aa79f..f6e4c98 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,16 @@ Specify "HanziPinyin" in your ```Cartfile```: github "teambition/HanziPinyin" ``` +### CocoaPods +Specify "HanziPinyin" in your ```Podfile```: +```ruby +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '8.0' +use_frameworks! + +pod 'HanziPinyin' +``` + ### Usage #### Pinyin output format ```swift From 348204f37adcf54ae795733b5e3c53db11426c43 Mon Sep 17 00:00:00 2001 From: Xin Hong Date: Tue, 20 Aug 2019 15:14:00 +0800 Subject: [PATCH 2/3] fix: fix pod file issues --- HanziPinyin.podspec | 1 + 1 file changed, 1 insertion(+) diff --git a/HanziPinyin.podspec b/HanziPinyin.podspec index 1758bd3..c6183ff 100755 --- a/HanziPinyin.podspec +++ b/HanziPinyin.podspec @@ -18,5 +18,6 @@ Pod::Spec.new do |s| s.requires_arc = true s.frameworks = "Foundation" + s.swift_version = "5.0" end From c506569a72f9d05ff1c7dc35dfdc3ce3b98b0ccc Mon Sep 17 00:00:00 2001 From: Xin Hong Date: Tue, 20 Aug 2019 15:21:33 +0800 Subject: [PATCH 3/3] chore: update pod file --- HanziPinyin.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HanziPinyin.podspec b/HanziPinyin.podspec index c6183ff..e97ba63 100755 --- a/HanziPinyin.podspec +++ b/HanziPinyin.podspec @@ -4,11 +4,11 @@ Pod::Spec.new do |s| s.version = "0.0.9" s.summary = "A lightweight Swift library supporting convertion between Chinese(both Simplified and Tranditional) characters and Pinyin." - s.homepage = "https://github.com/hongxinhope/HanziPinyin" + s.homepage = "https://github.com/teambition/HanziPinyin" s.license = { :type => "MIT", :file => "LICENSE.md" } s.author = "Xin Hong" - s.source = { :git => "https://github.com/hongxinhope/HanziPinyin.git", :tag => s.version.to_s } + s.source = { :git => "https://github.com/teambition/HanziPinyin.git", :tag => s.version.to_s } s.source_files = "HanziPinyin/*.swift" s.resource_bundles = { 'HanziPinyin' => ['HanziPinyin/Resources/*.txt'],