From 81fb46838325c213c956cadb62f4946e1b3360c7 Mon Sep 17 00:00:00 2001 From: Adam Wienconek Date: Mon, 7 Dec 2020 11:42:36 +0100 Subject: [PATCH 1/3] Updated to Swift 5, create SPM package --- .../ESTMusicIndicatorViewState.swift | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Sources/ESTMusicIndicator/ESTMusicIndicatorViewState.swift diff --git a/Sources/ESTMusicIndicator/ESTMusicIndicatorViewState.swift b/Sources/ESTMusicIndicator/ESTMusicIndicatorViewState.swift new file mode 100644 index 0000000..edadac4 --- /dev/null +++ b/Sources/ESTMusicIndicator/ESTMusicIndicatorViewState.swift @@ -0,0 +1,50 @@ +// +// ESTMusicIndicatorView.swift +// ESTMusicIndicator +// +// Created by Aufree on 12/6/15. +// Copyright © 2015 The EST Group. All rights reserved. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +import Foundation + +/** + Values for the [state]([ESTMusicIndicatorView state]) property. + */ +public enum ESTMusicIndicatorViewState: Int { + /** + Stopped state of an indicator view. + In this state, if an indicator's [hidesWhenStopped]([ESTMusicIndicatorView hidesWhenStopped]) is `YES`, the indicator becomes hidden. + Or if an indicator's [hidesWhenStopped]([ESTMusicIndicatorView hidesWhenStopped]) is `NO`, the indicator shows idle bars. + */ + case stopped + + /** + Playing state of an indicator view. + In this state, an indicator shows oscillatory animated bars. + */ + case playing + + /** + Paused state of an indicator view. + In this state, an indicator shows idle bars. + */ + case paused +} From 3c8c8f7e053505f75bc2d691997742eb9829ff62 Mon Sep 17 00:00:00 2001 From: Adam Wienconek Date: Mon, 7 Dec 2020 11:44:29 +0100 Subject: [PATCH 2/3] Updated SPM Package --- .DS_Store | Bin 0 -> 6148 bytes .gitignore | 2 +- .../contents.xcworkspacedata | 7 + ESTMusicIndicator.podspec | 8 +- Example/.DS_Store | Bin 0 -> 6148 bytes .../project.pbxproj | 314 +++--------------- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + Example/ESTMusicIndicator/AppDelegate.swift | 1 - .../Base.lproj/LaunchScreen.storyboard | 12 +- Example/ESTMusicIndicator/Package.swift | 28 ++ .../ESTMusicIndicatorTests.swift | 36 -- Example/ESTMusicIndicatorTests/Info.plist | 24 -- .../ESTMusicIndicatorUITests.swift | 36 -- Example/ESTMusicIndicatorUITests/Info.plist | 24 -- Package.swift | 28 ++ Sources/.DS_Store | Bin 0 -> 6148 bytes .../ESTMusicIndicatorContentView.swift | 23 +- .../ESTMusicIndicatorView.swift | 84 ++--- 18 files changed, 165 insertions(+), 470 deletions(-) create mode 100644 .DS_Store create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 Example/.DS_Store create mode 100644 Example/ESTMusicIndicator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Example/ESTMusicIndicator/Package.swift delete mode 100644 Example/ESTMusicIndicatorTests/ESTMusicIndicatorTests.swift delete mode 100644 Example/ESTMusicIndicatorTests/Info.plist delete mode 100644 Example/ESTMusicIndicatorUITests/ESTMusicIndicatorUITests.swift delete mode 100644 Example/ESTMusicIndicatorUITests/Info.plist create mode 100644 Package.swift create mode 100644 Sources/.DS_Store rename {Classes => Sources/ESTMusicIndicator}/ESTMusicIndicatorContentView.swift (96%) rename {Classes => Sources/ESTMusicIndicator}/ESTMusicIndicatorView.swift (75%) diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..e5383d644ada8485d0e49ced034afd2195ce329b GIT binary patch literal 6148 zcmeHKyN=U96uq+>h!eCT1=22}af3t=p(H$(1}U3Oib#MEUO@q9*N&}?CC6hW4go?? z8cIF@3VK?80Evz-pyMYfDd5Z_XzlPSRtQCNr8{RlbMAHKjAtf8M65OT>qHeIvfu&> zWfVU#(Jy?-)^y7TkjWfl8c|3+>QcPKHVsArqrm^BfLOa{sY4F!(M>wKeto%;T}p}5 zkSvrk6sdm zqqJ80#MageCr%bEt8A4w$`74BpE#+Tjz=wbcwao-cGJG6>wBC>KkBY`Hw-5Gl{33M zPTepLhB7$x15h5^3uB*8T6`S)Bbmoh9hOzHO8b?q>GaCAM%8ZAYO|_6-QKQM?aP<0 z&SoWR^L+h!_h9hk>Gav``71eWV%P?yoz}R3*Qn$~dE^Y^h{uQM5m80Dfo*da!rj7T zbaIlt0OP2@CAtIV4z)399Zb%E{9MGBTtpFBIVO0B?Kz-PmQ7#5{+yY>410B_Bs0wD zuJz`trf_o0-0$F!^@mw+AR!8pRG%S6KAarKY$ApytzUdf+ literal 0 HcmV?d00001 diff --git a/.gitignore b/.gitignore index cf92729..f398140 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,4 @@ Carthage/Build # https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md fastlane/report.xml -fastlane/screenshots \ No newline at end of file +fastlane/screenshots diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ESTMusicIndicator.podspec b/ESTMusicIndicator.podspec index 092fd9c..17630ba 100644 --- a/ESTMusicIndicator.podspec +++ b/ESTMusicIndicator.podspec @@ -1,8 +1,8 @@ Pod::Spec.new do |s| s.name = "ESTMusicIndicator" - s.version = "0.2.0" - s.swift_version = "4.0" + s.version = "0.3.0" + s.swift_version = "5.0" s.summary = "Cool Animated music indicator view written in Swift." s.description = <<-DESC @@ -16,10 +16,10 @@ Pod::Spec.new do |s| s.license = "MIT" s.author = { "Aufree" => "freedomlijinfa@gmail.com" } - s.platform = :ios, "8.0" + s.platform = :ios, "10.0" s.source = { :git => "https://github.com/Aufree/ESTMusicIndicator.git", :tag => s.version } - s.source_files = "Classes/**/*.swift" + s.source_files = "Sources/ESTMusicIndicator/**/*.swift" s.frameworks = 'QuartzCore' end diff --git a/Example/.DS_Store b/Example/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..883f23a49accc6b5e7234017397f2c16d34b6a75 GIT binary patch literal 6148 zcmeHKUrQT75TA{)-J}##C@A!0UkZH)<rkGQ)P&TMc-xk9`)0tC_V2|)Mo0l4<1U{l+DM@&%uEn24z?dicXk+qT2hgJcyjV zrFD8^htY?mH{5AGUDH_^CRr~x!Aaahm+g;97VBY053;y0c>>!ZWkWW0S_`Am>$gj7 zwd8r@wi>Ohcy0A+`OSFTkn_(MSG&81C#R#c@%e=r90*+8M&=y;fUjswLEcf2XQ|Hi z(VH?oyPs}&3CH*wX^5c*eaO-J^3xQ2!%VlQ0IMv_05iZ0Ov`}V*5spU1K5ulU5aRd!Y#PbA@TW!(#zw!I`|J@+2F$2uNKgEEkuLtWL z9FjX*Ck97ntwP;JB_Y4c;!Ow|<|syAI*J!ijbOVX1JQR_S;Q6;z6cl^xL^kUC + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/ESTMusicIndicator/AppDelegate.swift b/Example/ESTMusicIndicator/AppDelegate.swift index 98a7950..b6bef7e 100644 --- a/Example/ESTMusicIndicator/AppDelegate.swift +++ b/Example/ESTMusicIndicator/AppDelegate.swift @@ -13,7 +13,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. return true diff --git a/Example/ESTMusicIndicator/Base.lproj/LaunchScreen.storyboard b/Example/ESTMusicIndicator/Base.lproj/LaunchScreen.storyboard index 1042eb6..9c6a580 100644 --- a/Example/ESTMusicIndicator/Base.lproj/LaunchScreen.storyboard +++ b/Example/ESTMusicIndicator/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -14,9 +16,9 @@ - + - + diff --git a/Example/ESTMusicIndicator/Package.swift b/Example/ESTMusicIndicator/Package.swift new file mode 100644 index 0000000..6776917 --- /dev/null +++ b/Example/ESTMusicIndicator/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "ESTMusicIndicator", + platforms: [ + .iOS(.v10) + ], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "ESTMusicIndicator", + targets: ["ESTMusicIndicator"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "ESTMusicIndicator", + dependencies: []) + ] +) diff --git a/Example/ESTMusicIndicatorTests/ESTMusicIndicatorTests.swift b/Example/ESTMusicIndicatorTests/ESTMusicIndicatorTests.swift deleted file mode 100644 index 4889d2c..0000000 --- a/Example/ESTMusicIndicatorTests/ESTMusicIndicatorTests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// ESTMusicIndicatorTests.swift -// ESTMusicIndicatorTests -// -// Created by Aufree on 12/6/15. -// Copyright © 2015 The EST Group. All rights reserved. -// - -import XCTest -@testable import ESTMusicIndicator - -class ESTMusicIndicatorTests: XCTestCase { - - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - - func testPerformanceExample() { - // This is an example of a performance test case. - self.measure { - // Put the code you want to measure the time of here. - } - } - -} diff --git a/Example/ESTMusicIndicatorTests/Info.plist b/Example/ESTMusicIndicatorTests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/Example/ESTMusicIndicatorTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Example/ESTMusicIndicatorUITests/ESTMusicIndicatorUITests.swift b/Example/ESTMusicIndicatorUITests/ESTMusicIndicatorUITests.swift deleted file mode 100644 index 92d41ee..0000000 --- a/Example/ESTMusicIndicatorUITests/ESTMusicIndicatorUITests.swift +++ /dev/null @@ -1,36 +0,0 @@ -// -// ESTMusicIndicatorUITests.swift -// ESTMusicIndicatorUITests -// -// Created by Aufree on 12/6/15. -// Copyright © 2015 The EST Group. All rights reserved. -// - -import XCTest - -class ESTMusicIndicatorUITests: XCTestCase { - - override func setUp() { - super.setUp() - - // Put setup code here. This method is called before the invocation of each test method in the class. - - // In UI tests it is usually best to stop immediately when a failure occurs. - continueAfterFailure = false - // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. - XCUIApplication().launch() - - // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } - - func testExample() { - // Use recording to get started writing UI tests. - // Use XCTAssert and related functions to verify your tests produce the correct results. - } - -} diff --git a/Example/ESTMusicIndicatorUITests/Info.plist b/Example/ESTMusicIndicatorUITests/Info.plist deleted file mode 100644 index ba72822..0000000 --- a/Example/ESTMusicIndicatorUITests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..8dc5506 --- /dev/null +++ b/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:5.1 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "ESTMusicIndicator", + platforms: [ + .iOS(.v10) + ], + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "ESTMusicIndicator", + targets: ["ESTMusicIndicator"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "ESTMusicIndicator", + dependencies: []) + ] +) diff --git a/Sources/.DS_Store b/Sources/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f5ad0fe39ba7fda3431931db6d959859fb7978eb GIT binary patch literal 6148 zcmeHKK~LK-6n=&>+)mRvX%a|WeA%ssl(Ch|q^v849*~fNwga0WX(}2ijjJZ5Kv$H% zv7L9>uRw5vKfupn&-N<HM{ zWqcR=!N;gQ+%LcUAd}3Gl6GH{qp*!BpFc%OD2H`9NWxV2fTC&@l&}L(GWurlY@!G}lkG1p5_p>s?M>2bz$BgvI>nE{H4smo7rS47DhV!Zb zeJuWTUI%E$Wfiar{4)jA{vgm5x`eqwy>(!ruK