1.2.3 资源调整版

This commit is contained in:
QinFendeZhou 2024-10-08 17:34:04 +08:00
parent c48641fc10
commit c89b420ae3
56 changed files with 8804 additions and 6495 deletions

View File

@ -29,7 +29,8 @@ pod "DownloadButton"
pod 'Tiercel'
#文本跑马灯
pod 'MarqueeLabel'
#HTML解析
pod 'Kanna', '5.3.0'
#广告组
pod 'GoogleUserMessagingPlatform', '2.4.0'
@ -40,4 +41,5 @@ pod 'GoogleMobileAdsMediationPangle'
pod 'GoogleMobileAdsMediationIronSource'
pod 'GoogleMobileAdsMediationMintegral'
pod 'GoogleMobileAdsMediationChartboost'
end

View File

@ -62,6 +62,7 @@ PODS:
- IronSourceSDK (8.2.0.0)
- JXPagingView/Paging (2.1.3)
- JXSegmentedView (1.3.3)
- Kanna (5.3.0)
- Kingfisher (7.11.0)
- MarqueeLabel (4.5.0)
- MintegralAdSDK/All (7.6.8):
@ -112,6 +113,7 @@ DEPENDENCIES:
- IQKeyboardManagerSwift
- JXPagingView/Paging
- JXSegmentedView
- Kanna (= 5.3.0)
- Kingfisher
- MarqueeLabel
- MJRefresh
@ -140,6 +142,7 @@ SPEC REPOS:
- IronSourceSDK
- JXPagingView
- JXSegmentedView
- Kanna
- Kingfisher
- MarqueeLabel
- MintegralAdSDK
@ -169,6 +172,7 @@ SPEC CHECKSUMS:
IronSourceSDK: 8e630747c09d8b1eb66ce2e195a10edd9a75f8b9
JXPagingView: afdd2e9af09c90160dd232b970d603cc6e7ddd0e
JXSegmentedView: 651b60fcf705258ba9395edd53876dbd2853fb68
Kanna: 6ecbd674bcbef2766a2acf80e99d1174440c5b9c
Kingfisher: b9c985d864d43515f404f1ef4a8ce7d802ace3ac
MarqueeLabel: 4b46d196abd253448e830cbd976f9eacc3af0849
MintegralAdSDK: 8b0223ac12dcbebb0c4162708a4bf6cf854a9673
@ -179,6 +183,6 @@ SPEC CHECKSUMS:
Tiercel: c0a73f876a72800333b15f4e7e48791f4ad21e90
VungleAds: 4823f53e691ba140ff21e3a3a6897af789832a36
PODFILE CHECKSUM: 5af34d4e7dc09fde7b668a4368b6fc382756eebd
PODFILE CHECKSUM: 4df4327040da736bde6647ecbba6849146db8046
COCOAPODS: 1.15.2

21
Pods/Kanna/LICENSE generated Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 - 2015 Atsushi Kiwaki (@_tid_)
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.

138
Pods/Kanna/README.md generated Normal file
View File

