HeroTransitions / Hero

Elegant transition library for iOS & tvOS
https://HeroTransitions.github.io/Hero/
MIT License
22k stars 1.72k forks source link

Version 1.6.2 doesn't work with SPM #747

Open guidev opened 1 year ago

guidev commented 1 year ago

What did you do?

Updating from 1.6.1 to 1.6.2 using SPM doesn't work.

What happened instead?

/Users/redacted/Library/Developer/Xcode/DerivedData/app_redacted-asehfmfelcemwgdmpgoxlifocxtt/Build/Products/Debug-iphoneos/Hero error build: /Users/redacted/Library/Developer/Xcode/DerivedData/app_redacted-asehfmfelcemwgdmpgoxlifocxtt/Build/Products/Debug-iphoneos/Hero: No such file or directory

pepejeria commented 1 year ago

Confirming that 1.6.2 does not work with SPM

robert4381 commented 1 year ago

+1

francesc-o commented 1 year ago

Same +1

euthimis87 commented 1 year ago

Same here +1

rued commented 1 year ago

+1

JoeMatt commented 1 year ago

Thanks, been offline traveling for a bit. Looking into this.

JoeMatt commented 1 year ago

I created a new project and added Hero as a dependency.

It seems to be working fine for me both on latest macos/xcode 14 and whatever github actions is using, which is XCode 13 something.

https://github.com/HeroTransitions/SwiftPMTest

Not sure why you guys are seeing this. Try resetting spm cache maybe?

GitHub
GitHub - HeroTransitions/SwiftPMTest: Test project for SPM.
Test project for SPM. Contribute to HeroTransitions/SwiftPMTest development by creating an account on GitHub.
pepejeria commented 1 year ago

I tried resetting the cache, but with no luck. I also did the remove derived data dance and it still failed.

JoeMatt commented 1 year ago

Which version of swift/xcode?

I'm

Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Target: x86_64-apple-macosx12.0

But again, it seems to be working fine in GitHub actions which is macOS 11, XCode 13. I'm def confused, that error doesn't give a lot of help.

JoeMatt commented 1 year ago

Oh, weird question maybe but does your path or username have spaces?

pepejeria commented 1 year ago

Default Swift version:

swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Target: arm64-apple-macosx12.0

Only difference that I can see is that I have a M1 computer. My username has no spaces.

Error:

error: /Users/jose/Library/Developer/Xcode/DerivedData/ProjectName-fzgyfoooiopzbsetxmpaaaxvicrj/Build/Products/Dev-iphoneos/Hero: No such file or directory
JoeMatt commented 1 year ago

Default Swift version:

swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Target: arm64-apple-macosx12.0

Only difference that I can see is that I have a M1 computer. My username has no spaces.

Error:

error: /Users/jose/Library/Developer/Xcode/DerivedData/ProjectName-fzgyfoooiopzbsetxmpaaaxvicrj/Build/Products/Dev-iphoneos/Hero: No such file or directory

Thanks.

I have a M1 at home to test on. I've been traveling with my Intel MBP but I'll be back at my office in a few days.

JoeMatt commented 1 year ago

Demo project is working on my M1 Mac.

Can you clone the test repo and let me know what happens,

git clone https://github.com/HeroTransitions/SwiftPMTest.git
cd SwiftPMTest
swift build

My results

image image
SebastianKumor commented 1 year ago

works fine on m1pro mac and with xcode 14.0.1 with hero 1.6.2 and spm

Brudus commented 1 year ago

I think this issue might be related to Xcode 14, event though some say it works for them. I noticed one difference (for 1.6.1 as well as 1.6.2). When I add Hero to the target in 'Frameworks, Libraries, and Embedded Content' on Xcode 13.4 it behaves like any other package. It is just there. If I add Hero in the same way to Xcode 14.0.1 I have to choose between 'Embed & Sign', 'Embed without signing', or 'Do Not Embed':

Screenshot 2022-10-25 at 02 20 29

Screen Shot 2022-10-25 at 02 22 03

I don't know if that is an issue but our build pipeline either failed or when it was successful the app crashed immediately after I switched between Xcode 14 (locale) and Xcode 13 (build server).

I'm going to check how it behaves when I'm using Xcode 14 for the build server as well.

Edit: It crashes after building it with Xcode 14 as well. I'm still a bit concerned about the selection I needed to make there but try to investigate further.

Edit: Xcode won't let me install the app when selecting 'Embed without Signing'. The build works just the install fails. Locally 'Embed & Sign' works. Even though I'm not sure if that should be the way to go.

Edit: So, I got it working. 'Embed & Sign' is the way to go and maybe always was. We did that before it just wasn't present in Xcode. I additionally had to trust the certificate in the settings (iOS didn't warn me about that). After building the app with Xcode 14 on the build server with 'Embed & Sign', and trusting the certificate it was working as expected again.

jose-pay commented 1 year ago

I solved this issue by removing Hero from the project. Then re-added it and I have no issues now.