Skip to content

Commit

Permalink
bring swiftlint and fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
huiping192 committed Jun 21, 2023
1 parent dd4900c commit 026a7a4
Show file tree
Hide file tree
Showing 42 changed files with 884 additions and 865 deletions.
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)
}
}
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(.v11)],
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

0 comments on commit 026a7a4

Please sign in to comment.