@ -0,0 +1,138 @@
# Kanna(鉋)
Kanna(鉋) is an XML/HTML parser for cross-platform(macOS, iOS, tvOS, watchOS and Linux!).
It was inspired by [Nokogiri](https://github.com/sparklemotion/nokogiri)(鋸).
[![CI](https://github.com/tid-kijyun/Kanna/actions/workflows/ci.yml/badge.svg)](https://github.com/tid-kijyun/Kanna/actions/workflows/ci.yml)
[![Platform](http://img.shields.io/badge/platform-ios_osx_watchos_tvos_linux-lightgrey.svg?style=flat)](https://developer.apple.com/resources/)
[![Cocoapod](http://img.shields.io/cocoapods/v/Kanna.svg?style=flat)](http://cocoadocs.org/docsets/Kanna/)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Swift Package Manager](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager)
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
:information_source: [Documentation](http://tid-kijyun.github.io/Kanna/)
## Features
- [x] XPath 1.0 support for document searching
- [x] CSS3 selector support for document searching
- [x] Support for namespaces
- [x] Comprehensive test suite
## Installation for Swift 5
#### CocoaPods
Add the following to your `Podfile`:
```ruby
use_frameworks!
pod 'Kanna', '~> 5.2.2'
```
#### Carthage
Add the following to your `Cartfile`:
```ogdl
github "tid-kijyun/Kanna" ~> 5.2.2
```
For xcode 11.3 and earlier, the following settings are required.
1. In the project settings add `$(SDKROOT)/usr/include/libxml2` to the "header search paths" field
#### Swift Package Manager
1. Installing libxml2 to your computer:
```bash
// macOS: For xcode 11.3 and earlier, the following settings are required.
$ brew install libxml2
$ brew link --force libxml2
// Linux(Ubuntu):
$ sudo apt-get install libxml2-dev
```
2. Add the following to your `Package.swift`:
```swift
// swift-tools-version:5.0
import PackageDescription
let package = Package(
name: "YourProject",
dependencies: [
.package(url: "https://github.com/tid-kijyun/Kanna.git", from: "5.2.2"),
],
targets: [
.target(
name: "YourTarget",
dependencies: ["Kanna"]),
]
)
```
```bash
$ swift build
```
*Note: When a build error occurs, please try run the following command:*
```bash
// Linux(Ubuntu)
$ sudo apt-get install pkg-config
```
#### Manual Installation
1. Add these files to your project:
[Kanna.swift](Source/Kanna.swift)
[CSS.swift](Source/CSS.swift)
[libxmlHTMLDocument.swift](Source/libxml/libxmlHTMLDocument.swift)
[libxmlHTMLNode.swift](Source/libxml/libxmlHTMLNode.swift)
[libxmlParserOption.swift](Source/libxml/libxmlParserOption.swift)
[Modules](Modules)
1. In the target settings add `$(SDKROOT)/usr/include/libxml2` to the `Search Paths > Header Search Paths` field
1. In the target settings add `$(SRCROOT)/Modules` to the `Swift Compiler - Search Paths > Import Paths` field
#### [Installation for swift 4](https://github.com/tid-kijyun/Kanna/blob/master/Documentation/InstallationForSwift4.md)
#### [Installation for swift 3](https://github.com/tid-kijyun/Kanna/blob/master/Documentation/InstallationForSwift3.md)
## Synopsis
```swift
import Kanna
let html = "<html>...</html>"
if let doc = try? HTML(html: html, encoding: .utf8) {
print(doc.title)
// Search for nodes by CSS
for link in doc.css("a, link") {
print(link.text)
print(link["href"])
}
// Search for nodes by XPath
for link in doc.xpath("//a | //link") {
print(link.text)
print(link["href"])
}
}
```
```swift
let xml = "..."
if let doc = try? Kanna.XML(xml: xml, encoding: .utf8) {
let namespaces = [
"o": "urn:schemas-microsoft-com:office:office",
"ss": "urn:schemas-microsoft-com:office:spreadsheet"
]
if let author = doc.at_xpath("//o:Author", namespaces: namespaces) {
print(author.text)
}
}
```
## Donation
If you like Kanna, please donate via GitHub sponsors or PayPal.
It is used to improve and maintain the library.
## License
The MIT License. See the LICENSE file for more information.

373
Pods/Kanna/Sources/Kanna/CSS.swift generated Executable file
View File

@ -0,0 +1,373 @@
/**@file CSS.swift
Kanna
Copyright (c) 2015 Atsushi Kiwaki (@_tid_)
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
import libxml2
typealias AKRegularExpression = NSRegularExpression
#if os(Linux) && swift(>=4)
typealias AKTextCheckingResult = NSTextCheckingResult
#elseif os(Linux) && swift(>=3)
typealias AKTextCheckingResult = TextCheckingResult
#else
typealias AKTextCheckingResult = NSTextCheckingResult
#endif
public enum CSSError: Error {
case UnsupportSyntax(String)
}
/**
CSS
*/
public enum CSS {
/**
CSS3 selector to XPath
@param selector CSS3 selector
@return XPath
*/
public static func toXPath(_ css: String, isRoot: Bool = true) throws -> String {
let selectorGroups = css.components(separatedBy: ",")
let prefix = isRoot ? "" : "."
return try selectorGroups
.map { prefix.appending(try toXPath(selector: $0)) }
.joined(separator: " | ")
}
private static func toXPath(selector: String) throws -> String {
var xpath = "//"
var str = selector
var prev = str
while !str.isEmpty {
var attributes: [String] = []
var combinator: String = ""
str = str.trimmingCharacters(in: .whitespaces)
// element
let element = getElement(&str)
// class / id
while let attr = getClassId(&str) {
attributes.append(attr)
}
// attribute
while let attr = getAttribute(&str) {
attributes.append(attr)
}
// matchCombinator
if let combi = genCombinator(&str) {
combinator = combi
}
// generate xpath phrase
let attr = attributes.joined(separator: " and ")
if attr.isEmpty {
xpath += "\(element)\(combinator)"
} else {
xpath += "\(element)[\(attr)]\(combinator)"
}
if str == prev {
throw CSSError.UnsupportSyntax(selector)
}
prev = str
}
return xpath
}
}
private let lock = NSLock()
private var regexDict: [String: AKRegularExpression] = [:]
private func firstMatch(_ pattern: String) -> (String) -> AKTextCheckingResult? {
return { str in
let length = str.utf16.count
lock.lock()
defer {
lock.unlock()
}
if regexDict[pattern] == nil {
regexDict[pattern] = try? AKRegularExpression(pattern: pattern, options: .caseInsensitive)
}
guard let regex = regexDict[pattern] else {
return nil
}
if let result = regex.firstMatch(in: str, options: .reportProgress, range: NSRange(location: 0, length: length)) {
return result
}
return nil
}
}
private func nth(prefix: String, a: Int, b: Int) -> String {
let sibling = "\(prefix)-sibling::*"
if a == 0 {
return "count(\(sibling)) = \(b-1)"
} else if a > 0 {
if b != 0 {
return "((count(\(sibling)) + 1) >= \(b)) and ((((count(\(sibling)) + 1)-\(b)) mod \(a)) = 0)"
}
return "((count(\(sibling)) + 1) mod \(a)) = 0"
}
let a = abs(a)
return "(count(\(sibling)) + 1) <= \(b)" + ((a != 1) ? " and ((((count(\(sibling)) + 1)-\(b)) mod \(a) = 0)" : "")
}
// a(n) + b | a(n) - b
private func nth_child(a: Int, b: Int) -> String {
nth(prefix: "preceding", a: a, b: b)
}
private func nth_last_child(a: Int, b: Int) -> String {
nth(prefix: "following", a: a, b: b)
}
private let escapePattern = "(?:\\\\([!\"#\\$%&\'\\(\\)\\*\\+,\\./:;<=>\\?@\\[\\\\\\]\\^`\\{\\|\\}~]))"
private let escapeRepeatPattern = "\(escapePattern)*"
private let matchElement = firstMatch("^((?:[a-z0-9\\*_-]+\(escapeRepeatPattern))+)((\\|)((?:[a-z0-9\\*_-]+\(escapeRepeatPattern))+))?")
private let matchClassId = firstMatch("^([#.])((?:[a-z0-9\\*_-]+\(escapeRepeatPattern))+)")
private let matchAttr1 = firstMatch("^\\[([^\\]]*)\\]")
private let matchAttr2 = firstMatch("^\\[\\s*([^~\\|\\^\\$\\*=\\s]+)\\s*([~\\|\\^\\$\\*]?=)\\s*(.*)\\s*\\]")
private let matchAttrN = firstMatch("^:not\\((.*?\\)?)\\)")
private let matchPseudo = firstMatch("^:([\'\"()a-z0-9_+-]+)")
private let matchCombinator = firstMatch("^\\s*([\\s>+~,])\\s*")
private let matchSubNthChild = firstMatch("^(nth-child|nth-last-child)\\(\\s*(odd|even|\\d+)\\s*\\)")
private let matchSubNthChildN = firstMatch("^(nth-child|nth-last-child)\\(\\s*(-?\\d*)n(\\+\\d+)?\\s*\\)")
private let matchSubNthOfType = firstMatch("nth-of-type\\((odd|even|\\d+)\\)")
private let matchSubContains = firstMatch("contains\\([\"\'](.*?)[\"\']\\)")
private func substringWithRangeAtIndex(_ result: AKTextCheckingResult, str: String, at: Int) -> String {
if result.numberOfRanges > at {
#if swift(>=4.0) || os(Linux)
let range = result.range(at: at)
#else
let range = result.rangeAt(at)
#endif
if range.length > 0 {
let startIndex = str.index(str.startIndex, offsetBy: range.location)
let endIndex = str.index(startIndex, offsetBy: range.length)
return String(str[startIndex..<endIndex])
}
}
return ""
}
private func escapeCSS(_ text: String) -> String {
text.replacingOccurrences(of: escapePattern, with: "$1", options: .regularExpression, range: nil)
}
private func getElement(_ str: inout String, skip: Bool = true) -> String {
if let result = matchElement(str) {
let (text, text2) = (escapeCSS(substringWithRangeAtIndex(result, str: str, at: 1)),
escapeCSS(substringWithRangeAtIndex(result, str: str, at: 5)))
if skip {
str = String(str[str.index(str.startIndex, offsetBy: result.range.length)..<str.endIndex])
}
// tag with namespace
if !text.isEmpty && !text2.isEmpty {
return "\(text):\(text2)"
}
// tag
if !text.isEmpty {
return text
}
}
return "*"
}
private func getClassId(_ str: inout String, skip: Bool = true) -> String? {
if let result = matchClassId(str) {
let (attr, text) = (escapeCSS(substringWithRangeAtIndex(result, str: str, at: 1)),
escapeCSS(substringWithRangeAtIndex(result, str: str, at: 2)))
if skip {
str = String(str[str.index(str.startIndex, offsetBy: result.range.length)..<str.endIndex])
}
if attr.hasPrefix("#") {
return "@id = '\(text)'"
} else if attr.hasPrefix(".") {
return "contains(concat(' ', normalize-space(@class), ' '), ' \(text) ')"
}
}
return nil
}
private func getAttribute(_ str: inout String, skip: Bool = true) -> String? {
if let result = matchAttr2(str) {
let (attr, expr, text) = (escapeCSS(substringWithRangeAtIndex(result, str: str, at: 1)),
substringWithRangeAtIndex(result, str: str, at: 2),
escapeCSS(substringWithRangeAtIndex(result, str: str, at: 3).replacingOccurrences(of: "[\'\"](.*)[\'\"]", with: "$1", options: .regularExpression, range: nil)))
if skip {
str = String(str[str.index(str.startIndex, offsetBy: result.range.length)..<str.endIndex])
}
switch expr {
case "!=":
return "@\(attr) != \(text)"
case "~=":
return "contains(concat(' ', @\(attr), ' '),concat(' ', '\(text)', ' '))"
case "|=":
return "@\(attr) = '\(text)' or starts-with(@\(attr),concat('\(text)', '-'))"
case "^=":
return "starts-with(@\(attr), '\(text)')"
case "$=":
return "substring(@\(attr), string-length(@\(attr)) - string-length('\(text)') + 1, string-length('\(text)')) = '\(text)'"
case "*=":
return "contains(@\(attr), '\(text)')"
default:
return "@\(attr) = '\(text)'"
}
} else if let result = matchAttr1(str) {
let atr = substringWithRangeAtIndex(result, str: str, at: 1)
if skip {
str = String(str[str.index(str.startIndex, offsetBy: result.range.length)..<str.endIndex])
}
return "@\(atr)"
} else if str.hasPrefix("[") {
// bad syntax attribute
return nil
} else if let attr = getAttrNot(&str) {
return "not(\(attr))"
} else if let result = matchPseudo(str) {
let one = substringWithRangeAtIndex(result, str: str, at: 1)
if skip {
str = String(str[str.index(str.startIndex, offsetBy: result.range.length)..<str.endIndex])
}
switch one {
case "first-child":
return "count(preceding-sibling::*) = 0"
case "last-child":
return "count(following-sibling::*) = 0"
case "only-child":
return "count(preceding-sibling::*) = 0 and count(following-sibling::*) = 0"
case "first-of-type":
return "position() = 1"
case "last-of-type":
return "position() = last()"
case "only-of-type":
return "last() = 1"
case "empty":
return "not(node())"
case "root":
return "not(parent::*)"
default:
if let sub = matchSubNthChild(one) {
let (nth, arg1) = (substringWithRangeAtIndex(sub, str: one, at: 1),
substringWithRangeAtIndex(sub, str: one, at: 2))
let nthFunc = (nth == "nth-child") ? nth_child : nth_last_child
if arg1 == "odd" {
return nthFunc(2, 1)
} else if arg1 == "even" {
return nthFunc(2, 0)
} else {
return nthFunc(0, Int(arg1)!)
}
} else if let sub = matchSubNthChildN(one) {
let (nth, arg1, arg2) = (substringWithRangeAtIndex(sub, str: one, at: 1),
substringWithRangeAtIndex(sub, str: one, at: 2),
substringWithRangeAtIndex(sub, str: one, at: 3))
let nthFunc = (nth == "nth-child") ? nth_child : nth_last_child
let a: Int = (arg1 == "-") ? -1 : Int(arg1)!
let b: Int = (arg2.isEmpty) ? 0 : Int(arg2)!
return nthFunc(a, b)
} else if let sub = matchSubNthOfType(one) {
let arg1 = substringWithRangeAtIndex(sub, str: one, at: 1)
if arg1 == "odd" {
return "(position() >= 1) and (((position()-1) mod 2) = 0)"
} else if arg1 == "even" {
return "(position() mod 2) = 0"
} else {
return "position() = \(arg1)"
}
} else if let sub = matchSubContains(one) {
let text = substringWithRangeAtIndex(sub, str: one, at: 1)
return "contains(., '\(text)')"
} else {
return nil
}
}
}
return nil
}
private func getAttrNot(_ str: inout String, skip: Bool = true) -> String? {
if let result = matchAttrN(str) {
var one = substringWithRangeAtIndex(result, str: str, at: 1)
if skip {
str = String(str[str.index(str.startIndex, offsetBy: result.range.length)..<str.endIndex])
}
if let attr = getAttribute(&one, skip: false) {
return attr
} else if let sub = matchElement(one) {
#if swift(>=4.0) || os(Linux)
let range = sub.range(at: 1)
#else
let range = sub.rangeAt(1)
#endif
let startIndex = one.index(one.startIndex, offsetBy: range.location)
let endIndex = one.index(startIndex, offsetBy: range.length)
let elem = one[startIndex ..< endIndex]
return "self::\(elem)"
} else if let attr = getClassId(&one) {
return attr
}
}
return nil
}
private func genCombinator(_ str: inout String, skip: Bool = true) -> String? {
if let result = matchCombinator(str) {
let one = substringWithRangeAtIndex(result, str: str, at: 1)
if skip {
str = String(str[str.index(str.startIndex, offsetBy: result.range.length)..<str.endIndex])
}
switch one {
case ">":
return "/"
case "+":
return "/following-sibling::*[1]/self::"
case "~":
return "/following-sibling::"
default:
return "//"
}
}
return nil
}

View File

@ -0,0 +1,45 @@
//
// Deprecated.swift
// Kanna
//
// Created by Atsushi Kiwaki on 2017/10/27.
// Copyright © 2017 Atsushi Kiwaki. All rights reserved.
//
import Foundation
//-------------------------------------------------------------
// XML
//-------------------------------------------------------------
@available(*, unavailable, message: "Use XML(xml: String, url: String?, encoding: String.Encoding, option: ParseOption). The type of the second argument has been changed to String.Encoding from UInt.")
public func XML(xml: String, url: String? = nil, encoding: UInt, option: ParseOption = kDefaultXmlParseOption) -> XMLDocument? {
nil
}
@available(*, unavailable, message: "Use XML(xml: Data, url: String?, encoding: String.Encoding, option: ParseOption). The type of the first argument has been changed to Data and the type of the second argument has been changed to String.Encoding from UInt.")
public func XML(xml: NSData, url: String? = nil, encoding: UInt, option: ParseOption = kDefaultXmlParseOption) -> XMLDocument? {
nil
}
@available(*, unavailable, message: "Use XML(url: URL, encoding: String.Encoding, option: ParseOption). The type of the second argument has been changed to String.Encoding from UInt.")
public func XML(url: URL, encoding: UInt, option: ParseOption = kDefaultXmlParseOption) -> XMLDocument? {
nil
}
//-------------------------------------------------------------
// HTML
//-------------------------------------------------------------
@available(*, unavailable, message: "Use HTML(html: String, url: String?, encoding: String.Encoding, option: ParseOption). The type of the second argument has been changed to String.Encoding from UInt.")
public func HTML(html: String, url: String? = nil, encoding: UInt, option: ParseOption = kDefaultXmlParseOption) -> XMLDocument? {
nil
}
@available(*, unavailable, message: "Use HTML(html: Data, url: String?, encoding: String.Encoding, option: ParseOption). The type of the first argument has been changed to Data and the type of the second argument has been changed to String.Encoding from UInt.")
public func HTML(html: NSData, url: String? = nil, encoding: UInt, option: ParseOption = kDefaultXmlParseOption) -> XMLDocument? {
nil
}
@available(*, unavailable, message: "Use HTML(url: URL, encoding: String.Encoding, option: ParseOption). The type of the second argument has been changed to String.Encoding from UInt.")
public func HTML(url: URL, encoding: UInt, option: ParseOption = kDefaultXmlParseOption) -> XMLDocument? {
nil
}

33
Pods/Kanna/Sources/Kanna/Kanna.h generated Normal file
View File

@ -0,0 +1,33 @@
/**@file Kanna.h
Kanna
Copyright (c) 2015 Atsushi Kiwaki (@_tid_)
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/Foundation.h>
//! Project version number for Kanna.
FOUNDATION_EXPORT double KannaVersionNumber;
//! Project version string for Kanna.
FOUNDATION_EXPORT const unsigned char KannaVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <Kanna/PublicHeader.h>

395
Pods/Kanna/Sources/Kanna/Kanna.swift generated Executable file
View File

@ -0,0 +1,395 @@
/**@file Kanna.swift
Kanna
Copyright (c) 2015 Atsushi Kiwaki (@_tid_)
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
import libxml2
/*
ParseOption
*/
public enum ParseOption {
// libxml2
case xmlParseUseLibxml(Libxml2XMLParserOptions)
case htmlParseUseLibxml(Libxml2HTMLParserOptions)
}
public let kDefaultXmlParseOption = ParseOption.xmlParseUseLibxml([.RECOVER, .NOERROR, .NOWARNING])
public let kDefaultHtmlParseOption = ParseOption.htmlParseUseLibxml([.RECOVER, .NOERROR, .NOWARNING])
public enum ParseError: Error {
case Empty
case EncodingMismatch
case InvalidOptions
}
/**
Parse XML
@param xml an XML string
@param url the base URL to use for the document
@param encoding the document encoding
@param options a ParserOption
*/
public func XML(xml: String, url: String? = nil, encoding: String.Encoding, option: ParseOption = kDefaultXmlParseOption) throws -> XMLDocument {
switch option {
case .xmlParseUseLibxml(let opt):
return try libxmlXMLDocument(xml: xml, url: url, encoding: encoding, option: opt.rawValue)
default:
throw ParseError.InvalidOptions
}
}
// NSData
public func XML(xml: Data, url: String? = nil, encoding: String.Encoding, option: ParseOption = kDefaultXmlParseOption) throws -> XMLDocument {
guard let xmlStr = String(data: xml, encoding: encoding) else {
throw ParseError.EncodingMismatch
}
return try XML(xml: xmlStr, url: url, encoding: encoding, option: option)
}
// NSURL
public func XML(url: URL, encoding: String.Encoding, option: ParseOption = kDefaultXmlParseOption) throws -> XMLDocument {
guard let data = try? Data(contentsOf: url) else {
throw ParseError.EncodingMismatch
}
return try XML(xml: data, url: url.absoluteString, encoding: encoding, option: option)
}
/**
Parse HTML
@param html an HTML string
@param url the base URL to use for the document
@param encoding the document encoding
@param options a ParserOption
*/
public func HTML(html: String, url: String? = nil, encoding: String.Encoding, option: ParseOption = kDefaultHtmlParseOption) throws -> HTMLDocument {
switch option {
case .htmlParseUseLibxml(let opt):
return try libxmlHTMLDocument(html: html, url: url, encoding: encoding, option: opt.rawValue)
default:
throw ParseError.InvalidOptions
}
}
// NSData
public func HTML(html: Data, url: String? = nil, encoding: String.Encoding, option: ParseOption = kDefaultHtmlParseOption) throws -> HTMLDocument {
guard let htmlStr = String(data: html, encoding: encoding) else {
throw ParseError.EncodingMismatch
}
return try HTML(html: htmlStr, url: url, encoding: encoding, option: option)
}
// NSURL
public func HTML(url: URL, encoding: String.Encoding, option: ParseOption = kDefaultHtmlParseOption) throws -> HTMLDocument {
guard let data = try? Data(contentsOf: url) else {
throw ParseError.EncodingMismatch
}
return try HTML(html: data, url: url.absoluteString, encoding: encoding, option: option)
}
/**
Searchable
*/
public protocol Searchable {
/**
Search for node from current node by XPath.
@param xpath
*/
func xpath(_ xpath: String, namespaces: [String: String]?) -> XPathObject
/**
Search for node from current node by CSS selector.
@param selector a CSS selector
*/
func css(_ selector: String, namespaces: [String: String]?) -> XPathObject
}
public extension Searchable {
func xpath(_ xpath: String, namespaces: [String: String]? = nil) -> XPathObject {
self.xpath(xpath, namespaces: namespaces)
}
func at_xpath(_ xpath: String, namespaces: [String: String]? = nil) -> XMLElement? {
self.xpath(xpath, namespaces: namespaces).nodeSetValue.first
}
func css(_ selector: String, namespaces: [String: String]? = nil) -> XPathObject {
self.css(selector, namespaces: namespaces)
}
func at_css(_ selector: String, namespaces: [String: String]? = nil) -> XMLElement? {
self.css(selector, namespaces: namespaces).nodeSetValue.first
}
}
/**
SearchableNode
*/
public protocol SearchableNode: Searchable {
var text: String? { get }
var toHTML: String? { get }
var toXML: String? { get }
var innerHTML: String? { get }
var className: String? { get }
var tagName: String? { get set }
var content: String? { get set }
}
/**
XMLElement
*/
public protocol XMLElement: SearchableNode {
var parent: XMLElement? { get set }
subscript(attr: String) -> String? { get set }
func addPrevSibling(_ node: XMLElement)
func addNextSibling(_ node: XMLElement)
func removeChild(_ node: XMLElement)
var nextSibling: XMLElement? { get }
var previousSibling: XMLElement? { get }
}
/**
XMLDocument
*/
public protocol XMLDocument: AnyObject, SearchableNode {
var namespaces: [Namespace] { get }
}
public extension XMLDocument {
var namespaceDictionary: [String: String]? {
let dictionary = self.namespaces.reduce(into: [:]) {
// when prefix is blank, treat prefix "" as "xmlns", or xpath cannot specify "" as prefix
$0[$1.prefix == "" ? "xmlns": $1.prefix] = $1.name
}
return dictionary.count > 0 ? dictionary : nil
}
}
/**
HTMLDocument
*/
public protocol HTMLDocument: XMLDocument {
var title: String? { get }
var head: XMLElement? { get }
var body: XMLElement? { get }
}
/**
XMLNodeSet
*/
public final class XMLNodeSet {
private var nodes: [XMLElement]
public var toHTML: String? {
let html = nodes.reduce("") {
if let text = $1.toHTML {
return $0 + text
}
return $0
}
return html.isEmpty == false ? html : nil
}
public var innerHTML: String? {
let html = nodes.reduce("") {
if let text = $1.innerHTML {
return $0 + text
}
return $0
}
return html.isEmpty == false ? html : nil
}
public var text: String? {
let html = nodes.reduce("") {
if let text = $1.text {
return $0 + text
}
return $0
}
return html
}
public subscript(index: Int) -> XMLElement {
nodes[index]
}
public var count: Int { nodes.count }
init(nodes: [XMLElement] = []) {
self.nodes = nodes
}
public func at(_ index: Int) -> XMLElement? {
count > index ? nodes[index] : nil
}
public var first: XMLElement? { at(0) }
public var last: XMLElement? { at(count - 1) }
}
extension XMLNodeSet: Sequence {
public typealias Iterator = AnyIterator<XMLElement>
public func makeIterator() -> Iterator {
var index = 0
return AnyIterator {
if index < self.nodes.count {
let n = self.nodes[index]
index += 1
return n
}
return nil
}
}
}
/**
Namespace
*/
public struct Namespace {
public let prefix: String
public let name: String
}
/**
XPathObject
*/
public enum XPathObject {
case none
case NodeSet(nodeset: XMLNodeSet)
case Bool(bool: Swift.Bool)
case Number(num: Double)
case String(text: Swift.String)
}
extension XPathObject {
init(document: XMLDocument?, docPtr: xmlDocPtr, object: xmlXPathObject) {
switch object.type {
case XPATH_NODESET:
guard let nodeSet = object.nodesetval, nodeSet.pointee.nodeNr != 0, let nodeTab = nodeSet.pointee.nodeTab else {
self = .none
return
}
var nodes: [XMLElement] = []
let size = Int(nodeSet.pointee.nodeNr)
for i in 0 ..< size {
let node: xmlNodePtr = nodeTab[i]!
let htmlNode = libxmlHTMLNode(document: document, docPtr: docPtr, node: node)
nodes.append(htmlNode)
}
self = .NodeSet(nodeset: XMLNodeSet(nodes: nodes))
return
case XPATH_BOOLEAN:
self = .Bool(bool: object.boolval != 0)
return
case XPATH_NUMBER:
self = .Number(num: object.floatval)
case XPATH_STRING:
guard let str = UnsafeRawPointer(object.stringval)?.assumingMemoryBound(to: CChar.self) else {
self = .String(text: "")
return
}
self = .String(text: Swift.String(cString: str))
return
default:
self = .none
return
}
}
public subscript(index: Int) -> XMLElement {
nodeSet![index]
}
public var first: XMLElement? {
nodeSet?.first
}
public var count: Int {
nodeSet?.count ?? 0
}
var nodeSet: XMLNodeSet? {
if case let .NodeSet(nodeset) = self {
return nodeset
}
return nil
}
var bool: Swift.Bool? {
if case let .Bool(value) = self {
return value
}
return nil
}
var number: Double? {
if case let .Number(value) = self {
return value
}
return nil
}
var string: Swift.String? {
if case let .String(value) = self {
return value
}
return nil
}
var nodeSetValue: XMLNodeSet {
nodeSet ?? XMLNodeSet()
}
var boolValue: Swift.Bool {
bool ?? false
}
var numberValue: Double {
number ?? 0
}
var stringValue: Swift.String {
string ?? ""
}
}
extension XPathObject: Sequence {
public typealias Iterator = AnyIterator<XMLElement>
public func makeIterator() -> Iterator {
var index = 0
return AnyIterator {
if index < self.nodeSetValue.count {
let obj = self.nodeSetValue[index]
index += 1
return obj
}
return nil
}
}
}

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyAccessedAPITypes</key>
<array/>
<key>NSPrivacyTrackingDomains</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>

View File

@ -0,0 +1,392 @@
/**@file libxmlHTMLDocument.swift
Kanna
Copyright (c) 2015 Atsushi Kiwaki (@_tid_)
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
import CoreFoundation
import libxml2
extension String.Encoding {
var IANACharSetName: String? {
#if os(Linux) && swift(>=4)
switch self {
case .ascii:
return "us-ascii"
case .iso2022JP:
return "iso-2022-jp"
case .isoLatin1:
return "iso-8859-1"
case .isoLatin2:
return "iso-8859-2"
case .japaneseEUC:
return "euc-jp"
case .macOSRoman:
return "macintosh"
case .nextstep:
return "x-nextstep"
case .nonLossyASCII:
return nil
case .shiftJIS:
return "cp932"
case .symbol:
return "x-mac-symbol"
case .unicode:
return "utf-16"
case .utf16:
return "utf-16"
case .utf16BigEndian:
return "utf-16be"
case .utf32:
return "utf-32"
case .utf32BigEndian:
return "utf-32be"
case .utf32LittleEndian:
return "utf-32le"
case .utf8:
return "utf-8"
case .windowsCP1250:
return "windows-1250"
case .windowsCP1251:
return "windows-1251"
case .windowsCP1252:
return "windows-1252"
case .windowsCP1253:
return "windows-1253"
case .windowsCP1254:
return "windows-1254"
default:
return nil
}
#elseif os(Linux) && swift(>=3)
switch self {
case String.Encoding.ascii:
return "us-ascii"
case String.Encoding.iso2022JP:
return "iso-2022-jp"
case String.Encoding.isoLatin1:
return "iso-8859-1"
case String.Encoding.isoLatin2:
return "iso-8859-2"
case String.Encoding.japaneseEUC:
return "euc-jp"
case String.Encoding.macOSRoman:
return "macintosh"
case String.Encoding.nextstep:
return "x-nextstep"
case String.Encoding.nonLossyASCII:
return nil
case String.Encoding.shiftJIS:
return "cp932"
case String.Encoding.symbol:
return "x-mac-symbol"
case String.Encoding.unicode:
return "utf-16"
case String.Encoding.utf16:
return "utf-16"
case String.Encoding.utf16BigEndian:
return "utf-16be"
case String.Encoding.utf32:
return "utf-32"
case String.Encoding.utf32BigEndian:
return "utf-32be"
case String.Encoding.utf32LittleEndian:
return "utf-32le"
case String.Encoding.utf8:
return "utf-8"
case String.Encoding.windowsCP1250:
return "windows-1250"
case String.Encoding.windowsCP1251:
return "windows-1251"
case String.Encoding.windowsCP1252:
return "windows-1252"
case String.Encoding.windowsCP1253:
return "windows-1253"
case String.Encoding.windowsCP1254:
return "windows-1254"
default:
return nil
}
#else
let cfenc = CFStringConvertNSStringEncodingToEncoding(rawValue)
guard let cfencstr = CFStringConvertEncodingToIANACharSetName(cfenc) else {
return nil
}
return cfencstr as String
#endif
}
}
/*
libxmlHTMLDocument
*/
final class libxmlHTMLDocument: HTMLDocument {
private var docPtr: htmlDocPtr?
private var rootNode: XMLElement?
private var html: String
private var url: String?
private var encoding: String.Encoding
var text: String? { rootNode?.text }
var toHTML: String? {
let buf = xmlBufferCreate()
let outputBuf = xmlOutputBufferCreateBuffer(buf, nil)
defer {
xmlOutputBufferClose(outputBuf)
xmlBufferFree(buf)
}
htmlDocContentDumpOutput(outputBuf, docPtr, nil)
let html = String(cString: UnsafePointer(xmlOutputBufferGetContent(outputBuf)))
return html
}
var toXML: String? {
var buf: UnsafeMutablePointer<xmlChar>?
let size: UnsafeMutablePointer<Int32>? = nil
defer {
xmlFree(buf)
}
xmlDocDumpMemory(docPtr, &buf, size)
let html = String(cString: UnsafePointer<UInt8>(buf!))
return html
}
var innerHTML: String? { rootNode?.innerHTML }
var className: String? { nil }
var tagName: String? {
get { nil }
set {}
}
var content: String? {
get { text }
set { rootNode?.content = newValue }
}
var namespaces: [Namespace] { getNamespaces(docPtr: docPtr) }
init(html: String, url: String?, encoding: String.Encoding, option: UInt) throws {
self.html = html
self.url = url
self.encoding = encoding
guard html.lengthOfBytes(using: encoding) > 0 else {
throw ParseError.Empty
}
guard let charsetName = encoding.IANACharSetName,
let cur = html.cString(using: encoding) else {
throw ParseError.EncodingMismatch
}
let url: String = ""
docPtr = cur.withUnsafeBytes { htmlReadDoc($0.bindMemory(to: xmlChar.self).baseAddress!, url, charsetName, CInt(option)) }
guard let docPtr = docPtr else {
throw ParseError.EncodingMismatch
}
rootNode = try libxmlHTMLNode(document: self, docPtr: docPtr)
}
deinit {
xmlFreeDoc(docPtr)
}
var title: String? { at_xpath("//title")?.text }
var head: XMLElement? { at_xpath("//head") }
var body: XMLElement? { at_xpath("//body") }
func xpath(_ xpath: String, namespaces: [String: String]? = nil) -> XPathObject {
guard let docPtr = docPtr else { return .none }
return XPath(doc: self, docPtr: docPtr).xpath(xpath, namespaces: namespaces)
}
func css(_ selector: String, namespaces: [String: String]? = nil) -> XPathObject {
guard let docPtr = docPtr else { return .none }
return XPath(doc: self, docPtr: docPtr).css(selector, namespaces: namespaces)
}
}
/*
libxmlXMLDocument
*/
final class libxmlXMLDocument: XMLDocument {
private var docPtr: xmlDocPtr?
private var rootNode: XMLElement?
private var xml: String
private var url: String?
private var encoding: String.Encoding
var text: String? { rootNode?.text }
var toHTML: String? {
let buf = xmlBufferCreate()
let outputBuf = xmlOutputBufferCreateBuffer(buf, nil)
defer {
xmlOutputBufferClose(outputBuf)
xmlBufferFree(buf)
}
htmlDocContentDumpOutput(outputBuf, docPtr, nil)
let html = String(cString: UnsafePointer(xmlOutputBufferGetContent(outputBuf)))
return html
}
var toXML: String? {
var buf: UnsafeMutablePointer<xmlChar>?
let size: UnsafeMutablePointer<Int32>? = nil
defer {
xmlFree(buf)
}
xmlDocDumpMemory(docPtr, &buf, size)
let html = String(cString: UnsafePointer<UInt8>(buf!))
return html
}
var innerHTML: String? { rootNode?.innerHTML }
var className: String? { nil }
var tagName: String? {
get { nil }
set {}
}
var content: String? {
get { text }
set { rootNode?.content = newValue }
}
var namespaces: [Namespace] { getNamespaces(docPtr: docPtr) }
init(xml: String, url: String?, encoding: String.Encoding, option: UInt) throws {
self.xml = xml
self.url = url
self.encoding = encoding
if xml.isEmpty {
throw ParseError.Empty
}
guard let charsetName = encoding.IANACharSetName,
let cur = xml.cString(using: encoding) else {
throw ParseError.EncodingMismatch
}
let url: String = ""
docPtr = cur.withUnsafeBytes { xmlReadDoc($0.bindMemory(to: xmlChar.self).baseAddress!, url, charsetName, CInt(option)) }
rootNode = try libxmlHTMLNode(document: self, docPtr: docPtr!)
}
deinit {
xmlFreeDoc(docPtr)
}
func xpath(_ xpath: String, namespaces: [String: String]? = nil) -> XPathObject {
let namespaces = namespaces ?? self.namespaceDictionary
guard let docPtr = docPtr else { return .none }
return XPath(doc: self, docPtr: docPtr).xpath(xpath, namespaces: namespaces)
}
func css(_ selector: String, namespaces: [String: String]? = nil) -> XPathObject {
guard let docPtr = docPtr else { return .none }
return XPath(doc: self, docPtr: docPtr).css(selector, namespaces: namespaces)
}
}
struct XPath {
private let doc: XMLDocument
private var docPtr: xmlDocPtr
private var nodePtr: xmlNodePtr?
private var isRoot: Bool {
guard let nodePtr = nodePtr else { return true }
return xmlDocGetRootElement(docPtr) == nodePtr
}
init(doc: XMLDocument, docPtr: xmlDocPtr, nodePtr: xmlNodePtr? = nil) {
self.doc = doc
self.docPtr = docPtr
self.nodePtr = nodePtr
}
func xpath(_ xpath: String, namespaces: [String: String]? = nil) -> XPathObject {
guard let ctxt = xmlXPathNewContext(docPtr) else { return .none }
defer { xmlXPathFreeContext(ctxt) }
let namespaces = namespaces ?? self.doc.namespaceDictionary
if let nsDictionary = namespaces {
for (ns, name) in nsDictionary {
xmlXPathRegisterNs(ctxt, ns, name)
}
}
if let node = nodePtr {
ctxt.pointee.node = node
}
guard let result = xmlXPathEvalExpression(adoptXpath(xpath), ctxt) else { return .none }
defer { xmlXPathFreeObject(result) }
return XPathObject(document: doc, docPtr: docPtr, object: result.pointee)
}
func css(_ selector: String, namespaces: [String: String]? = nil) -> XPathObject {
if let xpath = try? CSS.toXPath(selector, isRoot: isRoot) {
return self.xpath(xpath, namespaces: namespaces)
}
return .none
}
private func adoptXpath(_ xpath: String) -> String {
guard !isRoot else { return xpath }
if xpath.hasPrefix("/") {
return "." + xpath
} else {
return xpath
}
}
}
private func getNamespaces(docPtr: xmlDocPtr?) -> [Namespace] {
let rootNode = xmlDocGetRootElement(docPtr)
guard let ns = xmlGetNsList(docPtr, rootNode) else {
return []
}
var result: [Namespace] = []
var next = ns.pointee
while next != nil {
if let namePtr = next?.pointee.href {
let prefixPtr = next?.pointee.prefix
let prefix = prefixPtr == nil ? "" : String(cString: UnsafePointer<UInt8>(prefixPtr!))
let name = String(cString: UnsafePointer<UInt8>(namePtr))
result.append(Namespace(prefix: prefix, name: name))
}
next = next?.pointee.next
}
return result
}

242
Pods/Kanna/Sources/Kanna/libxmlHTMLNode.swift generated Executable file
View File

@ -0,0 +1,242 @@
/**@file libxmlHTMLNode.swift
Kanna
Copyright (c) 2015 Atsushi Kiwaki (@_tid_)
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
import libxml2
/**
libxmlHTMLNode
*/
final class libxmlHTMLNode: XMLElement {
var text: String? {
return libxmlGetNodeContent(nodePtr)
}
var toHTML: String? {
let buf = xmlBufferCreate()
htmlNodeDump(buf, docPtr, nodePtr)
let html = String(cString: UnsafePointer<UInt8>((buf?.pointee.content)!))
xmlBufferFree(buf)
return html
}
var toXML: String? {
let buf = xmlBufferCreate()
xmlNodeDump(buf, docPtr, nodePtr, 0, 0)
let html = String(cString: UnsafePointer<UInt8>((buf?.pointee.content)!))
xmlBufferFree(buf)
return html
}
var innerHTML: String? {
guard let html = toHTML else { return nil }
return html
.replacingOccurrences(of: "</[^>]*>$", with: "", options: .regularExpression, range: nil)
.replacingOccurrences(of: "^<[^>]*>", with: "", options: .regularExpression, range: nil)
}
var className: String? {
self["class"]
}
var tagName: String? {
get {
guard let name = nodePtr.pointee.name else {
return nil
}
return String(cString: name)
}
set {
if let newValue = newValue {
xmlNodeSetName(nodePtr, newValue)
}
}
}
var content: String? {
get { text }
set {
if let newValue = newValue {
let v = escape(newValue)
xmlNodeSetContent(nodePtr, v)
}
}
}
var parent: XMLElement? {
get {
libxmlHTMLNode(document: doc, docPtr: docPtr, node: nodePtr.pointee.parent)
}
set {
if let node = newValue as? libxmlHTMLNode {
node.addChild(self)
}
}
}
var nextSibling: XMLElement? {
node(from: xmlNextElementSibling(nodePtr))
}
var previousSibling: XMLElement? {
node(from: xmlPreviousElementSibling(nodePtr))
}
private weak var weakDocument: XMLDocument?
private var document: XMLDocument?
private var docPtr: htmlDocPtr
private var nodePtr: xmlNodePtr
private var doc: XMLDocument? {
weakDocument ?? document
}
subscript(attributeName: String) -> String? {
get {
var attr = nodePtr.pointee.properties
while attr != nil {
let mem = attr!.pointee
let prefix = mem.ns.flatMap { $0.pointee.prefix.string }
let tagName = [prefix, mem.name.string].compactMap { $0 }.joined(separator: ":")
if attributeName == tagName {
if let children = mem.children {
return libxmlGetNodeContent(children)
} else {
return ""
}
}
attr = attr!.pointee.next
}
return nil
}
set(newValue) {
if let newValue = newValue {
xmlSetProp(nodePtr, attributeName, newValue)
} else {
xmlUnsetProp(nodePtr, attributeName)
}
}
}
init(document: XMLDocument?, docPtr: xmlDocPtr) throws {
self.weakDocument = document
self.docPtr = docPtr
guard let nodePtr = xmlDocGetRootElement(docPtr) else {
// Error handling is omitted, and will be added if necessary in the future.
// e.g: if let error = xmlGetLastError(), error.pointee.code == XML_ERR_DOCUMENT_EMPTY.rawValue
throw ParseError.Empty
}
self.nodePtr = nodePtr
}
init(document: XMLDocument?, docPtr: xmlDocPtr, node: xmlNodePtr) {
self.document = document
self.docPtr = docPtr
self.nodePtr = node
}
// MARK: Searchable
func xpath(_ xpath: String, namespaces: [String: String]? = nil) -> XPathObject {
guard let doc = doc else { return .none }
return XPath(doc: doc, docPtr: docPtr, nodePtr: nodePtr).xpath(xpath, namespaces: namespaces)
}
func css(_ selector: String, namespaces: [String: String]? = nil) -> XPathObject {
guard let doc = doc else { return .none }
return XPath(doc: doc, docPtr: docPtr, nodePtr: nodePtr).css(selector, namespaces: namespaces)
}
func addPrevSibling(_ node: XMLElement) {
guard let node = node as? libxmlHTMLNode else {
return
}
xmlAddPrevSibling(nodePtr, node.nodePtr)
}
func addNextSibling(_ node: XMLElement) {
guard let node = node as? libxmlHTMLNode else {
return
}
xmlAddNextSibling(nodePtr, node.nodePtr)
}
func addChild(_ node: XMLElement) {
guard let node = node as? libxmlHTMLNode else {
return
}
xmlUnlinkNode(node.nodePtr)
xmlAddChild(nodePtr, node.nodePtr)
}
func removeChild(_ node: XMLElement) {
guard let node = node as? libxmlHTMLNode else {
return
}
xmlUnlinkNode(node.nodePtr)
xmlFreeNode(node.nodePtr)
}
private func node(from ptr: xmlNodePtr?) -> XMLElement? {
guard let doc = doc, let nodePtr = ptr else {
return nil
}
return libxmlHTMLNode(document: doc, docPtr: docPtr, node: nodePtr)
}
}
private func libxmlGetNodeContent(_ nodePtr: xmlNodePtr) -> String? {
let content = xmlNodeGetContent(nodePtr)
defer {
#if swift(>=4.1)
content?.deallocate()
#else
content?.deallocate(capacity: 1)
#endif
}
if let result = String(validatingUTF8: UnsafeRawPointer(content!).assumingMemoryBound(to: CChar.self)) {
return result
}
return nil
}
let entities = [
("&", "&amp;"),
("<", "&lt;"),
(">", "&gt;")
]
private func escape(_ str: String) -> String {
var newStr = str
for (unesc, esc) in entities {
newStr = newStr.replacingOccurrences(of: unesc, with: esc, options: .regularExpression, range: nil)
}
return newStr
}
fileprivate extension UnsafePointer<UInt8> {
var string: String? {
let string = String(validatingUTF8: UnsafePointer<CChar>(OpaquePointer(self)))
return string
}
}

View File

@ -0,0 +1,93 @@
/**@file libxmlParserOption.swift
Kanna
Copyright (c) 2015 Atsushi Kiwaki (@_tid_)
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
import libxml2
/*
Libxml2HTMLParserOptions
*/
public struct Libxml2HTMLParserOptions: OptionSet {
public typealias RawValue = UInt
private var value: UInt = 0
init(_ value: UInt) { self.value = value }
private init(_ opt: htmlParserOption) { value = UInt(opt.rawValue) }
public init(rawValue value: UInt) { self.value = value }
public init(nilLiteral: ()) { value = 0 }
public static var allZeros: Libxml2HTMLParserOptions { .init(0) }
static func fromMask(raw: UInt) -> Libxml2HTMLParserOptions { .init(raw) }
public var rawValue: UInt { value }
public static let STRICT = Libxml2HTMLParserOptions(0)
public static let RECOVER = Libxml2HTMLParserOptions(HTML_PARSE_RECOVER)
public static let NODEFDTD = Libxml2HTMLParserOptions(HTML_PARSE_NODEFDTD)
public static let NOERROR = Libxml2HTMLParserOptions(HTML_PARSE_NOERROR)
public static let NOWARNING = Libxml2HTMLParserOptions(HTML_PARSE_NOWARNING)
public static let PEDANTIC = Libxml2HTMLParserOptions(HTML_PARSE_PEDANTIC)
public static let NOBLANKS = Libxml2HTMLParserOptions(HTML_PARSE_NOBLANKS)
public static let NONET = Libxml2HTMLParserOptions(HTML_PARSE_NONET)
public static let NOIMPLIED = Libxml2HTMLParserOptions(HTML_PARSE_NOIMPLIED)
public static let COMPACT = Libxml2HTMLParserOptions(HTML_PARSE_COMPACT)
public static let IGNORE_ENC = Libxml2HTMLParserOptions(HTML_PARSE_IGNORE_ENC)
}
/*
Libxml2XMLParserOptions
*/
public struct Libxml2XMLParserOptions: OptionSet {
public typealias RawValue = UInt
private var value: UInt = 0
init(_ value: UInt) { self.value = value }
private init(_ opt: xmlParserOption) { value = UInt(opt.rawValue) }
public init(rawValue value: UInt) { self.value = value }
public init(nilLiteral: ()) { value = 0 }
public static var allZeros: Libxml2XMLParserOptions { .init(0) }
static func fromMask(raw: UInt) -> Libxml2XMLParserOptions { .init(raw) }
public var rawValue: UInt { value }
public static let STRICT = Libxml2XMLParserOptions(0)
public static let RECOVER = Libxml2XMLParserOptions(XML_PARSE_RECOVER)
public static let NOENT = Libxml2XMLParserOptions(XML_PARSE_NOENT)
public static let DTDLOAD = Libxml2XMLParserOptions(XML_PARSE_DTDLOAD)
public static let DTDATTR = Libxml2XMLParserOptions(XML_PARSE_DTDATTR)
public static let DTDVALID = Libxml2XMLParserOptions(XML_PARSE_DTDVALID)
public static let NOERROR = Libxml2XMLParserOptions(XML_PARSE_NOERROR)
public static let NOWARNING = Libxml2XMLParserOptions(XML_PARSE_NOWARNING)
public static let PEDANTIC = Libxml2XMLParserOptions(XML_PARSE_PEDANTIC)
public static let NOBLANKS = Libxml2XMLParserOptions(XML_PARSE_NOBLANKS)
public static let SAX1 = Libxml2XMLParserOptions(XML_PARSE_SAX1)
public static let XINCLUDE = Libxml2XMLParserOptions(XML_PARSE_XINCLUDE)
public static let NONET = Libxml2XMLParserOptions(XML_PARSE_NONET)
public static let NODICT = Libxml2XMLParserOptions(XML_PARSE_NODICT)
public static let NSCLEAN = Libxml2XMLParserOptions(XML_PARSE_NSCLEAN)
public static let NOCDATA = Libxml2XMLParserOptions(XML_PARSE_NOCDATA)
public static let NOXINCNODE = Libxml2XMLParserOptions(XML_PARSE_NOXINCNODE)
public static let COMPACT = Libxml2XMLParserOptions(XML_PARSE_COMPACT)
public static let OLD10 = Libxml2XMLParserOptions(XML_PARSE_OLD10)
public static let NOBASEFIX = Libxml2XMLParserOptions(XML_PARSE_NOBASEFIX)
public static let HUGE = Libxml2XMLParserOptions(XML_PARSE_HUGE)
public static let OLDSAX = Libxml2XMLParserOptions(XML_PARSE_OLDSAX)
public static let IGNORE_ENC = Libxml2XMLParserOptions(XML_PARSE_IGNORE_ENC)
public static let BIG_LINES = Libxml2XMLParserOptions(XML_PARSE_BIG_LINES)
}

6
Pods/Manifest.lock generated
View File

@ -62,6 +62,7 @@ PODS:
- IronSourceSDK (8.2.0.0)
- JXPagingView/Paging (2.1.3)
- JXSegmentedView (1.3.3)
- Kanna (5.3.0)
- Kingfisher (7.11.0)
- MarqueeLabel (4.5.0)
- MintegralAdSDK/All (7.6.8):
@ -112,6 +113,7 @@ DEPENDENCIES:
- IQKeyboardManagerSwift
- JXPagingView/Paging
- JXSegmentedView
- Kanna (= 5.3.0)
- Kingfisher
- MarqueeLabel
- MJRefresh
@ -140,6 +142,7 @@ SPEC REPOS:
- IronSourceSDK
- JXPagingView
- JXSegmentedView
- Kanna
- Kingfisher
- MarqueeLabel
- MintegralAdSDK
@ -169,6 +172,7 @@ SPEC CHECKSUMS:
IronSourceSDK: 8e630747c09d8b1eb66ce2e195a10edd9a75f8b9
JXPagingView: afdd2e9af09c90160dd232b970d603cc6e7ddd0e
JXSegmentedView: 651b60fcf705258ba9395edd53876dbd2853fb68
Kanna: 6ecbd674bcbef2766a2acf80e99d1174440c5b9c
Kingfisher: b9c985d864d43515f404f1ef4a8ce7d802ace3ac
MarqueeLabel: 4b46d196abd253448e830cbd976f9eacc3af0849
MintegralAdSDK: 8b0223ac12dcbebb0c4162708a4bf6cf854a9673
@ -179,6 +183,6 @@ SPEC CHECKSUMS:
Tiercel: c0a73f876a72800333b15f4e7e48791f4ad21e90
VungleAds: 4823f53e691ba140ff21e3a3a6897af789832a36
PODFILE CHECKSUM: 5af34d4e7dc09fde7b668a4368b6fc382756eebd
PODFILE CHECKSUM: 4df4327040da736bde6647ecbba6849146db8046
COCOAPODS: 1.15.2

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E9F1FA0C67049A20F65A6CA9B0693FB4"
BuildableName = "kanna_privacy.bundle"
BlueprintName = "Kanna-kanna_privacy"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1500"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "93AC747EDE1EE56F89BBF405C1D67027"
BuildableName = "Kanna.framework"
BlueprintName = "Kanna"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@ -134,6 +134,16 @@
<key>isShown</key>
<false/>
</dict>
<key>Kanna-kanna_privacy.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>Kanna.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>Kingfisher-Kingfisher.xcscheme</key>
<dict>
<key>isShown</key>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>${PODS_DEVELOPMENT_LANGUAGE}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>5.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@ -0,0 +1,5 @@
#import <Foundation/Foundation.h>
@interface PodsDummy_Kanna : NSObject
@end
@implementation PodsDummy_Kanna
@end

View File

@ -0,0 +1,12 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif

View File

@ -0,0 +1,17 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#import "Kanna.h"
FOUNDATION_EXPORT double KannaVersionNumber;
FOUNDATION_EXPORT const unsigned char KannaVersionString[];

View File

@ -0,0 +1,16 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Kanna
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) $(SDKROOT)/usr/include/libxml2
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -l"xml2"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Kanna
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

View File

@ -0,0 +1,6 @@
framework module Kanna {
umbrella header "Kanna-umbrella.h"
export *
module * { export * }
}

View File

@ -0,0 +1,16 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Kanna
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) $(SDKROOT)/usr/include/libxml2
LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift
OTHER_LDFLAGS = $(inherited) -l"xml2"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE}
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Kanna
PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>${PODS_DEVELOPMENT_LANGUAGE}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>5.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@ -449,6 +449,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
## Kanna
The MIT License (MIT)
Copyright (c) 2014 - 2015 Atsushi Kiwaki (@_tid_)
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.
## Kingfisher
The MIT License (MIT)

View File

@ -566,6 +566,36 @@ SOFTWARE.
<key>FooterText</key>
<string>The MIT License (MIT)
Copyright (c) 2014 - 2015 Atsushi Kiwaki (@_tid_)
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.</string>
<key>License</key>
<string>MIT</string>
<key>Title</key>
<string>Kanna</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>FooterText</key>
<string>The MIT License (MIT)
Copyright (c) 2019 Wei Wang
Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -4,6 +4,7 @@ ${BUILT_PRODUCTS_DIR}/DownloadButton/DownloadButton.framework
${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework
${BUILT_PRODUCTS_DIR}/JXPagingView/JXPagingView.framework
${BUILT_PRODUCTS_DIR}/JXSegmentedView/JXSegmentedView.framework
${BUILT_PRODUCTS_DIR}/Kanna/Kanna.framework
${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework
${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework
${BUILT_PRODUCTS_DIR}/MarqueeLabel/MarqueeLabel.framework

View File

@ -3,6 +3,7 @@ ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DownloadButton.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JXPagingView.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JXSegmentedView.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kanna.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MarqueeLabel.framework

View File

@ -4,6 +4,7 @@ ${BUILT_PRODUCTS_DIR}/DownloadButton/DownloadButton.framework
${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework
${BUILT_PRODUCTS_DIR}/JXPagingView/JXPagingView.framework
${BUILT_PRODUCTS_DIR}/JXSegmentedView/JXSegmentedView.framework
${BUILT_PRODUCTS_DIR}/Kanna/Kanna.framework
${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework
${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework
${BUILT_PRODUCTS_DIR}/MarqueeLabel/MarqueeLabel.framework

View File

@ -3,6 +3,7 @@ ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DownloadButton.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IQKeyboardManagerSwift.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JXPagingView.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JXSegmentedView.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kanna.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework
${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MarqueeLabel.framework

View File

@ -181,6 +181,7 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework"
install_framework "${BUILT_PRODUCTS_DIR}/JXPagingView/JXPagingView.framework"
install_framework "${BUILT_PRODUCTS_DIR}/JXSegmentedView/JXSegmentedView.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Kanna/Kanna.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MarqueeLabel/MarqueeLabel.framework"
@ -196,6 +197,7 @@ if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework"
install_framework "${BUILT_PRODUCTS_DIR}/JXPagingView/JXPagingView.framework"
install_framework "${BUILT_PRODUCTS_DIR}/JXSegmentedView/JXSegmentedView.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Kanna/Kanna.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MarqueeLabel/MarqueeLabel.framework"

View File

@ -1,12 +1,12 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DownloadButton" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView" "${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/MarqueeLabel" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftDate" "${PODS_CONFIGURATION_BUILD_DIR}/Tiercel" "${PODS_ROOT}/Ads-Global/SDK" "${PODS_ROOT}/AppLovinSDK/applovin-ios-sdk-12.6.0" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalAFN" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalAPM" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalFoundation" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalGecko" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalHeader" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalNETWork" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalSDWebImage" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalYYModel" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalZFPlayer" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalZip" "${PODS_ROOT}/ChartboostSDK" "${PODS_ROOT}/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework" "${PODS_ROOT}/GoogleMobileAdsMediationAppLovin/AppLovinAdapter-12.6.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationChartboost/ChartboostAdapter-9.7.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationIronSource/IronSourceAdapter-8.2.0.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationMintegral/MintegralAdapter-7.6.8.0" "${PODS_ROOT}/GoogleMobileAdsMediationPangle/PangleAdapter-6.1.0.5.0" "${PODS_ROOT}/GoogleMobileAdsMediationVungle/LiftoffMonetizeAdapter-7.4.0.0" "${PODS_ROOT}/GoogleUserMessagingPlatform/Frameworks/Release" "${PODS_ROOT}/IronSourceSDK/IronSource" "${PODS_ROOT}/MintegralAdSDK/Fmk" "${PODS_ROOT}/VungleAds/static" "${PODS_XCFRAMEWORKS_BUILD_DIR}/Ads-Global/BUAdSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppLovinSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/ChartboostSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/Google-Mobile-Ads-SDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationAppLovin" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationChartboost" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationIronSource" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationMintegral" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationPangle" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationVungle" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleUserMessagingPlatform" "${PODS_XCFRAMEWORKS_BUILD_DIR}/IronSourceSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BannerAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BidNativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/InterstitialVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAdvancedAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NewInterstitialAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/RewardVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/SplashAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/VungleAds"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DownloadButton" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView" "${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView" "${PODS_CONFIGURATION_BUILD_DIR}/Kanna" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/MarqueeLabel" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftDate" "${PODS_CONFIGURATION_BUILD_DIR}/Tiercel" "${PODS_ROOT}/Ads-Global/SDK" "${PODS_ROOT}/AppLovinSDK/applovin-ios-sdk-12.6.0" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalAFN" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalAPM" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalFoundation" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalGecko" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalHeader" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalNETWork" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalSDWebImage" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalYYModel" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalZFPlayer" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalZip" "${PODS_ROOT}/ChartboostSDK" "${PODS_ROOT}/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework" "${PODS_ROOT}/GoogleMobileAdsMediationAppLovin/AppLovinAdapter-12.6.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationChartboost/ChartboostAdapter-9.7.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationIronSource/IronSourceAdapter-8.2.0.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationMintegral/MintegralAdapter-7.6.8.0" "${PODS_ROOT}/GoogleMobileAdsMediationPangle/PangleAdapter-6.1.0.5.0" "${PODS_ROOT}/GoogleMobileAdsMediationVungle/LiftoffMonetizeAdapter-7.4.0.0" "${PODS_ROOT}/GoogleUserMessagingPlatform/Frameworks/Release" "${PODS_ROOT}/IronSourceSDK/IronSource" "${PODS_ROOT}/MintegralAdSDK/Fmk" "${PODS_ROOT}/VungleAds/static" "${PODS_XCFRAMEWORKS_BUILD_DIR}/Ads-Global/BUAdSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppLovinSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/ChartboostSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/Google-Mobile-Ads-SDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationAppLovin" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationChartboost" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationIronSource" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationMintegral" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationPangle" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationVungle" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleUserMessagingPlatform" "${PODS_XCFRAMEWORKS_BUILD_DIR}/IronSourceSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BannerAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BidNativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/InterstitialVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAdvancedAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NewInterstitialAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/RewardVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/SplashAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/VungleAds"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DownloadButton/DownloadButton.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView/JXPagingView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView/JXSegmentedView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MarqueeLabel/MarqueeLabel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftDate/SwiftDate.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Tiercel/Tiercel.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BURelyFoundation_Global" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/AFNetworking/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/APM/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Foundation/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Gecko/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Header/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/NETWork/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/SDWebImage/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/YYModel/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/ZFPlayer/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Zip/Headers"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DownloadButton/DownloadButton.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView/JXPagingView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView/JXSegmentedView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kanna/Kanna.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MarqueeLabel/MarqueeLabel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftDate/SwiftDate.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Tiercel/Tiercel.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BURelyFoundation_Global" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/AFNetworking/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/APM/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Foundation/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Gecko/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Header/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/NETWork/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/SDWebImage/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/YYModel/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/ZFPlayer/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Zip/Headers" $(SDKROOT)/usr/include/libxml2
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/AFNetworking" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/APM" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Foundation" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Gecko" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Header" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/NETWork" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/SDWebImage" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/YYModel" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/ZFPlayer" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Zip" "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(SDKROOT)/usr/lib/swift
OTHER_LDFLAGS = $(inherited) -ObjC -l"BURelyFoundationGlobalAFN" -l"BURelyFoundationGlobalAPM" -l"BURelyFoundationGlobalFoundation" -l"BURelyFoundationGlobalGecko" -l"BURelyFoundationGlobalHeader" -l"BURelyFoundationGlobalNETWork" -l"BURelyFoundationGlobalSDWebImage" -l"BURelyFoundationGlobalYYModel" -l"BURelyFoundationGlobalZFPlayer" -l"BURelyFoundationGlobalZip" -l"bz2" -l"c++" -l"c++abi" -l"iconv" -l"resolv" -l"resolv.9" -l"sqlite3" -l"swiftCoreGraphics" -l"xml2" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "Alamofire" -framework "AppLovinAdapter" -framework "AppLovinSDK" -framework "AppTrackingTransparency" -framework "AudioToolbox" -framework "CFNetwork" -framework "ChartboostAdapter" -framework "ChartboostSDK" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreImage" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "DownloadButton" -framework "Foundation" -framework "GoogleMobileAds" -framework "IQKeyboardManagerSwift" -framework "ImageIO" -framework "IronSource" -framework "IronSourceAdapter" -framework "JXPagingView" -framework "JXSegmentedView" -framework "JavaScriptCore" -framework "Kingfisher" -framework "LiftoffMonetizeAdapter" -framework "MJRefresh" -framework "MTGSDK" -framework "MTGSDKBanner" -framework "MTGSDKBidding" -framework "MTGSDKInterstitialVideo" -framework "MTGSDKNativeAdvanced" -framework "MTGSDKNewInterstitial" -framework "MTGSDKReward" -framework "MTGSDKSplash" -framework "MarqueeLabel" -framework "MediaPlayer" -framework "MessageUI" -framework "MintegralAdapter" -framework "MobileCoreServices" -framework "PAGAdSDK" -framework "PangleAdapter" -framework "QuartzCore" -framework "SVProgressHUD" -framework "SafariServices" -framework "Security" -framework "SnapKit" -framework "StoreKit" -framework "SwiftDate" -framework "SystemConfiguration" -framework "Tiercel" -framework "UIKit" -framework "UserMessagingPlatform" -framework "VungleAdsSDK" -framework "WebKit" -weak_framework "AdSupport" -weak_framework "AppTrackingTransparency" -weak_framework "Combine" -weak_framework "CoreML" -weak_framework "DeviceCheck" -weak_framework "Foundation" -weak_framework "JavaScriptCore" -weak_framework "SafariServices" -weak_framework "SwiftUI" -weak_framework "UIKit" -weak_framework "WebKit"
OTHER_LDFLAGS = $(inherited) -ObjC -l"BURelyFoundationGlobalAFN" -l"BURelyFoundationGlobalAPM" -l"BURelyFoundationGlobalFoundation" -l"BURelyFoundationGlobalGecko" -l"BURelyFoundationGlobalHeader" -l"BURelyFoundationGlobalNETWork" -l"BURelyFoundationGlobalSDWebImage" -l"BURelyFoundationGlobalYYModel" -l"BURelyFoundationGlobalZFPlayer" -l"BURelyFoundationGlobalZip" -l"bz2" -l"c++" -l"c++abi" -l"iconv" -l"resolv" -l"resolv.9" -l"sqlite3" -l"swiftCoreGraphics" -l"xml2" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "Alamofire" -framework "AppLovinAdapter" -framework "AppLovinSDK" -framework "AppTrackingTransparency" -framework "AudioToolbox" -framework "CFNetwork" -framework "ChartboostAdapter" -framework "ChartboostSDK" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreImage" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "DownloadButton" -framework "Foundation" -framework "GoogleMobileAds" -framework "IQKeyboardManagerSwift" -framework "ImageIO" -framework "IronSource" -framework "IronSourceAdapter" -framework "JXPagingView" -framework "JXSegmentedView" -framework "JavaScriptCore" -framework "Kanna" -framework "Kingfisher" -framework "LiftoffMonetizeAdapter" -framework "MJRefresh" -framework "MTGSDK" -framework "MTGSDKBanner" -framework "MTGSDKBidding" -framework "MTGSDKInterstitialVideo" -framework "MTGSDKNativeAdvanced" -framework "MTGSDKNewInterstitial" -framework "MTGSDKReward" -framework "MTGSDKSplash" -framework "MarqueeLabel" -framework "MediaPlayer" -framework "MessageUI" -framework "MintegralAdapter" -framework "MobileCoreServices" -framework "PAGAdSDK" -framework "PangleAdapter" -framework "QuartzCore" -framework "SVProgressHUD" -framework "SafariServices" -framework "Security" -framework "SnapKit" -framework "StoreKit" -framework "SwiftDate" -framework "SystemConfiguration" -framework "Tiercel" -framework "UIKit" -framework "UserMessagingPlatform" -framework "VungleAdsSDK" -framework "WebKit" -weak_framework "AdSupport" -weak_framework "AppTrackingTransparency" -weak_framework "Combine" -weak_framework "CoreML" -weak_framework "DeviceCheck" -weak_framework "Foundation" -weak_framework "JavaScriptCore" -weak_framework "SafariServices" -weak_framework "SwiftUI" -weak_framework "UIKit" -weak_framework "WebKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@ -1,12 +1,12 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DownloadButton" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView" "${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/MarqueeLabel" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftDate" "${PODS_CONFIGURATION_BUILD_DIR}/Tiercel" "${PODS_ROOT}/Ads-Global/SDK" "${PODS_ROOT}/AppLovinSDK/applovin-ios-sdk-12.6.0" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalAFN" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalAPM" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalFoundation" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalGecko" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalHeader" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalNETWork" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalSDWebImage" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalYYModel" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalZFPlayer" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalZip" "${PODS_ROOT}/ChartboostSDK" "${PODS_ROOT}/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework" "${PODS_ROOT}/GoogleMobileAdsMediationAppLovin/AppLovinAdapter-12.6.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationChartboost/ChartboostAdapter-9.7.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationIronSource/IronSourceAdapter-8.2.0.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationMintegral/MintegralAdapter-7.6.8.0" "${PODS_ROOT}/GoogleMobileAdsMediationPangle/PangleAdapter-6.1.0.5.0" "${PODS_ROOT}/GoogleMobileAdsMediationVungle/LiftoffMonetizeAdapter-7.4.0.0" "${PODS_ROOT}/GoogleUserMessagingPlatform/Frameworks/Release" "${PODS_ROOT}/IronSourceSDK/IronSource" "${PODS_ROOT}/MintegralAdSDK/Fmk" "${PODS_ROOT}/VungleAds/static" "${PODS_XCFRAMEWORKS_BUILD_DIR}/Ads-Global/BUAdSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppLovinSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/ChartboostSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/Google-Mobile-Ads-SDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationAppLovin" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationChartboost" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationIronSource" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationMintegral" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationPangle" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationVungle" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleUserMessagingPlatform" "${PODS_XCFRAMEWORKS_BUILD_DIR}/IronSourceSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BannerAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BidNativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/InterstitialVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAdvancedAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NewInterstitialAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/RewardVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/SplashAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/VungleAds"
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire" "${PODS_CONFIGURATION_BUILD_DIR}/DownloadButton" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift" "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView" "${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView" "${PODS_CONFIGURATION_BUILD_DIR}/Kanna" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh" "${PODS_CONFIGURATION_BUILD_DIR}/MarqueeLabel" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftDate" "${PODS_CONFIGURATION_BUILD_DIR}/Tiercel" "${PODS_ROOT}/Ads-Global/SDK" "${PODS_ROOT}/AppLovinSDK/applovin-ios-sdk-12.6.0" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalAFN" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalAPM" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalFoundation" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalGecko" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalHeader" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalNETWork" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalSDWebImage" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalYYModel" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalZFPlayer" "${PODS_ROOT}/BURelyFoundation_Global/Frameworks/SDK/BURelyFoundationGlobalZip" "${PODS_ROOT}/ChartboostSDK" "${PODS_ROOT}/Google-Mobile-Ads-SDK/Frameworks/GoogleMobileAdsFramework" "${PODS_ROOT}/GoogleMobileAdsMediationAppLovin/AppLovinAdapter-12.6.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationChartboost/ChartboostAdapter-9.7.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationIronSource/IronSourceAdapter-8.2.0.0.0" "${PODS_ROOT}/GoogleMobileAdsMediationMintegral/MintegralAdapter-7.6.8.0" "${PODS_ROOT}/GoogleMobileAdsMediationPangle/PangleAdapter-6.1.0.5.0" "${PODS_ROOT}/GoogleMobileAdsMediationVungle/LiftoffMonetizeAdapter-7.4.0.0" "${PODS_ROOT}/GoogleUserMessagingPlatform/Frameworks/Release" "${PODS_ROOT}/IronSourceSDK/IronSource" "${PODS_ROOT}/MintegralAdSDK/Fmk" "${PODS_ROOT}/VungleAds/static" "${PODS_XCFRAMEWORKS_BUILD_DIR}/Ads-Global/BUAdSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/AppLovinSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/ChartboostSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/Google-Mobile-Ads-SDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationAppLovin" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationChartboost" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationIronSource" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationMintegral" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationPangle" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleMobileAdsMediationVungle" "${PODS_XCFRAMEWORKS_BUILD_DIR}/GoogleUserMessagingPlatform" "${PODS_XCFRAMEWORKS_BUILD_DIR}/IronSourceSDK" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BannerAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/BidNativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/InterstitialVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NativeAdvancedAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/NewInterstitialAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/RewardVideoAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/MintegralAdSDK/SplashAd" "${PODS_XCFRAMEWORKS_BUILD_DIR}/VungleAds"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DownloadButton/DownloadButton.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView/JXPagingView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView/JXSegmentedView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MarqueeLabel/MarqueeLabel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftDate/SwiftDate.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Tiercel/Tiercel.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BURelyFoundation_Global" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/AFNetworking/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/APM/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Foundation/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Gecko/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Header/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/NETWork/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/SDWebImage/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/YYModel/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/ZFPlayer/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Zip/Headers"
HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire/Alamofire.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/DownloadButton/DownloadButton.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JXPagingView/JXPagingView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/JXSegmentedView/JXSegmentedView.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kanna/Kanna.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Kingfisher/Kingfisher.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MJRefresh/MJRefresh.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MarqueeLabel/MarqueeLabel.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SVProgressHUD/SVProgressHUD.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SnapKit/SnapKit.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/SwiftDate/SwiftDate.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Tiercel/Tiercel.framework/Headers" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/BURelyFoundation_Global" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/AFNetworking/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/APM/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Foundation/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Gecko/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Header/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/NETWork/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/SDWebImage/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/YYModel/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/ZFPlayer/Headers" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Zip/Headers" $(SDKROOT)/usr/include/libxml2
LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks'
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/AFNetworking" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/APM" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Foundation" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Gecko" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Header" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/NETWork" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/SDWebImage" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/YYModel" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/ZFPlayer" "${PODS_XCFRAMEWORKS_BUILD_DIR}/BURelyFoundation_Global/Zip" "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift $(SDKROOT)/usr/lib/swift
OTHER_LDFLAGS = $(inherited) -ObjC -l"BURelyFoundationGlobalAFN" -l"BURelyFoundationGlobalAPM" -l"BURelyFoundationGlobalFoundation" -l"BURelyFoundationGlobalGecko" -l"BURelyFoundationGlobalHeader" -l"BURelyFoundationGlobalNETWork" -l"BURelyFoundationGlobalSDWebImage" -l"BURelyFoundationGlobalYYModel" -l"BURelyFoundationGlobalZFPlayer" -l"BURelyFoundationGlobalZip" -l"bz2" -l"c++" -l"c++abi" -l"iconv" -l"resolv" -l"resolv.9" -l"sqlite3" -l"swiftCoreGraphics" -l"xml2" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "Alamofire" -framework "AppLovinAdapter" -framework "AppLovinSDK" -framework "AppTrackingTransparency" -framework "AudioToolbox" -framework "CFNetwork" -framework "ChartboostAdapter" -framework "ChartboostSDK" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreImage" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "DownloadButton" -framework "Foundation" -framework "GoogleMobileAds" -framework "IQKeyboardManagerSwift" -framework "ImageIO" -framework "IronSource" -framework "IronSourceAdapter" -framework "JXPagingView" -framework "JXSegmentedView" -framework "JavaScriptCore" -framework "Kingfisher" -framework "LiftoffMonetizeAdapter" -framework "MJRefresh" -framework "MTGSDK" -framework "MTGSDKBanner" -framework "MTGSDKBidding" -framework "MTGSDKInterstitialVideo" -framework "MTGSDKNativeAdvanced" -framework "MTGSDKNewInterstitial" -framework "MTGSDKReward" -framework "MTGSDKSplash" -framework "MarqueeLabel" -framework "MediaPlayer" -framework "MessageUI" -framework "MintegralAdapter" -framework "MobileCoreServices" -framework "PAGAdSDK" -framework "PangleAdapter" -framework "QuartzCore" -framework "SVProgressHUD" -framework "SafariServices" -framework "Security" -framework "SnapKit" -framework "StoreKit" -framework "SwiftDate" -framework "SystemConfiguration" -framework "Tiercel" -framework "UIKit" -framework "UserMessagingPlatform" -framework "VungleAdsSDK" -framework "WebKit" -weak_framework "AdSupport" -weak_framework "AppTrackingTransparency" -weak_framework "Combine" -weak_framework "CoreML" -weak_framework "DeviceCheck" -weak_framework "Foundation" -weak_framework "JavaScriptCore" -weak_framework "SafariServices" -weak_framework "SwiftUI" -weak_framework "UIKit" -weak_framework "WebKit"
OTHER_LDFLAGS = $(inherited) -ObjC -l"BURelyFoundationGlobalAFN" -l"BURelyFoundationGlobalAPM" -l"BURelyFoundationGlobalFoundation" -l"BURelyFoundationGlobalGecko" -l"BURelyFoundationGlobalHeader" -l"BURelyFoundationGlobalNETWork" -l"BURelyFoundationGlobalSDWebImage" -l"BURelyFoundationGlobalYYModel" -l"BURelyFoundationGlobalZFPlayer" -l"BURelyFoundationGlobalZip" -l"bz2" -l"c++" -l"c++abi" -l"iconv" -l"resolv" -l"resolv.9" -l"sqlite3" -l"swiftCoreGraphics" -l"xml2" -l"z" -framework "AVFoundation" -framework "Accelerate" -framework "AdSupport" -framework "Alamofire" -framework "AppLovinAdapter" -framework "AppLovinSDK" -framework "AppTrackingTransparency" -framework "AudioToolbox" -framework "CFNetwork" -framework "ChartboostAdapter" -framework "ChartboostSDK" -framework "CoreFoundation" -framework "CoreGraphics" -framework "CoreImage" -framework "CoreMedia" -framework "CoreMotion" -framework "CoreServices" -framework "CoreTelephony" -framework "CoreText" -framework "CoreVideo" -framework "DownloadButton" -framework "Foundation" -framework "GoogleMobileAds" -framework "IQKeyboardManagerSwift" -framework "ImageIO" -framework "IronSource" -framework "IronSourceAdapter" -framework "JXPagingView" -framework "JXSegmentedView" -framework "JavaScriptCore" -framework "Kanna" -framework "Kingfisher" -framework "LiftoffMonetizeAdapter" -framework "MJRefresh" -framework "MTGSDK" -framework "MTGSDKBanner" -framework "MTGSDKBidding" -framework "MTGSDKInterstitialVideo" -framework "MTGSDKNativeAdvanced" -framework "MTGSDKNewInterstitial" -framework "MTGSDKReward" -framework "MTGSDKSplash" -framework "MarqueeLabel" -framework "MediaPlayer" -framework "MessageUI" -framework "MintegralAdapter" -framework "MobileCoreServices" -framework "PAGAdSDK" -framework "PangleAdapter" -framework "QuartzCore" -framework "SVProgressHUD" -framework "SafariServices" -framework "Security" -framework "SnapKit" -framework "StoreKit" -framework "SwiftDate" -framework "SystemConfiguration" -framework "Tiercel" -framework "UIKit" -framework "UserMessagingPlatform" -framework "VungleAdsSDK" -framework "WebKit" -weak_framework "AdSupport" -weak_framework "AppTrackingTransparency" -weak_framework "Combine" -weak_framework "CoreML" -weak_framework "DeviceCheck" -weak_framework "Foundation" -weak_framework "JavaScriptCore" -weak_framework "SafariServices" -weak_framework "SwiftUI" -weak_framework "UIKit" -weak_framework "WebKit"
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

View File

@ -26,6 +26,7 @@
CB0D33972C7EF73700C85816 /* MPPositive_PersonalListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0D33962C7EF73700C85816 /* MPPositive_PersonalListViewModel.swift */; };
CB0D339B2C7F2AAC00C85816 /* MPPositive_PersonalisedRecommendationsTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB0D339A2C7F2AAC00C85816 /* MPPositive_PersonalisedRecommendationsTableViewCell.swift */; };
CB108C872C901A5E0017C40F /* MP_LuxServerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB108C862C901A5E0017C40F /* MP_LuxServerManager.swift */; };
CB1182932CA8EF5A00BAEDC0 /* MP_DownloadButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB1182922CA8EF5A00BAEDC0 /* MP_DownloadButton.swift */; };
CB15B89B2C353B2400756E89 /* MP_GuideViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB15B8992C353B2400756E89 /* MP_GuideViewController.swift */; };
CB15B89C2C353B2400756E89 /* MP_GuideViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CB15B89A2C353B2400756E89 /* MP_GuideViewController.xib */; };
CB1E3B662C23DA8500071DEA /* MPPositive_CustomPlayListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB1E3B652C23DA8500071DEA /* MPPositive_CustomPlayListModel.swift */; };
@ -308,6 +309,7 @@
CB0D33962C7EF73700C85816 /* MPPositive_PersonalListViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPPositive_PersonalListViewModel.swift; sourceTree = "<group>"; };
CB0D339A2C7F2AAC00C85816 /* MPPositive_PersonalisedRecommendationsTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPPositive_PersonalisedRecommendationsTableViewCell.swift; sourceTree = "<group>"; };
CB108C862C901A5E0017C40F /* MP_LuxServerManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MP_LuxServerManager.swift; sourceTree = "<group>"; };
CB1182922CA8EF5A00BAEDC0 /* MP_DownloadButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MP_DownloadButton.swift; sourceTree = "<group>"; };
CB15B8992C353B2400756E89 /* MP_GuideViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MP_GuideViewController.swift; sourceTree = "<group>"; };
CB15B89A2C353B2400756E89 /* MP_GuideViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MP_GuideViewController.xib; sourceTree = "<group>"; };
CB1E3B652C23DA8500071DEA /* MPPositive_CustomPlayListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MPPositive_CustomPlayListModel.swift; sourceTree = "<group>"; };
@ -776,6 +778,7 @@
CBAFCA212C0A10500054500E /* MP_CacheManager.swift */,
CBAFCA232C0A10500054500E /* MP_CoreDataHandlerManager.swift */,
CBAFCA242C0A10500054500E /* MP_DownloadManager.swift */,
CB1182922CA8EF5A00BAEDC0 /* MP_DownloadButton.swift */,
CBAFCA252C0A10500054500E /* MP_HUD.swift */,
CBAFCA262C0A10500054500E /* MP_LocationManager.swift */,
CBAFCA292C0A10500054500E /* MP_PlayerSlider.swift */,
@ -1522,6 +1525,7 @@
CBAFCB652C0A10500054500E /* MPPositive_HomeListThirdCollectionViewCell.swift in Sources */,
CBAFCB472C0A10500054500E /* MPPositive_LoveArtistsViewController.swift in Sources */,
CBAFCAF62C0A10500054500E /* InstanceFromNib.swift in Sources */,
CB1182932CA8EF5A00BAEDC0 /* MP_DownloadButton.swift in Sources */,
CBD344DE2C3FD8230095F18F /* MPPositive_GridViewModel.swift in Sources */,
CBAFCB622C0A10500054500E /* MPPositive_HomeListFirstCollectionViewCell.swift in Sources */,
CBC5E51D2C7D82A200336746 /* MPPositive_RecentlyModel.swift in Sources */,
@ -1923,7 +1927,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1.2.2.1;
CURRENT_PROJECT_VERSION = 1.2.3.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RAQJ4FNZUH;
@ -1944,7 +1948,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.2;
MARKETING_VERSION = 1.2.3;
PRODUCT_BUNDLE_IDENTIFIER = relax.offline.mp3.music;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1969,7 +1973,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 1.2.2.1;
CURRENT_PROJECT_VERSION = 1.2.3.1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RAQJ4FNZUH;
@ -1990,7 +1994,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.2.2;
MARKETING_VERSION = 1.2.3;
PRODUCT_BUNDLE_IDENTIFIER = relax.offline.mp3.music;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -42,6 +42,13 @@ extension String {
func localizableString() -> String {
return NSLocalizedString(self, comment: "")
}
///
func textRegular(with regex: String) -> [[String]] {
let new = self as NSString
return (try? NSRegularExpression(pattern: regex, options: []))?.matches(in: self, options: [], range: NSMakeRange(0, new.length)).map { match in
(0..<match.numberOfRanges).map { match.range(at: $0).location == NSNotFound ? "" : new.substring(with: match.range(at: $0)) }
} ?? []
}
}
extension Range where Bound == String.Index {
func toNSRange(in string: String) -> NSRange {
@ -83,4 +90,5 @@ extension UILabel {
}
}
}
}

View File

@ -231,6 +231,9 @@ func coreDefaultValues() {
if UserDefaults.standard.object(forKey: "IntermediaryDuration") == nil {
UserDefaults.standard.set(40, forKey: "IntermediaryDuration")
}
if UserDefaults.standard.object(forKey: "isShowDownload") == nil {
UserDefaults.standard.set(true, forKey: "isShowDownload")
}
}
}
///广Data

View File

@ -54,6 +54,14 @@ class MP_ADSimpleManager: NSObject {
return true
}
}
///广
private var isMuted:Bool {
if let bool = UserDefaults.standard.object(forKey: "isAdMuted") as? Bool {
return bool
}else {
return false
}
}
///使广
var internalAdStatus:Bool = true
///广
@ -82,7 +90,10 @@ class MP_ADSimpleManager: NSObject {
super.init()
NotificationCenter.notificationKey.add(observer: self, selector: #selector(netWorkReachableAction(_:)), notificationName: .net_switch_reachable)
DispatchQueue.main.async {
//
GADMobileAds.sharedInstance().audioVideoManager.audioSessionIsApplicationManaged = true
//广0.8
GADMobileAds.sharedInstance().applicationVolume = 0.8
}
}
deinit{
@ -90,6 +101,10 @@ class MP_ADSimpleManager: NSObject {
}
///广
func isAdMuted() {
guard isMuted == true else {
return
}
//
DispatchQueue.main.async {
if MP_PlayerManager.shared.getPlayState() == .Playing {
if GADMobileAds.sharedInstance().applicationMuted == false {
@ -99,16 +114,20 @@ class MP_ADSimpleManager: NSObject {
}
}else {
GADMobileAds.sharedInstance().applicationMuted = false
GADMobileAds.sharedInstance().applicationVolume = 1
GADMobileAds.sharedInstance().applicationVolume = 0.8
print("没有播放,不需要静音广告")
}
}
}
///广
func isAdSounded() {
guard isMuted == true else {
return
}
DispatchQueue.main.async {
if GADMobileAds.sharedInstance().applicationMuted == true {
GADMobileAds.sharedInstance().applicationMuted = false
GADMobileAds.sharedInstance().applicationVolume = 0.8
print("加载广告时恢复广告声音配置")
}
}

View File

@ -172,14 +172,14 @@ class MP_AnalyticsManager: NSObject {
MP_NetWorkManager.shared.setTrashVideoIds(trashVideoIDs)
}
//
if let versionData = self.remoteConfig.configValue(forKey: "dataVersion").jsonValue as? [String:String] {
//
for (key, value) in versionData {
UserDefaults.standard.setValue(value, forKey: key)
}
print("更新了所有版本数据")
MP_NetWorkManager.shared.reloadVersion()
if let playerContextVersion = self.remoteConfig.configValue(forKey: "playerContextVersion").jsonValue as? [String:Any] {
print("更新了播放器资源抓取版本配置")
UserDefaults.standard.set(playerContextVersion, forKey: "playerContextVersion")
}
//广
let isAdMuted = self.remoteConfig.configValue(forKey: "isAdMuted").boolValue
UserDefaults.standard.set(isAdMuted, forKey: "isAdMuted")
print("更新了广告静音配置")
//
if let notificationBodyTexts = self.remoteConfig.configValue(forKey: "notificationBodyTexts").jsonValue as? [String:[String]] {
//
@ -194,6 +194,10 @@ class MP_AnalyticsManager: NSObject {
let platform = self.remoteConfig.configValue(forKey: "platform").boolValue
print("广告平台为\(platform ? "AppLovin":"AdMob")")
UserDefaults.standard.set(platform, forKey: "platform")
//
let statu = self.remoteConfig.configValue(forKey: "isShowDownload").boolValue
print("当前下载按钮\(statu ? "可展示":"不可展示")")
UserDefaults.standard.set(statu, forKey: "isShowDownload")
//
if let updateReminder = self.remoteConfig.configValue(forKey: "updateReminder").jsonValue as? [String:Any] {
//

View File

@ -193,8 +193,8 @@ class MP_AppLovinManager: NSObject {
let initConfig = ALSdkInitializationConfiguration(sdkKey: SDKKey) { builder in
builder.mediationProvider = ALMediationProviderMAX
}
//
ALSdk.shared().settings.isMuted = true
// //
// ALSdk.shared().settings.isMuted = true
ALSdk.shared().settings.userIdentifier = app_UUID
//AppLovin
ALSdk.shared().initialize(with: initConfig)

View File

@ -0,0 +1,54 @@
//
// MP_DownloadButton.swift
// relax.offline.mp3.music
//
// Created by Mr.Zhou on 2024/9/29.
//
import UIKit
import DownloadButton
///
class MP_DownloadButton: PKDownloadButton {
//()
private var isShow:Bool {
if let statu = UserDefaults.standard.object(forKey: "isShowDownload") as? Bool {
return statu
}else {
return true
}
}
//
private var _isHidden: Bool = false
///
override var isHidden: Bool{
set{
if isShow {
//
_isHidden = newValue
super.isHidden = newValue
}else {
//
}
}
get {
if isShow {
//
return _isHidden
}else {
//
startDownloadButton.isHidden = true
downloadedButton.isHidden = true
stopDownloadButton.isHidden = true
pendingView.isHidden = true
return true
}
}
}
override init(frame: CGRect) {
super.init(frame: frame)
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
}

View File

@ -292,16 +292,20 @@ class MP_DownloadManager: NSObject {
loadQueue.async {
[weak self] in
guard let self = self else {return}
if let tasks = downloadTasks, let taskData = tasks[videoIdString] {
// downloadTasks
guard let tasks = self.downloadTasks else {
print("No download tasks available.")
completion?(false)
return
}
// videoId
if let taskData = tasks[videoIdString] {
completion?(taskData.status == .downloading)
}else {
} else {
print("No active task found for videoId: \(videoIdString)")
completion?(false)
}
}
// if let task = downloadTasks as? [String: TaskStatu], let taskData = task[videoIdString] {
// return taskData.status == .downloading
// }
// return false
}
///
func getProgress(for videoId: String?, completion:((CGFloat?) -> Void)?){

View File

@ -9,6 +9,7 @@ import UIKit
import Network
import Alamofire
import AVFoundation
import Kanna
///
typealias BrowseRequestStateBlock = (_ browse:[MPPositive_BrowseModuleListViewModel]) -> Void
///
@ -23,7 +24,10 @@ struct ContinuationAndItct {
///
var itct:String
}
///API
struct NetInnertube: Codable {
let INNERTUBE_API_KEY: String
}
///
class MP_NetWorkManager: NSObject {
//
@ -86,18 +90,6 @@ class MP_NetWorkManager: NSObject {
private let search = "/search"
///YouTuBe
private let youTubeKeys:[String] = ["MUSIC_VIDEO_TYPE_ATV","MUSIC_VIDEO_TYPE_OMV","MUSIC_PAGE_TYPE_ALBUM","MUSIC_PAGE_TYPE_ARTIST","MUSIC_PAGE_TYPE_PLAYLIST","MUSIC_PAGE_TYPE_TRACK_LYRICS","MUSIC_PAGE_TYPE_TRACK_RELATED"]
///
private var clientVersion:String!
///
private var playerVersion:String!
///IP
private let banIPs:[String] = [
// "CN",
// "HK",
// "TW",
// "JP",
// "KR"
]
///访YoutubeCode
private let ISOs:[String] = ["DZ","LB","AS","LY","AR","LI","AW","LT","AU","LU","AT","MY","AZ","MT","BH","MX","BD","MA","BY","NP","BE","NL","BM","NZ","BO","NI","BA","NG","BR","MK","BG","MP","KH","NO","CA","OM","KY","PK","CL","PA","CO","PG","CR","PY","HR","PE","CY","PH","CZ","PL","DK","PT","DO","PR","EC","QA","EG","RE","SV","RO","EE","FI","SA","FR","SN","GF","RS","PF","SG","GE","SK","DE","SI","GH","ZA","GR","KR","GP","ES","GU","LK","GT","SE","HN","CH","HK","TW","HU","TZ","IS","TH","IN","TN","ID","IQ","TC","IE","VI","IL","UG","IT","UA","JM","AE","JP","GB","JO","US","KZ","UY","KE","VE","KW","VN","LA","YE","LV","ZW"]
///访Code
@ -105,6 +97,7 @@ class MP_NetWorkManager: NSObject {
"CL","GB","ID","IN","IT","IL","HU","NZ","ES","UY","UA","UG","GT","TR","TZ","SA","RS","SV","CH","SE","JP","PT","NO","NG","NI","ZA","MX","PE","US","RO","LU","KE","ZW","CZ","CA","HN","NL","KR","CR","CO","FI","FR","EC","RU","DO","DK","BO","PL","IS","BE","BR","PA","PY","AU","AT","EE","IE","EG","AE","AR","ZZ"
]
///
private var trashKeyWords:[String] = []
///
@ -157,10 +150,70 @@ class MP_NetWorkManager: NSObject {
}
}
//MARK: -
//访
private var visitorData:String?
//
private lazy var currTimeDate:String = (Date().timeZone() - 7.days).toString(.custom("YYYYMMdd"))
///
private var browseContext:[String:Any]{
let client = ["client":browseClient]
return ["context":client]
}
///访
private var browseClient:[String:String]{
if let text = visitorData, text.isEmpty == false {
//
return ["clientName":"WEB_REMIX",
"clientVersion":"1.\(currTimeDate).01.00",
"hl":Language_first_local,
"gl":locaton ?? "US",
"visitorData":text]
}else {
//访
return ["clientName":"WEB_REMIX",
"clientVersion":"1.\(currTimeDate).01.00",
"hl":Language_first_local,
"gl":locaton ?? "US"]
}
}
///
private var resourceContext:[String:Any]{
if let playerContextVersion = UserDefaults.standard.object(forKey: "playerContextVersion") as? [String:Any] {
return playerContextVersion
}else {
return [
"context":[
"client":[
"clientName": "ANDROID",
"clientVersion": "19.05.36",
"hl": "en",
"gl": "US"
]
],
"params": "CgIQBg"
]
}
}
///访
private var visitorData:String?{
if let text = UserDefaults.standard.string(forKey: "Visitor_Data") {
return text
}else {
return nil
}
}
///API
private var netKeyCode:String{
if let key = UserDefaults.standard.string(forKey: "YBMNetKeyCode") {
return key
}else {
//使
return "AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8"
}
}
//
private var currTimeDate:String{
return (Date().timeZone() - 1.days).toString(.custom("YYYYMMdd"))
}
///
private var locaton:String? = "US"
//
@ -181,19 +234,27 @@ class MP_NetWorkManager: NSObject {
private override init() {
self.monitor = NWPathMonitor()
super.init()
reloadVersion()
// if let string = UserDefaults.standard.string(forKey: "Visitor_Data") {
// self.visitorData = string
// }
}
//
func reloadVersion() {
if let cv = UserDefaults.standard.string(forKey: "ClientVersion") {
print("成功更新数据版本")
clientVersion = cv
///API
func requestYBMAPIKeyCode() {
AF.request("https://www.youtube.com").responseString { [weak self] response in
guard let self = self else { return }
if let html = response.value {
if let doc = try? HTML(html: html, encoding: .utf8) {
if let text = doc.xpath("//script[contains(., 'INNERTUBE_API_KEY')]/text()").first?.text {
if let results = text.textRegular(with: "ytcfg.set\\((\\{.*?\\})\\)").last?.last {
if let data = results.data(using: .utf8), let model = try? JSONDecoder().decode(NetInnertube.self, from: data) {
let key = model.INNERTUBE_API_KEY
if key.isEmpty == false {
print("更新了网页API密钥")
//
UserDefaults.standard.set(key, forKey: "YBMNetKeyCode")
}
}
}
}
}
}
if let pv = UserDefaults.standard.string(forKey: "PlayerVersion") {
playerVersion = pv
}
}
@ -299,13 +360,7 @@ extension MP_NetWorkManager {
}else {
locaton = "US"
}
if banIPs.contains(code) == true {
//
completion(false)
}else {
//
completion(true)
}
case .failure(let error):
//
handleError(url, error: error)
@ -323,63 +378,31 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//IDcontinuation
let parameters:[String:Any] = [
"browseId": "FEmusic_home",
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData ?? "",
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = "FEmusic_home"
//guard netWorkStatu != .notReachable else {return}
requestPostHomeBrowse(url, parameters: parameters)
}
//
func requestContinuationBrowseDatas() {
//
guard let continuation = continuationAndItct?.continuation, let itct = continuationAndItct?.itct, let url = URL(string: header+point+browse) else {
guard let continuation = continuationAndItct?.continuation, let itct = continuationAndItct?.itct, let pathUrl = URL(string: header+point+browse), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
//,
print("首页数据已经加载完毕")
NotificationCenter.notificationKey.post(notificationName: .positive_browses_completion)
return
}
//
let parameters:[String:Any] = [
"ctoken":continuation,
"continuation":continuation,
"type":"next",
"itct":itct,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
"visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "HK"
]
]
]
var parameters:[String:Any] = browseContext
parameters["ctoken"] = continuation
parameters["continuation"] = continuation
parameters["type"] = "next"
parameters["itct"] = itct
//
requestPostHomeBrowse(url, parameters: parameters)
}
@ -393,7 +416,7 @@ extension MP_NetWorkManager {
if let data = value.responseContext?.visitorData {
if data != self.visitorData {
print("Visitor_Data更改了")
self.visitorData = data
UserDefaults.standard.set(data, forKey: "Visitor_Data")
}
}
//
@ -426,7 +449,7 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
@ -436,26 +459,11 @@ extension MP_NetWorkManager {
//US
code = "US"
}
let parameters:[String:Any] = [
"browseId": "FEmusic_charts",
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
],
"formData":[
"selectedValues":[code]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = "FEmusic_charts"
let formData = ["selectedValues":[code]]
parameters["formData"] = formData
requestPostArtistsRank(url, parameters: parameters)
}
///
@ -479,30 +487,14 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
let parameters:[String:Any] = [
"browseId": "FEmusic_charts",
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
],
"formData":[
"selectedValues":["US"]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = "FEmusic_charts"
let formData = ["selectedValues":["US"]]
parameters["formData"] = formData
requestPostChartsUS(url, parameters: parameters)
}
///
@ -530,33 +522,14 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//browseIdparams
let parameters:[String:Any] = [
"browseId":browseId,
"params":params,
"prettyPrint":"false",
// "clickTracking":[
// "clickTrackingParams": clickTrackingParams ?? ""
// ],
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = browseId
parameters["params"] = params
// //guard netWorkStatu != .notReachable else {return}
requestPostAlbumOrList(url, parameters: parameters) { results in
comletion(results)
@ -598,32 +571,13 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//browseIdparams
let parameters:[String:Any] = [
"browseId":browseId,
"prettyPrint":"false",
// "clickTracking":[
// "clickTrackingParams": clickTrackingParams ?? ""
// ],
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = browseId
//guard netWorkStatu != .notReachable else {return}
requestPostArtist(url, parameters: parameters) { result in
comletion(result)
@ -656,30 +610,15 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//browseIdparams
let parameters:[String:Any] = [
"browseId":browseId,
"params":params,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = browseId
parameters["params"] = params
//guard netWorkStatu != .notReachable else {return}
requestPostArtistMore(url, parameters: parameters) { result in
comletion(result)
@ -707,32 +646,17 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//browseIdparams
let parameters:[String:Any] = [
"continuation":continuation,
"ctoken":continuation,
"type":"next",
"itct":itct,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["continuation"] = continuation
parameters["ctoken"] = continuation
parameters["type"] = "next"
parameters["itct"] = itct
//guard netWorkStatu != .notReachable else {return}
requestPostArtistMoreContinuation(url, parameters: parameters) { result in
comletion(result)
@ -760,28 +684,14 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//
let parameters:[String:Any] = [
"browseId": "FEmusic_moods_and_genres",
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = "FEmusic_moods_and_genres"
requestPostGenres(url, parameters: parameters) { array in
completion(array)
}
@ -808,29 +718,15 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//
let parameters:[String:Any] = [
"browseId": browseId,
"params":params,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = browseId
parameters["params"] = params
requestPostMoodDetails(url, parameters: parameters) { array in
completion(array)
}
@ -862,33 +758,15 @@ extension MP_NetWorkManager {
//next
let path = header+point+next
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//videoIdparams
let parameters:[String:Any] = [
"playlistId":browseId,
"videoId":videoId,
"prettyPrint":"false",
"clickTracking":[
"clickTrackingParams": clickTrackingParams ?? ""
],
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["playlistId"] = browseId
parameters["videoId"] = videoId
//guard netWorkStatu != .notReachable else {return}
requestPostNextList(url, parameters: parameters) { listSongs in
//
@ -921,29 +799,14 @@ extension MP_NetWorkManager {
//next
let path = header+point+next
//url
guard let url = URL(string: path), let videoId = item.videoId else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url, let videoId = item.videoId else {
print("Url is Incorrect")
return
}
//videoIdparams
let parameters:[String:Any] = [
"videoId":videoId,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
//"visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["videoId"] = videoId
//guard netWorkStatu != .notReachable else {return}
requestPostNextLyricsAndRelated(url, videoId: videoId, parameters: parameters) { result in
completion(result)
@ -981,28 +844,13 @@ extension MP_NetWorkManager {
//player
let path = header+point+player
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//videoIdparams
let parameters:[String:Any] = [
"videoId":videoId,
"prettyPrint":"false",
// "clickTracking":[
// "clickTrackingParams": clickTrackingParams ?? ""
// ],
"context":[
"client":[
"clientName": "ANDROID_MUSIC",
// "visitorData":visitorData,
"clientVersion": playerVersion,
"platform":"MOBILE",
"browserVersion":"125.0.0.0",
]
]
]
var parameters:[String:Any] = resourceContext
parameters["videoId"] = videoId
//guard netWorkStatu != .notReachable else {return}
requestAndroidPostPlayer(url, videoId: videoId, parameters: parameters){ resourceUlrs, coverUrls in
completion(resourceUlrs, coverUrls)
@ -1103,29 +951,14 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//browseIdparams
let parameters:[String:Any] = [
"browseId":lyricId,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
//"visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = lyricId
//guard netWorkStatu != .notReachable else {return}
requestPostLyric(url, parameters: parameters) { lyrics in
completion(lyrics)
@ -1150,29 +983,13 @@ extension MP_NetWorkManager {
//browse
let path = header+point+browse
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//browseIdparams
let parameters:[String:Any] = [
"browseId":browseId,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
//"visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["browseId"] = browseId
guard netWorkStatu != .notReachable else {
completion([])
@ -1213,24 +1030,9 @@ extension MP_NetWorkManager {
return
}
//
let parameters:[String:Any] = [
"input":content,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
//"visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["input"] = content
//guard netWorkStatu != .notReachable else {return}
requestPostSearchSuggestions(url, parameters: parameters) { result in
completion(result)
@ -1259,7 +1061,7 @@ extension MP_NetWorkManager {
//
let path = header+point+search
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
@ -1273,24 +1075,8 @@ extension MP_NetWorkManager {
return
}
//
let parameters:[String:Any] = [
"query":text,
"prettyPrint":"false",
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["query"] = text
//guard netWorkStatu != .notReachable else {return}
requestPostSearchPreviewResults(url, parameters: parameters) { result in
completion(result)
@ -1329,30 +1115,15 @@ extension MP_NetWorkManager {
//
let path = header+point+search
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//
let parameters:[String:Any] = [
"query":query,
"prettyPrint":"false",
"params":params,
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"DESKTOP",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["query"] = query
parameters["params"] = params
//guard netWorkStatu != .notReachable else {return}
requestPostSearchTypeResults(url, parameters: parameters) { result in
completion(result)
@ -1390,32 +1161,17 @@ extension MP_NetWorkManager {
//
let path = header+point+search
//url
guard let url = URL(string: path) else {
guard let pathUrl = URL(string: path), let url = try? URLEncoding.default.encode(URLRequest(url: pathUrl), with: ["key":netKeyCode]).url else {
print("Url is Incorrect")
return
}
//
let parameters:[String:Any] = [
"ctoken":continuation,
"continuation":continuation,
"type":"next",
"itct":itct,
"prettyPrint":false,
"context":[
"client":[
//web
"clientName": "WEB_REMIX",
// "visitorData":visitorData,
//访
"clientVersion": clientVersion,
"platform":"MOBILE",
//
"hl":Language_first_local,
//
"gl":locaton ?? "US"
]
]
]
var parameters:[String:Any] = browseContext
parameters["ctoken"] = continuation
parameters["continuation"] = continuation
parameters["type"] = "next"
parameters["itct"] = itct
//guard netWorkStatu != .notReachable else {return}
requestPostSearchTypeContinuation(url, parameters: parameters) { result in
completion(result)

View File

@ -28,7 +28,7 @@ class MPPositive_BrowseItemViewModel: NSObject, Codable {
if let url = URL(string: browseItem.coverUrls?.last ?? "") {
self.coverUrl = url
}else {
print("No Cover")
// print("No Cover")
}
//
title = browseItem.title

View File

@ -27,7 +27,7 @@ class MPPositive_ListHeaderViewModel: NSObject {
if let url = URL(string: header.coverUrl ?? "") {
self.coverUrl = url
}else {
print("No Cover")
// print("No Cover")
}
//
title = header.maintitle

View File

@ -74,6 +74,14 @@ class MPPositive_MoreSongOperationsViewController: UIViewController, UIViewContr
}
}
private var playList:MPPositive_CustomPlayListModel?
////
private var isShowDownload:Bool {
if let statu = UserDefaults.standard.object(forKey: "isShowDownload") as? Bool {
return statu
}else {
return true
}
}
var removeBlock:(() -> Void)?
var disMissBlock:(() -> Void)?
var collectionBlock:(() -> Void)?
@ -354,9 +362,10 @@ class MPPositive_MoreSongOperationsViewController: UIViewController, UIViewContr
//MARK: - tableView
extension MPPositive_MoreSongOperationsViewController:UITableViewDataSource, UITableViewDelegate {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 4
return isShowDownload ? 4:3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if isShowDownload {
switch indexPath.row {
case 0:
let cell = tableView.dequeueReusableCell(withIdentifier: MPPositive_MoreOperationDownLoadTableViewCellID, for: indexPath) as! MPPositive_MoreOperationDownLoadTableViewCell
@ -376,8 +385,21 @@ extension MPPositive_MoreSongOperationsViewController:UITableViewDataSource, UIT
}
return cell
}
}else {
let cell = tableView.dequeueReusableCell(withIdentifier: MPPositive_MoreOperationShowTableViewCellID, for: indexPath) as! MPPositive_MoreOperationShowTableViewCell
switch indexPath.row {
case 0:
cell.title = playList != nil ? "Remove from playlist":"Add to playlist"
case 1:
cell.title = "Play next"
default:
cell.title = "Report"
}
return cell
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if isShowDownload {
switch indexPath.row {
case 0:
let cell = tableView.cellForRow(at: indexPath) as? MPPositive_MoreOperationDownLoadTableViewCell
@ -478,7 +500,53 @@ extension MPPositive_MoreSongOperationsViewController:UITableViewDataSource, UIT
default://
MP_HUD.onlytext("Your report has been submitted and we will process it as soon as possible.".localizableString(), delay: 1.0, completion: nil)
}
}else {
switch indexPath.row {
case 0:
if playList != nil {
//
//
let array = playList?.videosArray.filter({$0.videoId != song.videoId})
playList?.addToRelationshipToCustomVideos(array ?? [])
MPPositive_CustomPlayListModel.save()
//
MPPositive_LoadCoreModel.shared.reloadCustomPlayLists(nil)
dismiss(animated: true) {
[weak self] in
MP_HUD.onlytext("Success".localizableString(), delay: 1.0, completion: nil)
}
}else {
//
MPPositive_ModalType = .MoreOperations
let chooseVC = MPPositive_ChoosePlayListViewController(song)
chooseVC.disMissBlock = {
[weak self] in
self?.dismiss(animated: true)
}
chooseVC.transitioningDelegate = self
chooseVC.modalPresentationStyle = .custom
present(chooseVC, animated: true)
}
case 1:
//
guard let load = MP_PlayerManager.shared.loadPlayer else {
//
MP_HUD.onlytext("There is no playlist currently playing".localizableString(), delay: 1.0, completion: nil)
return
}
//
guard load.songVideos?.contains(where: {$0.videoId == song.videoId}) == false else {
//
MP_HUD.onlytext("The current playlist already exists".localizableString(), delay: 1.0, completion: nil)
return
}
if let s = song {
MP_PlayerManager.shared.loadPlayer?.playNextAction(s)
}
default:
MP_HUD.onlytext("Your report has been submitted and we will process it as soon as possible.".localizableString(), delay: 1.0, completion: nil)
}
}
}
func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -> UIPresentationController? {
return MPPositive_PresentationController(presentedViewController: presented, presenting: presenting)

View File

@ -110,6 +110,8 @@ class MPPositive_HomeViewController: MPPositive_BaseViewController, UIViewContro
}
}
MP_IAPManager.shared.systemRestorePurchases()
//API
MP_NetWorkManager.shared.requestYBMAPIKeyCode()
setTitle("")
confirgue()
if browseModuleLists.count == 0 {

View File

@ -696,7 +696,7 @@ class MPPositive_PlayerViewController: MPPositive_BaseViewController, UIViewCont
songBtn.setTitleColor(.init(hex: "#FFFFFF", alpha: 0.45), for: .normal)
lyricsBtn.setTitleColor(.init(hex: "#FFFFFF", alpha: 0.85), for: .normal)
if let currentVideo = MP_PlayerManager.shared.loadPlayer?.currentVideo {
lyricsView.lyricsLabel.text = currentVideo.lyrics ?? "No Lyrics"
lyricsView.lyricsLabel.text = (currentVideo.lyrics ?? "").isEmpty ? "No Lyrics":(currentVideo.lyrics ?? "")
}
} completion: { [weak self] (_) in
guard let self = self else {return}

View File

@ -9,8 +9,8 @@ import UIKit
import DownloadButton
class MPPositive_MoreOperationDownLoadTableViewCell: UITableViewCell {
//
lazy var loadBtn:PKDownloadButton = {
let btn:PKDownloadButton = .init()
lazy var loadBtn:MP_DownloadButton = {
let btn:MP_DownloadButton = .init()
btn.isUserInteractionEnabled = false
//
btn.startDownloadButton.cleanDefaultAppearance()

View File

@ -83,7 +83,7 @@ class MPPositive_AddSongTableViewCell: UITableViewCell {
titleLabel.snp.makeConstraints { make in
make.top.equalTo(iconImageView.snp.top).offset(8*width)
make.left.equalTo(iconImageView.snp.right).offset(14*width)
make.right.equalToSuperview().offset(-16*width)
make.right.equalToSuperview().offset(-40*width)
}
contentView.addSubview(subtitleLabel)
subtitleLabel.snp.makeConstraints { make in

View File

@ -26,8 +26,8 @@ class MPPositive_ArtistShowSongTableViewCell: UITableViewCell, PKDownloadButtonD
return btn
}()
//
private lazy var loadBtn:PKDownloadButton = {
let btn:PKDownloadButton = .init()
private lazy var loadBtn:MP_DownloadButton = {
let btn:MP_DownloadButton = .init()
//
btn.startDownloadButton.cleanDefaultAppearance()
btn.startDownloadButton.setBackgroundImage(UIImage(named: "Song_Unload'logo"), for: .normal)

View File

@ -29,8 +29,8 @@ class MPPositive_HomeSingleCollectionViewCell: UICollectionViewCell, PKDownloadB
return btn
}()
///
private lazy var dowloadBtn:PKDownloadButton = {
let btn:PKDownloadButton = .init()
private lazy var dowloadBtn:MP_DownloadButton = {
let btn:MP_DownloadButton = .init()
//
btn.startDownloadButton.cleanDefaultAppearance()
btn.startDownloadButton.setBackgroundImage(UIImage(named: "Song_Unload'logo"), for: .normal)

View File

@ -33,8 +33,8 @@ class MPPositive_MusicItemShowTableViewCell: UITableViewCell, PKDownloadButtonDe
private lazy var rankLabel:UILabel = createLabel(font: .systemFont(ofSize: 14*width, weight: .semibold), textColor: .white, textAlignment: .center)
///
//
private lazy var loadBtn:PKDownloadButton = {
let btn:PKDownloadButton = .init()
private lazy var loadBtn:MP_DownloadButton = {
let btn:MP_DownloadButton = .init()
//
btn.startDownloadButton.cleanDefaultAppearance()
btn.startDownloadButton.setBackgroundImage(UIImage(named: "Song_Unload'logo"), for: .normal)

View File

@ -42,8 +42,8 @@ class MPPositive_PlayerCoverView: UIView, PKDownloadButtonDelegate {
return btn
}()
///
lazy var downloadButton:PKDownloadButton = {
let btn:PKDownloadButton = .init()
lazy var downloadButton:MP_DownloadButton = {
let btn:MP_DownloadButton = .init()
//
btn.startDownloadButton.cleanDefaultAppearance()
btn.startDownloadButton.setBackgroundImage(UIImage(named: "Song_Unload'logo"), for: .normal)

View File

@ -28,8 +28,8 @@ class MPPositive_SearchResultShowTableViewCell: UITableViewCell, PKDownloadButto
return btn
}()
//
private lazy var loadBtn:PKDownloadButton = {
let btn:PKDownloadButton = .init()
private lazy var loadBtn:MP_DownloadButton = {
let btn:MP_DownloadButton = .init()
//
btn.startDownloadButton.cleanDefaultAppearance()
btn.startDownloadButton.setBackgroundImage(UIImage(named: "Song_Unload'logo"), for: .normal)