LGAlertView icon indicating copy to clipboard operation
LGAlertView copied to clipboard

Xcode 14.3 出现错误

Open thisnine opened this issue 1 year ago • 10 comments

我的 Xcode 13.1 可以正常使用 升完14.3就出现这个错误了

No visible @interface for 'LGAlertView' declares the selector 'alertViewWithTextFieldsAndTitle:message:numberOfTextFields:textFieldsSetupHandler:buttonTitles:cancelButtonTitle:destructiveButtonTitle:delegate:'

image

该怎么解决这个问题

thisnine avatar Apr 30 '23 12:04 thisnine

遇到一样的问题, 怎么解决的?

yinyakun avatar May 30 '23 02:05 yinyakun

将里面的方法更改为: return [[self alloc] initWithTextFieldsAndTitle:title message:message numberOfTextFields:numberOfTextFields textFieldsSetupHandler:textFieldsSetupHandler buttonTitles:buttonTitles cancelButtonTitle:cancelButtonTitle destructiveButtonTitle:destructiveButtonTitle delegate:delegate];

yinyakun avatar Jun 05 '23 07:06 yinyakun

A similar problem after updating xCode :(

GLZVSKI avatar Jun 07 '23 02:06 GLZVSKI

Same issue I'm facing does anyone knows any fix?

rahulvyas avatar Jun 12 '23 17:06 rahulvyas

a quick workaround is to rename the alertViewWithTextFieldsAndTitle to initWithTextFieldsAndTitle, but this modifies the pod

tadelv avatar Jul 04 '23 12:07 tadelv

a quick workaround is to rename the alertViewWithTextFieldsAndTitle to initWithTextFieldsAndTitle, but this modifies the pod

There is already a pull request for this but nobody is merging it. Will this fix the crash? I can't reproduce the crash as app is not compiling in xcode 14.3 and 15 beta

rahulvyas avatar Jul 04 '23 18:07 rahulvyas

Indeed. I posted the comment before noticing the pull request. I am not aware of a crash though. i resolved the issue by pointing the podfile to the fork that fixes the build:

pod 'LGAlertView', :git => "https://github.com/yinyakun/LGAlertView.git", :branch => "master"

You will also have to remove the Pods/LGAlert folder and then run pod install again. Sorry for the formatting, on mobile.

tadelv avatar Jul 04 '23 18:07 tadelv

Indeed. I posted the comment before noticing the pull request. I am not aware of a crash though. i resolved the issue by pointing the podfile to the fork that fixes the build:

pod 'LGAlertView', :git => "https://github.com/yinyakun/LGAlertView.git", :branch => "master"

You will also have to remove the Pods/LGAlert folder and then run pod install again. Sorry for the formatting, on mobile.

Thanks for the answer.

rahulvyas avatar Jul 07 '23 07:07 rahulvyas

pod 'LGAlertView', :git => "https://github.com/yinyakun/LGAlertView.git", :branch => "master"

Btw I was using LGAlertView version 2.3.0 because with newer versions I was having some issues with older iOS versions. So if I use your fork I need to test everything again. I'll let you know If I face any issues.

rahulvyas avatar Jul 11 '23 06:07 rahulvyas

The fix https://github.com/Friend-LGA/LGAlertView/pull/84

NikKovIos avatar Jul 30 '23 09:07 NikKovIos