title: Undefined symbols for architecture arm64, it seems just randomly happened to some third party framework using cocoapods
body: <h2>What happened</h2>
  <ol>
  <li>I used <code>Cocoapods</code> to manage some third-party frameworks</li>
  <li>I used some private spec repos</li>
  <li>More than one private repos have dependency on same third-party pods</li>
  <li>After a modification of dependency structure,I build my workspace, it shows these errors:</li>
  </ol>
  <pre><code>Undefined symbols for architecture arm64:
    &quot;_OBJC_METACLASS_$_UIView&quot;, referenced from:
        _OBJC_METACLASS_$_iCarousel in iCarousel.o
    &quot;_OBJC_CLASS_$_UIButton&quot;, referenced from:
        objc-class-ref in iCarousel.o
    &quot;_OBJC_CLASS_$_UIScrollView&quot;, referenced from:
        objc-class-ref in iCarousel.o
    &quot;_OBJC_CLASS_$_UIScreen&quot;, referenced from:
        objc-class-ref in iCarousel.o
    &quot;_OBJC_CLASS_$_UITapGestureRecognizer&quot;, referenced from:
        objc-class-ref in iCarousel.o
    &quot;_OBJC_CLASS_$_UIView&quot;, referenced from:
        objc-class-ref in iCarousel.o
        _OBJC_CLASS_$_iCarousel in iCarousel.o
    &quot;_OBJC_CLASS_$_UIBarButtonItem&quot;, referenced from:
        objc-class-ref in iCarousel.o
    &quot;_UITrackingRunLoopMode&quot;, referenced from:
        -[iCarousel startAnimation] in iCarousel.o
    &quot;_CGSizeZero&quot;, referenced from:
        -[iCarousel setUp] in iCarousel.o
    &quot;_OBJC_CLASS_$_UIPanGestureRecognizer&quot;, referenced from:
        objc-class-ref in iCarousel.o
    &quot;_UIAccessibilityTraitAllowsDirectInteraction&quot;, referenced from:
        -[iCarousel setUp] in iCarousel.o
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  <h2>What I've done to try to solve this problem?(none of them works)</h2>
  <ol>
  <li>Deleted Xcode caches by <code>rm -rf ~/Library/Developer/Xcode/DerivedData/</code></li>
  <li>Deleted Cocoapods caches by <code>$ rm -rf &quot;${HOME}/Library/Caches/CocoaPods&quot;   $rm -rf &quot;</code>pwd<code>/Pods/&quot;   $pod update</code></li>
  <li>Update the Xcode version to 12.0.1</li>
  </ol>
  <p>Oh no, same errors!</p>
  <h2>What I've done next...</h2>
  <p>I decided to go the hard way, so I add those things to my <code>Podfile</code>:</p>
  <pre><code>if target.name == &quot;iCarousel&quot;
    config.build_settings['OTHER_LDFLAGS'] ||= ['$(inherited)']
    config.build_settings['OTHER_LDFLAGS'] &lt;&lt; '-framework &quot;UIKit&quot;'
    config.build_settings['OTHER_LDFLAGS'] &lt;&lt; '-framework &quot;CoreGraphics&quot;'
  end
  </code></pre>
  <p>Then, <code>pod install</code></p>
  <p>Build my project...</p>
  <p><strong>Good news! nothing to do with iCarousel! Bad news, same old errors happened to another pod: <code>PomeloPush</code></strong></p>
  <pre><code>Undefined symbols for architecture arm64:
    &quot;_SCNetworkReachabilitySetDispatchQueue&quot;, referenced from:
        -[PomeloReachability startNotifier] in PomeloReachability.o
        -[PomeloReachability stopNotifier] in PomeloReachability.o
    &quot;_SCError&quot;, referenced from:
        -[PomeloReachability startNotifier] in PomeloReachability.o
    &quot;_SCErrorString&quot;, referenced from:
        -[PomeloReachability startNotifier] in PomeloReachability.o
    &quot;_SCNetworkReachabilityGetFlags&quot;, referenced from:
        -[PomeloReachability isReachable] in PomeloReachability.o
        -[PomeloReachability isReachableViaWWAN] in PomeloReachability.o
        -[PomeloReachability isReachableViaWiFi] in PomeloReachability.o
        -[PomeloReachability connectionRequired] in PomeloReachability.o
        -[PomeloReachability isConnectionOnDemand] in PomeloReachability.o
        -[PomeloReachability isInterventionRequired] in PomeloReachability.o
        -[PomeloReachability reachabilityFlags] in PomeloReachability.o
        ...
    &quot;_SCNetworkReachabilitySetCallback&quot;, referenced from:
        -[PomeloReachability startNotifier] in PomeloReachability.o
        -[PomeloReachability stopNotifier] in PomeloReachability.o
    &quot;_SCNetworkReachabilityCreateWithAddress&quot;, referenced from:
        +[PomeloReachability reachabilityWithAddress:] in PomeloReachability.o
    &quot;_CFHostStartInfoResolution&quot;, referenced from:
        +[PomeloHostRequest nslookup:] in PomeloHostRequest.o
    &quot;_OBJC_CLASS_$_UIDevice&quot;, referenced from:
        objc-class-ref in PomeloClient.o
    &quot;_SCNetworkReachabilityCreateWithName&quot;, referenced from:
        +[PomeloReachability reachabilityWithHostname:] in PomeloReachability.o
    &quot;_CFHostCreateWithName&quot;, referenced from:
        +[PomeloHostRequest nslookup:] in PomeloHostRequest.o
    &quot;_CFHostGetAddressing&quot;, referenced from:
        +[PomeloHostRequest nslookup:] in PomeloHostRequest.o
    &quot;_OBJC_CLASS_$_UIPasteboard&quot;, referenced from:
        objc-class-ref in Pomelo_OpenUDID.o
    &quot;_UIApplicationDidEnterBackgroundNotification&quot;, referenced from:
        -[PomeloClient addNotification] in PomeloClient.o
    &quot;_UIApplicationWillEnterForegroundNotification&quot;, referenced from:
        -[PomeloClient addNotification] in PomeloClient.o
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  <p>Then I added some similar code in Podfile
  Then <code>pod install</code>, build
  Oh, a similar error happened to another pod:</p>
  <pre><code>Undefined symbols for architecture arm64:
    &quot;_OBJC_CLASS_$_UIViewController&quot;, referenced from:
        __OBJC_$_CATEGORY_UIViewController_$_KeyboardAnimation in UIViewController+KeyboardAnimation.o
    &quot;_UIKeyboardAnimationDurationUserInfoKey&quot;, referenced from:
        -[UIViewController(KeyboardAnimation) getDurationFromNotification:] in UIViewController+KeyboardAnimation.o
    &quot;_UIKeyboardAnimationCurveUserInfoKey&quot;, referenced from:
        -[UIViewController(KeyboardAnimation) getAnimationCurveFromNotification:] in UIViewController+KeyboardAnimation.o
    &quot;_UIKeyboardFrameEndUserInfoKey&quot;, referenced from:
        -[UIViewController(KeyboardAnimation) getKeyboardRectFromNotification:] in UIViewController+KeyboardAnimation.o
    &quot;_UIKeyboardWillChangeFrameNotification&quot;, referenced from:
        -[UIViewController(KeyboardAnimation) an_subscribeKeyboardFrameChangesWithAnimations:] in UIViewController+KeyboardAnimation.o
        -[UIViewController(KeyboardAnimation) an_unsubscribeKeyboardFrameChanges] in UIViewController+KeyboardAnimation.o
    &quot;_UIKeyboardWillShowNotification&quot;, referenced from:
        -[UIViewController(KeyboardAnimation) an_subscribeKeyboardWithBeforeAnimations:animations:completion:] in UIViewController+KeyboardAnimation.o
        -[UIViewController(KeyboardAnimation) an_unsubscribeKeyboard] in UIViewController+KeyboardAnimation.o
    &quot;_OBJC_CLASS_$_UIView&quot;, referenced from:
        objc-class-ref in UIViewController+KeyboardAnimation.o
    &quot;_UIKeyboardWillHideNotification&quot;, referenced from:
        -[UIViewController(KeyboardAnimation) an_subscribeKeyboardWithBeforeAnimations:animations:completion:] in UIViewController+KeyboardAnimation.o
        -[UIViewController(KeyboardAnimation) an_unsubscribeKeyboard] in UIViewController+KeyboardAnimation.o
  ld: symbol(s) not found for architecture arm64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  <p>for now, it had happened on <code>pop</code>, <code>AFNetworking</code>, <code>SDWebImage</code>, <code>iCarousel</code>, <code>MJRefresh</code>, and so on...</p>
  <h2>Any suggestions could help would be greatly appreciated!! I've stuck on this for a week...</h2>