Undefined symbol: _MDMMotionCurveMakeBezier

1.5k Views Asked by At

Can't build my project on new Xcode 14.1

I'm using MaterialComponents/ActivityIndicator

  "_MDMMotionCurveMakeBezier", referenced from:
      +[MDCActivityIndicatorMotionSpec loopIndeterminate] in MDCActivityIndicatorMotionSpec.o
      +[MDCActivityIndicatorMotionSpec willChangeToDeterminate] in MDCActivityIndicatorMotionSpec.o
      +[MDCActivityIndicatorMotionSpec willChangeToIndeterminate] in MDCActivityIndicatorMotionSpec.o
      +[MDCActivityIndicatorMotionSpec willChangeProgress] in MDCActivityIndicatorMotionSpec.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
3

There are 3 best solutions below

0
getmemd On

Perhaps you have this line in your Podfile config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'

Until they fix it, you can remove it

0
Werner Altewischer On

The podspec of MaterialComponents is missing a dependency. Because the build order can vary a bit with parallel builds in Xcode it will not always occur.

The fix is adding MotionInterchange as dependency of ActivityIndicator:

diff --git a/MaterialComponents.podspec b/MaterialComponents.podspec
index d37749ea9..931c25fed 100644
--- a/MaterialComponents.podspec
+++ b/MaterialComponents.podspec
@@ -107,6 +107,7 @@ Pod::Spec.new do |mdc|
     component.dependency "MaterialComponents/Palettes"
     component.dependency "MaterialComponents/private/Application"
     component.dependency "MotionAnimator", "~> 4.0"
+    component.dependency "MotionInterchange"
 
     component.test_spec 'UnitTests' do |unit_tests|
       unit_tests.source_files = [

https://github.com/material-components/material-components-ios/issues/10260#issuecomment-1327611872

0
Daniele Baschirotto On

This is just a quick solution to avoid to modify the library .podspec

Maybe not the most recommendend option but it could save some time while considering moving from Material Component to a better solution.

In the podfile of your project, include:

pod 'MotionInterchange'