huri000 / SwiftEntryKit

SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.
MIT License
6.62k stars 609 forks source link

attributes.windowLevel = .custom(level: lastWindow.windowLevel + 1) #127

Closed rusher-R closed 6 years ago

rusher-R commented 6 years ago

Describe the bug attributes.windowLevel = .custom(level: lastWindow.windowLevel + 1) This will cause error, I have to rollback to 0.6.0 version

huri000 commented 6 years ago

Hi @linshizai - It is probably because the Swift version in the build settings of the target is less than 4.2 (is it?). In case you don't use Swift 4.2 please pod install 'SwiftEntryKit' '0.7.2'. screen shot 2018-10-08 at 2 30 49 pm . Let me know your thoughts.

rusher-R commented 6 years ago

@huri000 Thank you very much, after switch to 0.7.2, the problem has been solved

rusher-R commented 6 years ago

After switch to 0.7.2, it will cause the problem below. In 0.6.0 version,it's used normally

image

huri000 commented 6 years ago

You use Xcode 10, right? What is the target Swift version?

rusher-R commented 6 years ago

@huri000 Xcode 10, Swift4.0

rusher-R commented 6 years ago

@huri000 iOS12

huri000 commented 6 years ago

Hi, I've managed to reproduce the crash after lots of playing around with the Swift version and the installed pod version. But, pod deintegrate and pod install fix the issue and all goes back to normal. I think it happened because of something that went wrong during the build process / moving from 0.6.0 to 0.7.2 which adjusted to Xcode 10 new build system. Could you please try what I suggested above and let me know? Thanks!

rusher-R commented 6 years ago

@huri000 After reload pods, It seems everything successfully! Thank you for your solution.

huri000 commented 6 years ago

Glad I could help! 🎉 I’m cosing the issue now.