scinfu / SwiftSoup

SwiftSoup: Pure Swift HTML Parser, with best of DOM, CSS, and jquery (Supports Linux, iOS, Mac, tvOS, watchOS)
https://scinfu.github.io/SwiftSoup/
MIT License
4.53k stars 345 forks source link

Can't use this in cocoapods as your ci is building failed. #123

Closed owenzhao closed 5 years ago

owenzhao commented 5 years ago

Is there a temporary solution?

scinfu commented 5 years ago

Our CI only had the xcode version not updated to 10.3 or 11, now it's the right one, 10.3.

What problem do you have?

Scinfu

owenzhao commented 5 years ago

dyld: Library not loaded: @rpath/SwiftSoup.framework/Versions/A/SwiftSoup Referenced from: /Users/zhaoxin/Library/Developer/Xcode/DerivedData/HTML_Editor-fsnxjjdbzogonocgzrdxclnobasj/Build/Products/Debug/HTML Editor Reason: image not found

Just a command line app with nothing in it.

import Foundation
import SwiftSoup

func foo() -> String {
//    do {
//       let html = "<html><head><title>First parse</title></head>"
//           + "<body><p>Parsed HTML into a doc.</p></body></html>"
//       let doc: Document = try SwiftSoup.parse(html)
//       return try doc.text()
//    } catch Exception.Error(let type, let message) {
//        print(message)
//    } catch {
//        print("error")
//    }

    return ""
}

print(foo())

Xcode 11.0 (11A420a) macOS 10.15 Beta (19A558d) Using SwiftSoup (2.2.0)

scinfu commented 5 years ago

@owenzhao can you provide a demo project?

owenzhao commented 5 years ago

It is just a simple project. Xcode, choose new project, command line tool app.

use CocoaPods added this pod.

copy the above code to main.swfit.

owenzhao commented 5 years ago

You can download the sample project here.

scinfu commented 5 years ago

Your project do not have info.plist. Here is my test project https://gofile.io/?c=VRhXIc where compile and run without any problem.

owenzhao commented 5 years ago

Your project do not have info.plist. Here is my test project https://gofile.io/?c=VRhXIc where compile and run without any problem.

Thank you for you reply. However, currently, a newly created command line tool app project with Xcode 11 no longer uses an info plist. And it runs well if I doesn't not use CocoaPods.

So it is my responsibility to create a info.plist or should CocoaPods does that?