Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

swiftlint #7

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ env:

jobs:
build:
runs-on: self-hosted
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: swift build -v
test:
runs-on: self-hosted
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
- name: Test
Expand Down
10 changes: 10 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
disabled_rules:
- cyclomatic_complexity
included:
- Sources
- Tests
#excluded:
# - "the place where i committed many coding sins"
line_length: 200
#reporter: "json"
#allow_zero_lintable_files: true
5 changes: 2 additions & 3 deletions Example/HPRTMPExample/Shared/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
import SwiftUI

struct ContentView: View {

let rtmpService = RTMPService()



var body: some View {
Text("Hello, world!")
.padding().onAppear(perform: {
Expand Down
8 changes: 4 additions & 4 deletions Example/HPRTMPExample/Shared/RTMPService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ import Foundation
import HPRTMP

class RTMPService {

private var session = RTMPPublishSession()

init() {
// let url = URL(string: "rtmp://192.168.11.23/live")!
// let streamKey = "hello"
// let port = 1935
// socket.connect(streamURL: url, streamKey: streamKey, port: port)
}

func run() {
let publishConfig = PublishConfigure(
width: 640,
Expand All @@ -30,7 +30,7 @@ class RTMPService {
framerate: 30,
videoframerate: 30
)

session.publish(url: "rtmp://192.168.11.48/live/haha", configure: publishConfig)
}
}
2 changes: 1 addition & 1 deletion HPRTMP.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/huiping192/HPRTMP'
s.license = 'MIT'
s.author = { 'huiping192' => '[email protected]' }
s.platforms = { :ios => '14.0', :osx => '11' }
s.platforms = { :ios => '14.0', :osx => '12' }
s.source = { :git => 'https://github.com/huiping192/HPRTMP.git', :tag => s.version.to_s }
s.swift_version = '5.5'

Expand Down
86 changes: 86 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"pins" : [
{
"identity" : "collectionconcurrencykit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/JohnSundell/CollectionConcurrencyKit.git",
"state" : {
"revision" : "b4f23e24b5a1bff301efc5e70871083ca029ff95",
"version" : "0.2.0"
}
},
{
"identity" : "cryptoswift",
"kind" : "remoteSourceControl",
"location" : "https://github.com/krzyzanowskim/CryptoSwift.git",
"state" : {
"revision" : "32f641cf24fc7abc1c591a2025e9f2f572648b0f",
"version" : "1.7.2"
}
},
{
"identity" : "sourcekitten",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jpsim/SourceKitten.git",
"state" : {
"revision" : "b6dc09ee51dfb0c66e042d2328c017483a1a5d56",
"version" : "0.34.1"
}
},
{
"identity" : "swift-argument-parser",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-argument-parser.git",
"state" : {
"revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a",
"version" : "1.2.2"
}
},
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"state" : {
"revision" : "27cd6190ce0628847a3f8050794d6e627ad79c08",
"version" : "509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-05-02-a"
}
},
{
"identity" : "swiftlint",
"kind" : "remoteSourceControl",
"location" : "https://github.com/realm/SwiftLint",
"state" : {
"revision" : "34f5ffa7f706ed2dfe11bd300e5197e8878e3856",
"version" : "0.52.2"
}
},
{
"identity" : "swiftytexttable",
"kind" : "remoteSourceControl",
"location" : "https://github.com/scottrhoyt/SwiftyTextTable.git",
"state" : {
"revision" : "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3",
"version" : "0.9.0"
}
},
{
"identity" : "swxmlhash",
"kind" : "remoteSourceControl",
"location" : "https://github.com/drmohundro/SWXMLHash.git",
"state" : {
"revision" : "a853604c9e9a83ad9954c7e3d2a565273982471f",
"version" : "7.0.2"
}
},
{
"identity" : "yams",
"kind" : "remoteSourceControl",
"location" : "https://github.com/jpsim/Yams.git",
"state" : {
"revision" : "f47ba4838c30dbd59998a4e4c87ab620ff959e8a",
"version" : "5.0.5"
}
}
],
"version" : 2
}
11 changes: 6 additions & 5 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,26 @@ import PackageDescription

let package = Package(
name: "HPRTMP",
platforms: [.iOS(.v14),.macOS(.v11)],
platforms: [.iOS(.v14), .macOS(.v12)],
products: [
.library(
name: "HPRTMP",
targets: ["HPRTMP"]
),
)
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/realm/SwiftLint", from: "0.52.2")
],
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: "HPRTMP",
dependencies: []),
dependencies: [],
plugins: [.plugin(name: "SwiftLintPlugin", package: "SwiftLint")]),
.testTarget(
name: "HPRTMPTests",
dependencies: ["HPRTMP"]),
dependencies: ["HPRTMP"])
]
)
Loading