tristanhimmelman / ObjectMapper

Simple JSON Object mapping written in Swift
MIT License
9.13k stars 1.03k forks source link

Cannot install via SPM, error: Invalid manifest #1137

Open MrShiY opened 5 months ago

MrShiY commented 5 months ago
Screenshot 2024-03-13 at 16 05 30

Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/4x/v20vyl2d3fv2p1kgfym1jv0c0000gn/T/TemporaryDirectory.X8kS5e/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-target", "arm64-apple-macos13.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/SharedFrameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk", "-package-description-version", "5.0.0", "-Xfrontend", "-serialize-diagnostics-path", "-Xfrontend", "/Users/skt_long/Library/Caches/org.swift.swiftpm/manifests/ManifestLoading/objectmapper.dia", "/Package.swift", "-disallow-use-new-driver", "-o", "/var/folders/4x/v20vyl2d3fv2p1kgfym1jv0c0000gn/T/TemporaryDirectory.9y3swo/objectmapper-manifest"])

XCode version: 15.2 ObjectMapper version: 4.3.0

RasikBhil commented 5 months ago

++

MartinMetselaar commented 5 months ago

The current Package.swift is using swift-tools-version:5.0 and my current assumption is that iOS(.v13) was not available during swift 5.0.

You are probably using upToNextMajor, so that is why you are using the latest released 4.3.0 version. If you are pinning on 4.2.0 you will be fine until this is fixed.

MartinMetselaar commented 5 months ago

I see a PR has already been created to fix the issue: #1136

MrShiY commented 5 months ago
Screenshot 2024-03-13 at 20 46 32

I installed 4.2.0, it works well

parmar-mehul commented 5 months ago

Hello Friends,

Try this. It works for me. Just need to update swift-tools-version,

.package(url: "https://github.com/elmetal/ObjectMapper", branch: "feature/fix-swift-tools-version"),

Good luck! You can contact me, In case if you need my help. mparmar.mailbox@gmail.com

Here is link of related issue, https://github.com/tristanhimmelman/ObjectMapper/pull/1136#issuecomment-1996602228

jmanalang3 commented 4 months ago

4.2.0 works thank you!!!

bogiahatay commented 4 months ago

change to 4.2.0 works for me