Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Swift Package Manager support #527

Closed
carlos-chaguendo opened this issue Jul 30, 2019 · 13 comments
Closed

Add Swift Package Manager support #527

carlos-chaguendo opened this issue Jul 30, 2019 · 13 comments

Comments

@carlos-chaguendo
Copy link

Hi,

They could review the possibility of adding Package.swift manifest to support Swift Package Manager

// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "PINRemoteImage",
    products: [
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
        .library(
            name: "PINRemoteImager",
            targets: ["PINRemoteImage"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(
            name: "PINRemoteImage",
            dependencies: [],
            path: "Source"),
    ]
)

it's likely they'll have to wrap some of their code in

#if canImport(UIKit)
import UIKit

extension UIImage {
}

#endif

@garrettmoon garrettmoon changed the title package Manager support? Add Swift Package Manager support Dec 19, 2019
@xezero
Copy link

xezero commented Sep 16, 2020

Any updates on this?

@3a4oT
Copy link
Contributor

3a4oT commented Oct 1, 2020

#571

@Kaspik
Copy link

Kaspik commented Oct 7, 2020

Current master is still broken (probably due to #574):

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_PINWebPAnimatedImage", referenced from:
      objc-class-ref in PINRemoteImage.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@3a4oT
Copy link
Contributor

3a4oT commented Oct 7, 2020

Yeah, #574 should do the trick

@garrettmoon
Copy link
Collaborator

Just merged, please let me know if it's working for y'all and I'll put out a new release.

@Kaspik
Copy link

Kaspik commented Oct 7, 2020

Current master works for us @garrettmoon ! Seems like PINRemoteImage can go out as 3.0.2 the same as PINCache went yesterday. :)

@3a4oT
Copy link
Contributor

3a4oT commented Oct 8, 2020

It works for me as well, thanks!

@robertodias180
Copy link

hello guys,
I am trying to use PINRemoteImage on an internal package, but I am running into this error.
Any ideas?
Screenshot 2021-10-29 at 12 16 42
r

@garrettmoon
Copy link
Collaborator

@robertodias180 looks like SWIFT_PACKAGE isn't being properly set in the configuration you're using?

(closing this issue because the original issue is fixed)

@yo1995
Copy link

yo1995 commented Nov 14, 2021

hello guys, I am trying to use PINRemoteImage on an internal package, but I am running into this error. Any ideas? Screenshot 2021-10-29 at 12 16 42 r

I'm also seeing this issue with Xcode 13.1 and Big Sur 11.6.1, on an Intel machine. Have no idea how to solve it other than going back to pods 😞 . Since this is 1 of the only few issues we have for using SPM, it may be worth removing the dependency on PINRemoteImage.

@SAGESSE-CN
Copy link
Contributor

@yo1995 I just tested SPM with 3.0.0 PINRemoteImage and it works, maybe you should provide a demo project to reproduce the problem.

@yo1995
Copy link

yo1995 commented Nov 14, 2021

@yo1995 I just tested SPM with 3.0.0 PINRemoteImage and it works, maybe you should provide a demo project to reproduce the problem.

Thanks. Tested on a newly created project and it does work, despite the warnings from the cache module. Will need some time to poke around and see why it came up.

@james-pellow
Copy link

I just created an absolutely fresh project with Xcode 15.0 and added the PINRemoteImage SPM package to the project. I created an empty swift file with import PIMRemoteImage and I get this error with PINRemoteImage 3.0.3. It looks like this is still an issue, and I don't see any resolution suggestions here. What are people doing with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants