datetimepicker icon indicating copy to clipboard operation
datetimepicker copied to clipboard

iOS linker warning about duplicate method implementations

Open TomSwift opened this issue 4 years ago • 37 comments

I'm seeing this warning from the native linker:

ld: warning: meta method 'UIDatePickerMode:' in category from /Users/nicholashodapp/Library/Developer/Xcode/DerivedData/Remitly-aouvfdqqojlkkyatnrqzidccuurd/Build/Products/Debug-iphonesimulator/RNDateTimePicker/libRNDateTimePicker.a(RNDateTimePickerManager.o) conflicts with same method from another category

I believe this code in react-native-community/datetimepicker is conflicting with this code in react-native.

It's not clear to me how I can omit including the React Native "Core" DatePicker; if that's possible then this likely isn't a real issue.

TomSwift avatar May 28 '20 19:05 TomSwift

hi! Thanks for reporting!

It's not clear to me how I can omit including the React Native "Core" DatePicker; if that's possible then this likely isn't a real issue.

Personally, I don't think it's possible to do this nicely even though I'm sure it'd be possible to eg. patch RN core and get rid of this.

We should probably rename this because the datepicker will stay in the core for another stable release or two I guess

vonovak avatar May 28 '20 19:05 vonovak

Same error ld: warning: meta method 'UIDatePickerMode:' in category from /Users/admin/Library/Developer/Xcode/DerivedData/Project-dazbhadjvjgpppbrkjzsrawgavcm/Build/Intermediates.noindex/ArchiveIntermediates/Project/BuildProductsPath/Release-iphoneos/RNDateTimePicker/libRNDateTimePicker.a(RNDateTimePickerManager.o) conflicts with same method from another category

bakhadev avatar May 29 '20 22:05 bakhadev

Same here

mafortier-nexapp avatar Jun 10 '20 13:06 mafortier-nexapp

@vonovak Please was anything done to resolve this

JeremiahUL avatar Jul 23 '20 00:07 JeremiahUL

I'm also getting the same warning.

Meta method 'UIDatePickerMode:' in category from /Users/edyloubaselonia/Library/Developer/Xcode/DerivedData/BlevinsincApp-fvfyqgaltdwyqdaolswvcvzpkyan/Build/Products/Debug-iphoneos/RNDateTimePicker/libRNDateTimePicker.a(RNDateTimePickerManager.o) conflicts with same method from another category

abelara avatar Sep 09 '20 14:09 abelara

Is it safe to ignore this warning? (i get it too)

Guuz avatar Oct 05 '20 11:10 Guuz

@Guuz it depends. If the method added via the categories is identical, then yes.

danilobuerger avatar Oct 05 '20 11:10 danilobuerger

Same here!

wilav-dev avatar Nov 09 '20 22:11 wilav-dev

Same here ld: warning: method '+UIDatePickerMode:' in category from /Users/username/Library/Developer/Xcode/DerivedData/Project-hfgjuzvwxkrpkiavrpljpyvqcimh/Build/Products/Debug-iphonesimulator/React-Core/libReact-Core.a(RCTDatePickerManager.o) conflicts with same method from another category

PraveenTiruveedula avatar Dec 07 '20 06:12 PraveenTiruveedula

let's rename this to avoid the conflict.

billnbell avatar Dec 21 '20 07:12 billnbell

update xcode to 12.5 will resolve problem or you can rename UIDatePickerMode to any other name in RCTDatePickerManager.m and use cocoapods-patch on react-native

numandev1 avatar Jul 08 '21 11:07 numandev1

update xcode to 12.5 will resolve problem or you can rename UIDatePickerMode to any other name in RCTDatePickerManager.m and use cocoapods-patch on react-native

@nomi9995 How does upgrading to XCode 12.5 resolve this? I'm on XCode 12.5 and still have this issue.

TomSwift avatar Jul 15 '21 18:07 TomSwift

+1

binitgurzu avatar Aug 24 '21 09:08 binitgurzu

still looking for solutions

binitgurzu avatar Aug 24 '21 09:08 binitgurzu

this stops Expo EAS builds from working

jimmihagenTrifecta avatar Nov 15 '21 17:11 jimmihagenTrifecta

Seeing this warning with Xcode 12.5.1. It doesn't seem to be a problem for our app, but it is something we'd like to see addressed.

jkoutavas avatar Nov 25 '21 12:11 jkoutavas

Does anyone have this working with EAS builds? I'm trying to migrate over at the moment.

let's rename this to avoid the conflict.

Is it as simple as this? I'm happy to give this a crack if someone can point me in the right direction (instances to rename) and how to get the project running for development. I tried but failed to get the tests to pass with zero code changes.

rdjpalmer avatar Dec 13 '21 14:12 rdjpalmer

@jimmihagenTrifecta Any ideas on how to fix this in EAS? I'm seeing this for EXPO's modules ie › Linking MyApp » MyApp ⚠️ ld: method '-hasEnqueuedUICommands' in category from /Users/expo/Library/Developer/Xcode/DerivedData/MyApp-dtwttoustbxxbybkskymiaziukhb/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Debug-iphoneos/expo-dev-menu/libexpo-dev-menu.a(DevMenuREANodesManager.o) conflicts with same method from another category ⚠️ ld: method '-runSyncUIUpdatesWithObserver:' in category from /Users/expo/Library/Developer/Xcode/DerivedData/MyApp-dtwttoustbxxbybkskymiaziukhb/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Debug-iphoneos/expo-dev-menu/libexpo-dev-menu.a(DevMenuREANodesManager.o) conflicts with same method from another category

Maker-Mark avatar Jan 09 '22 00:01 Maker-Mark

Getting same warning

NxsHbb avatar Jan 12 '22 09:01 NxsHbb

I got that error too, any solution yet?

610consulting avatar Jan 20 '22 15:01 610consulting

I suspect the reason this hasn't been fixed is because of how the ObjC macro RCT_ENUM_CONVERTER works. Changing the conflicting method name isn't straightforward because it must mirror the type name (i.e. 'UIDatePickerMode`).

I've silenced the warning in my application by patching React Native to remove (by commenting out) the RCTConvert (UIDatePicker category. The ideal fix would be for React Native to remove this deprecated component altogether.

TomSwift avatar Jan 20 '22 16:01 TomSwift

+1

shupac avatar Jan 27 '22 20:01 shupac

I've silenced the warning in my application by patching React Native to remove (by commenting out) the RCTConvert (UIDatePicker category. The ideal fix would be for React Native to remove this deprecated component altogether.

Hi, any chance you could share your patch? I'm having the same issue and tried patching the file via patch-package but no luck. Thanks in advance 💪

btroia avatar Feb 21 '22 23:02 btroia

ld: method '+UIDatePickerMode:' in category from /Users/mac/Library/Developer/Xcode/DerivedData/CVSimply-fvfmdfibgexpzoftpwvfgxndmwlj/Build/Products/Debug-iphonesimulator/react-native-date-picker/libreact-native-date-picker.a(RNDatePickerManager.o) conflicts with same method from another category

"react-native-date-picker": "^3.4.3",

000xuandu avatar Mar 10 '22 06:03 000xuandu

I have this issue as well... any update?

joaquinbian avatar May 19 '22 21:05 joaquinbian

We're getting this as well, still no valid fixes from anyone?

ShepSims avatar May 24 '22 02:05 ShepSims

try a rm-rf node_modules && yarn install

billnbell avatar May 24 '22 03:05 billnbell

try a rm-rf node_modules && yarn install

Didnt fix anything

ShepSims avatar May 24 '22 04:05 ShepSims

It's been two years and the issue is still there....

NxsHbb avatar Jun 01 '22 05:06 NxsHbb

Honestly I don't know if it is ok, but I renamed UIDatePickerMode in RCTDatePickerManager.h and I did the same in RCTDatePickerManager and the build didn't stop any more... I hope this works, but please let me know if it is not the best solution :pray:

joaquinbian avatar Jun 10 '22 12:06 joaquinbian