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/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..22f48fc --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) + +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. \ No newline at end of file diff --git a/LaravelEchoIOS.podspec b/LaravelEchoIOS.podspec index b8bdfe8..18aa996 100644 --- a/LaravelEchoIOS.podspec +++ b/LaravelEchoIOS.podspec @@ -9,22 +9,29 @@ Pod::Spec.new do |s| s.name = "LaravelEchoIOS" - s.version = "0.0.1" + s.version = "0.0.2" s.summary = "A wrapper for Laravel Echo in Swift" s.description = "A wrapper for Laravel Echo with Socket.io in Swift by bubbleflat.com" - s.homepage = "bubbleflat.com" + s.homepage = "https://github.com/val-bubbleflat/laravel-echo-ios" - s.license = "MIT" + s.license = { :type => "MIT", :file => "LICENSE"} s.author = { "Valentin Vivies" => "valentin@bubbleflat.com", "bubbleflat" => "contact@bubbleflat.com" } s.source = { :git => "https://github.com/val-bubbleflat/laravel-echo-ios.git", :tag => "#{s.version}" } - s.source_files = "Classes", "Classes/**/*.{h,m}" - s.exclude_files = "Classes/Exclude" + s.platforms = {:ios => "9.0"} + s.source_files = "LaravelEchoIOS/*.swift", "LaravelEchoIOS/**/*.swift" + s.exclude_files = "" - s.framework = "LaravelEchoIOS" + s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' } + + s.subspec 'Socket.IO-Client-Swift' do |socket| + socket.dependency 'Socket.IO-Client-Swift' + end + + #s.framework = "LaravelEchoIOS" end diff --git a/LaravelEchoIOS/utils/EventFormatter.swift b/LaravelEchoIOS/utils/EventFormatter.swift index 1be5907..3df836e 100644 --- a/LaravelEchoIOS/utils/EventFormatter.swift +++ b/LaravelEchoIOS/utils/EventFormatter.swift @@ -34,7 +34,7 @@ class EventFormatter { e = self.namespace + "." + event } else { let index = event.index(event.startIndex, offsetBy: 1) - return event.substring(from: index) + return String(event[index...]) } return e.replacingOccurrences(of: ".", with: "\\") } diff --git a/Podfile b/Podfile index d371825..89ff19e 100644 --- a/Podfile +++ b/Podfile @@ -1,11 +1,7 @@ -# Uncomment the next line to define a global platform for your project +use_frameworks! +inhibit_all_warnings! platform :ios, '9.0' target 'LaravelEchoIOS' do - # Comment the next line if you're not using Swift and don't want to use dynamic frameworks - use_frameworks! - - # Pods for LaravelEchoIOS - pod 'Socket.IO-Client-Swift' - + pod 'Socket.IO-Client-Swift', '~> 12.1.2' end diff --git a/Podfile.lock b/Podfile.lock index 6f63c87..dd3e7ca 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -4,12 +4,12 @@ PODS: - Starscream (2.1.1) DEPENDENCIES: - - Socket.IO-Client-Swift + - Socket.IO-Client-Swift (~> 12.1.2) SPEC CHECKSUMS: Socket.IO-Client-Swift: ba3cb1c4bf0a6ca90080406a2c22685c25ad1f60 Starscream: 142bd8ef24592d985daee9fa48c936070b85b15f -PODFILE CHECKSUM: c1b9e458278d194b05223d9d86195233ec156bf0 +PODFILE CHECKSUM: e0ccc0bd4d7a60216afe8e6eae9d860cdb93aa42 COCOAPODS: 1.3.1