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

Getting Reference to property 'transaction' in closure requires explicit use of 'self' to make capture semantics explicit in ImageManager #339

Closed
softmastx opened this issue Nov 4, 2024 · 8 comments
Labels
Swift 5 Any issue related to Swift 5 only

Comments

@softmastx
Copy link

Screenshot 2567-11-04 at 14 32 36 Screenshot 2567-11-04 at 14 34 57

Xcode 14.2
SDWebImageSwiftUI

@dreampiggy
Copy link
Collaborator

dreampiggy commented Nov 4, 2024

Seems old version compiler does not support automatic self capture ?

I don't have any Xcode 14.x (Swift 5.7 ?), can you fix all the compile issue and submit PR for this ? Since I can not reproduce on my local Mac with Swift 5.10 or Swift 6

@dreampiggy dreampiggy added the Swift 5 Any issue related to Swift 5 only label Nov 4, 2024
@softmastx
Copy link
Author

Screenshot 2567-11-04 at 15 18 46

It is fixed by replacing withTransaction(transaction) with withTransaction(self.transaction)

@dreampiggy
Copy link
Collaborator

If you can compile by fixing this, please submit a PR about this change and I'll merge this.

@abdullah888
Copy link

I have same problem and I can't solve it

@dreampiggy
Copy link
Collaborator

@softmastx Hi, can you just submit a PR for this ? It's just one line code.

Since it's so simple I think it's suitable for other developers to contribute

@softmastx
Copy link
Author

softmastx commented Nov 5, 2024

@dreampiggy I'm working on it. getting permission error and trying to fix.

Could you please confirm that I have permission to push?

@dreampiggy
Copy link
Collaborator

dreampiggy commented Nov 5, 2024

You need to create a fork repo, then push to your fork repo's branch. And Create PR in https://github.com/SDWebImage/SDWebImageSwiftUI/pulls, choose your fork repo's branch as source branch, target branch is this repo's master branch

image

@dreampiggy
Copy link
Collaborator

Closed by #340

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Swift 5 Any issue related to Swift 5 only
Projects
None yet
Development

No branches or pull requests

3 participants