Git Product home page Git Product logo

Comments (9)

Jeehut avatar Jeehut commented on May 31, 2024

Hey @khoogheem, thank you for reporting this. Could you please post your full Package.swift file contents? This sounds like you're trying to build a framework which uses iOS 10.0 APIs but didn't have the deployment target set to iOS 10 properly. Could you please also copy more of the output here? Especially it's interesting to know, which framework Accio was trying to build when this error appeared and also which version of it.

from accio.

khoogheem avatar khoogheem commented on May 31, 2024

Here is the projects Package

// swift-tools-version:5.0
import PackageDescription

let package = Package(
    name: "MyTarget",
    products: [],
    dependencies: [
        // add your dependencies here, for example:
        .package(url: "https://github.com/SwiftyBeaver/SwiftyBeaver.git", from: "1.6.2"),
        .package(url: "https://github.com/FitnessKit/BluetoothMessageProtocol", from: "0.19.1"),
        .package(url: "https://github.com/FitnessKit/FitDataProtocol", from: "0.40.2")

    ],
    targets: [
        .target(
            name: "MyTarget",
            dependencies: [
                "SwiftyBeaver",
                "BluetoothMessageProtocol",
                "FitDataProtocol",
            ],
            path: "Source"
        ),
    ]
)

It will choke trying to get: https://github.com/FitnessKit/FitnessUnits which is a dependent of the Bluetooth and Fit packages...

Both the the packages inside of FitnessKit are still 4.X so they don't have the platforms defined

from accio.

Jeehut avatar Jeehut commented on May 31, 2024

Okay, there you have it:

FitnessUnits .podspec file makes it clear that iOS 10 is the minimum required target.
But FitnessUnits Package.swift file doesn't state that fact. Note that specifying minimum required versions are only possible starting with Swift 5, it was introduced just recently with SE-236. But Accio allows you to add it to Swift 4 projects as well by simply commenting that line out, Accio will take care of setting the target correctly then.

So, the fix for you is to fork FitnessUnits and add this line to the Package.swift file:

// platforms: [.iOS("10.0"), .macOS("10.12"), .tvOS("10.0"), .watchOS("3.0")],

For a full example of what such a Package.swift might look like and for further explanations, please read the "Adding support for Accio" section in the README.

I hope this helps.

from accio.

khoogheem avatar khoogheem commented on May 31, 2024

ok... it was unclear that the commented out line actually would work...
still in the process of moving things over to swift5

from accio.

Jeehut avatar Jeehut commented on May 31, 2024

You mean, even after reading the docs it was unclear? Do you have a suggestion on how we could make it clearer? Feel free to post a PR with the text change. Also good luck with the move to Swift 5! :)

from accio.

khoogheem avatar khoogheem commented on May 31, 2024

ok.. not sure If I still have something screwed up.. but two of my packages bring in this package https://github.com/FitnessKit/DataDecoder which I have set to iOS 10.. but it complains that it was built for 12.2

from accio.

Jeehut avatar Jeehut commented on May 31, 2024

Again, please provide full output of both your manifest file and output. This sounds like the project already has a Xcode project file with a shared scheme whose target is set to 12.2.

Accio only uses the „platforms“ specified in the manifest if it needs to generate the Xcode project using SwiftPM for non-Carthage compatible frameworks. But if a framework has an Xcode project with a shared scheme, it is technically Carthage compatible and the existing scheme will be used as is. But Carthage users should actually come across the same issue in that case as you have, so its basically a project not properly conforming to Carthage and by that also to Accio.

I hope this info helps.

from accio.

khoogheem avatar khoogheem commented on May 31, 2024

ok... I know where the problem is then thanks again

from accio.

Jeehut avatar Jeehut commented on May 31, 2024

Sure, glad I could help.

from accio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.