From e060f2b54f5045efd0815af330398474574c686d Mon Sep 17 00:00:00 2001 From: Benoit BRIATTE Date: Mon, 6 Nov 2017 15:14:56 +0100 Subject: [PATCH 1/4] move sources, update swift4, update spm, update readme --- .swift-version | 1 + .travis.yml | 8 ++-- LocalizationToolkit.xcodeproj/project.pbxproj | 48 +++++++++++-------- Package.swift | 14 +++++- README.md | 37 +++++++++++++- .../LocalizationToolkit.h | 0 .../String+Localization.swift | 0 7 files changed, 80 insertions(+), 28 deletions(-) create mode 100644 .swift-version rename Sources/{ => LocalizationToolkit}/LocalizationToolkit.h (100%) rename Sources/{ => LocalizationToolkit}/String+Localization.swift (100%) diff --git a/.swift-version b/.swift-version new file mode 100644 index 0000000..5186d07 --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +4.0 diff --git a/.travis.yml b/.travis.yml index 32e3357..ea92de3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,6 @@ before_install: - gem install bundler - brew update - bundle install && brew bundle - - bundle exec pod repo update --silent -script: - - bundle exec fastlane run_tests -after_success: - - bundle exec fastlane ci_framework_deploy +install: bundle exec pod install --repo-update --silent +script: bundle exec fastlane run_tests +after_success: bundle exec fastlane ci_framework_deploy diff --git a/LocalizationToolkit.xcodeproj/project.pbxproj b/LocalizationToolkit.xcodeproj/project.pbxproj index d4719b9..db8228a 100644 --- a/LocalizationToolkit.xcodeproj/project.pbxproj +++ b/LocalizationToolkit.xcodeproj/project.pbxproj @@ -16,14 +16,14 @@ A3169DBA1DE05E8300BABAFD /* LocalizationToolkit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3169DB01DE05E8300BABAFD /* LocalizationToolkit.framework */; }; A3169DF81DE0718900BABAFD /* LocalizationToolkit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3169DEF1DE0718900BABAFD /* LocalizationToolkit.framework */; }; A3169E151DE072C800BABAFD /* LocalizationToolkit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A3169E0C1DE072C700BABAFD /* LocalizationToolkit.framework */; }; - A3169E761DE083D900BABAFD /* LocalizationToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = A3169E751DE083D900BABAFD /* LocalizationToolkit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A3169E771DE083D900BABAFD /* LocalizationToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = A3169E751DE083D900BABAFD /* LocalizationToolkit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A3169E781DE083D900BABAFD /* LocalizationToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = A3169E751DE083D900BABAFD /* LocalizationToolkit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A3169E791DE083D900BABAFD /* LocalizationToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = A3169E751DE083D900BABAFD /* LocalizationToolkit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A384D7AE1F9F35A70056B13D /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A384D7AD1F9F35A70056B13D /* String+Localization.swift */; }; - A384D7AF1F9F35A70056B13D /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A384D7AD1F9F35A70056B13D /* String+Localization.swift */; }; - A384D7B01F9F35A70056B13D /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A384D7AD1F9F35A70056B13D /* String+Localization.swift */; }; - A384D7B11F9F35A70056B13D /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A384D7AD1F9F35A70056B13D /* String+Localization.swift */; }; + A370DEC61FB0A49C000FEDED /* LocalizationToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = A370DEC41FB0A49C000FEDED /* LocalizationToolkit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A370DEC71FB0A49C000FEDED /* LocalizationToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = A370DEC41FB0A49C000FEDED /* LocalizationToolkit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A370DEC81FB0A49C000FEDED /* LocalizationToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = A370DEC41FB0A49C000FEDED /* LocalizationToolkit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A370DEC91FB0A49C000FEDED /* LocalizationToolkit.h in Headers */ = {isa = PBXBuildFile; fileRef = A370DEC41FB0A49C000FEDED /* LocalizationToolkit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A370DECA1FB0A49C000FEDED /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A370DEC51FB0A49C000FEDED /* String+Localization.swift */; }; + A370DECB1FB0A49C000FEDED /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A370DEC51FB0A49C000FEDED /* String+Localization.swift */; }; + A370DECC1FB0A49C000FEDED /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A370DEC51FB0A49C000FEDED /* String+Localization.swift */; }; + A370DECD1FB0A49C000FEDED /* String+Localization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A370DEC51FB0A49C000FEDED /* String+Localization.swift */; }; A384D7BA1F9F36100056B13D /* Others.strings in Resources */ = {isa = PBXBuildFile; fileRef = A384D7BE1F9F36100056B13D /* Others.strings */; }; A384D7BB1F9F36100056B13D /* Others.strings in Resources */ = {isa = PBXBuildFile; fileRef = A384D7BE1F9F36100056B13D /* Others.strings */; }; A384D7BC1F9F36100056B13D /* Others.strings in Resources */ = {isa = PBXBuildFile; fileRef = A384D7BE1F9F36100056B13D /* Others.strings */; }; @@ -84,8 +84,8 @@ A3169DF71DE0718900BABAFD /* LocalizationToolkitTests-tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "LocalizationToolkitTests-tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; A3169E0C1DE072C700BABAFD /* LocalizationToolkit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LocalizationToolkit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A3169E141DE072C800BABAFD /* LocalizationToolkitTests-OSX.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "LocalizationToolkitTests-OSX.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - A3169E751DE083D900BABAFD /* LocalizationToolkit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizationToolkit.h; sourceTree = ""; }; - A384D7AD1F9F35A70056B13D /* String+Localization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Localization.swift"; sourceTree = ""; }; + A370DEC41FB0A49C000FEDED /* LocalizationToolkit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizationToolkit.h; sourceTree = ""; }; + A370DEC51FB0A49C000FEDED /* String+Localization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Localization.swift"; sourceTree = ""; }; A384D7BD1F9F36100056B13D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Others.strings; sourceTree = ""; }; A384D7C21F9F36130056B13D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; A38EF2C71DECF97000637484 /* LocalizationToolkitTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalizationToolkitTests.swift; sourceTree = ""; }; @@ -203,8 +203,7 @@ A3169DCA1DE0629100BABAFD /* Sources */ = { isa = PBXGroup; children = ( - A384D7AD1F9F35A70056B13D /* String+Localization.swift */, - A3169E751DE083D900BABAFD /* LocalizationToolkit.h */, + A370DEC31FB0A49C000FEDED /* LocalizationToolkit */, A3169DCC1DE0629100BABAFD /* Info.plist */, ); path = Sources; @@ -219,6 +218,15 @@ path = Tests; sourceTree = ""; }; + A370DEC31FB0A49C000FEDED /* LocalizationToolkit */ = { + isa = PBXGroup; + children = ( + A370DEC41FB0A49C000FEDED /* LocalizationToolkit.h */, + A370DEC51FB0A49C000FEDED /* String+Localization.swift */, + ); + path = LocalizationToolkit; + sourceTree = ""; + }; A38EF2C61DECF97000637484 /* LocalizationToolkitTests */ = { isa = PBXGroup; children = ( @@ -257,7 +265,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A3169E781DE083D900BABAFD /* LocalizationToolkit.h in Headers */, + A370DEC81FB0A49C000FEDED /* LocalizationToolkit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -265,7 +273,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A3169E791DE083D900BABAFD /* LocalizationToolkit.h in Headers */, + A370DEC91FB0A49C000FEDED /* LocalizationToolkit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -273,7 +281,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A3169E761DE083D900BABAFD /* LocalizationToolkit.h in Headers */, + A370DEC61FB0A49C000FEDED /* LocalizationToolkit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -281,7 +289,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A3169E771DE083D900BABAFD /* LocalizationToolkit.h in Headers */, + A370DEC71FB0A49C000FEDED /* LocalizationToolkit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -907,7 +915,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A384D7AE1F9F35A70056B13D /* String+Localization.swift in Sources */, + A370DECA1FB0A49C000FEDED /* String+Localization.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -923,7 +931,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A384D7AF1F9F35A70056B13D /* String+Localization.swift in Sources */, + A370DECB1FB0A49C000FEDED /* String+Localization.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -931,7 +939,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A384D7B01F9F35A70056B13D /* String+Localization.swift in Sources */, + A370DECC1FB0A49C000FEDED /* String+Localization.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -947,7 +955,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A384D7B11F9F35A70056B13D /* String+Localization.swift in Sources */, + A370DECD1FB0A49C000FEDED /* String+Localization.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Package.swift b/Package.swift index 3c6009f..e2a0b49 100644 --- a/Package.swift +++ b/Package.swift @@ -1,7 +1,19 @@ +// swift-tools-version:4.0 + import PackageDescription let package = Package( name: "LocalizationToolkit", - dependencies: [ + products: [ + .library(name: "LocalizationToolkit", targets: ["LocalizationToolkit"]) + ], + targets: [ + .target(name: "LocalizationToolkit"), + .testTarget( + name: "LocalizationToolkitTests", + dependencies: [ + "LocalizationToolkit" + ] + ) ] ) diff --git a/README.md b/README.md index 8cc3824..546ea3c 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ LocalizationToolkit ================================= +[![Swift Version](https://img.shields.io/badge/swift-4.0-orange.svg?style=flat)](https://developer.apple.com/swift/) [![Build Status](https://travis-ci.org/Digipolitan/localization-toolkit.svg?branch=master)](https://travis-ci.org/Digipolitan/localization-toolkit) [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/LocalizationToolkit.svg)](https://img.shields.io/cocoapods/v/LocalizationToolkit.svg) -[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Carthage Compatible](https://img.shields.io/badge/carthage-compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Swift Package Manager Compatible](https://img.shields.io/badge/swift%20package%20manager-compatible-brightgreen.svg?style=flat)](https://swift.org/package-manager/) [![Platform](https://img.shields.io/cocoapods/p/LocalizationToolkit.svg?style=flat)](http://cocoadocs.org/docsets/LocalizationToolkit) [![Twitter](https://img.shields.io/badge/twitter-@Digipolitan-blue.svg?style=flat)](http://twitter.com/Digipolitan) @@ -17,12 +19,43 @@ To install LocalizationToolkit with CocoaPods, add the following lines to your ` ```ruby source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' # or platform :osx, '10.10' if your target is OS X. +platform :ios, '9.0' use_frameworks! pod 'LocalizationToolkit' ``` +### Carthage + +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. + +You can install Carthage with [Homebrew](http://brew.sh/) using the following command: + +```bash +$ brew update +$ brew install carthage +``` + +To integrate LocalizationToolkit into your Xcode project using Carthage, specify it in your `Cartfile`: + +``` +github 'Digipolitan/localization-toolkit' ~> 1.0 +``` + +Run `carthage update` to build the framework and drag the built `LocalizationToolkit.framework` into your Xcode project. + +### Swift Package Manager + +The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. + +Once you have your Swift package set up, adding LocalizationToolkit as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`. + +```swift +dependencies: [ + .package(url: "https://github.com/Digipolitan/localization-toolkit.git", from: "1.0.0") +] +``` + ## The Basics ```swift diff --git a/Sources/LocalizationToolkit.h b/Sources/LocalizationToolkit/LocalizationToolkit.h similarity index 100% rename from Sources/LocalizationToolkit.h rename to Sources/LocalizationToolkit/LocalizationToolkit.h diff --git a/Sources/String+Localization.swift b/Sources/LocalizationToolkit/String+Localization.swift similarity index 100% rename from Sources/String+Localization.swift rename to Sources/LocalizationToolkit/String+Localization.swift From 304df3c56a695f3a61a713736115408d9f45148b Mon Sep 17 00:00:00 2001 From: Benoit BRIATTE Date: Mon, 6 Nov 2017 15:17:59 +0100 Subject: [PATCH 2/4] update pbxproj --- LocalizationToolkit.xcodeproj/project.pbxproj | 6 ------ 1 file changed, 6 deletions(-) diff --git a/LocalizationToolkit.xcodeproj/project.pbxproj b/LocalizationToolkit.xcodeproj/project.pbxproj index db8228a..f4289d5 100644 --- a/LocalizationToolkit.xcodeproj/project.pbxproj +++ b/LocalizationToolkit.xcodeproj/project.pbxproj @@ -1164,7 +1164,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 14B4363650254BEA4ECF51B4 /* Pods-Tests-LocalizationToolkitTests-iOS.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 582762VK3P; INFOPLIST_FILE = Tests/Info.plist; @@ -1178,7 +1177,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = D401AD7E775380EB96D5AEAC /* Pods-Tests-LocalizationToolkitTests-iOS.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 582762VK3P; INFOPLIST_FILE = Tests/Info.plist; @@ -1283,7 +1281,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 569132CAD4E5D36B72006659 /* Pods-Tests-LocalizationToolkitTests-tvOS.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 582762VK3P; INFOPLIST_FILE = Tests/Info.plist; @@ -1299,7 +1296,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = BA9BFE9DFC91517A89E342E9 /* Pods-Tests-LocalizationToolkitTests-tvOS.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 582762VK3P; INFOPLIST_FILE = Tests/Info.plist; @@ -1362,7 +1358,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 04CE523D6CBC26B777F22A7C /* Pods-Tests-LocalizationToolkitTests-OSX.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 582762VK3P; @@ -1379,7 +1374,6 @@ isa = XCBuildConfiguration; baseConfigurationReference = 2446A49CADD558DC4032B67F /* Pods-Tests-LocalizationToolkitTests-OSX.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; COMBINE_HIDPI_IMAGES = YES; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 582762VK3P; From 416a5d09f7709158dc5023de761a8673e86f3193 Mon Sep 17 00:00:00 2001 From: Benoit BRIATTE Date: Mon, 6 Nov 2017 15:19:13 +0100 Subject: [PATCH 3/4] Bumped release version '1.0.1' build #1 --- LocalizationToolkit.podspec | 2 +- Sources/Info.plist | 2 +- Tests/Info.plist | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LocalizationToolkit.podspec b/LocalizationToolkit.podspec index 225fab7..d554f1c 100644 --- a/LocalizationToolkit.podspec +++ b/LocalizationToolkit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "LocalizationToolkit" -s.version = "1.0.0" +s.version = "1.0.1" s.summary = "Localization helper for swift project" s.homepage = "https://github.com/Digipolitan/localization-toolkit" s.authors = "Digipolitan" diff --git a/Sources/Info.plist b/Sources/Info.plist index 22a6d94..3bc7e8e 100644 --- a/Sources/Info.plist +++ b/Sources/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.0 + 1.0.1 CFBundleVersion 1 NSPrincipalClass diff --git a/Tests/Info.plist b/Tests/Info.plist index f7ffdc0..46b8bdc 100644 --- a/Tests/Info.plist +++ b/Tests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.0.0 + 1.0.1 CFBundleVersion 1 From efdd1db4d210f705f389b81f9f4826fd5ca57a53 Mon Sep 17 00:00:00 2001 From: Benoit BRIATTE Date: Mon, 6 Nov 2017 15:20:25 +0100 Subject: [PATCH 4/4] update changelog & readme --- CHANGELOG.md | 9 +++++++++ fastlane/README.md | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9d4719..8e1442e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,3 +4,12 @@ All notable changes to this project will be documented in this file. `localization-toolkit` adheres to [Semantic Versioning](http://semver.org/). --- + +## [1.0.1](https://github.com/Digipolitan/localization-toolkit/releases/tag/v1.0.1) + +move sources +update swift4 +update spm +update readme + +--- diff --git a/fastlane/README.md b/fastlane/README.md index d07cad5..fceba89 100644 --- a/fastlane/README.md +++ b/fastlane/README.md @@ -14,7 +14,7 @@ xcode-select --install Homebrew Installer Script -Rubygems +RubyGems macOS