55883

CocoaPods 1.0.1 Redefinition of 'XYZ', Redefinition of enumerator 'ABC', Duplica

Question:

I am upgrading CocoaPods (0.39.0) to latest version (1.0.1) and moving some directly integrated frameworks (copied in the main project instead of using CocoaPods-spec). I am using XCode (7.2.1).

Following is the podfile that is used with CocoaPods 1.0.1:

<pre class="snippet-code-html lang-html prettyprint-override">platform :ios, '8.0' target 'ABC-v2' do # use_framework is required for dynamic frameworks integration. use_frameworks! pod 'SSKeychain', '~>1' pod 'Mantle', '~>1' pod 'GoogleAPIClient/Drive', '~>1' pod 'GTMOAuth2', '~>1' pod 'GTMSessionFetcher' pod 'libextobjc/EXTScope', '~>0.4' pod 'Typhoon', '~>3' # swift framework test, would need this eventually. #pod 'Alamofire', '~>3' # PSPDFKit - 5.8.3 pod 'PSPDFKit', podspec:'https://customers.pspdfkit.com/cocoapods/.../latest.podspec' #disabled it temporarily to separate out xcode build error. #target :SSS do # pod 'ABC-iOS-SDK', :path => 'submodules/abc-ios-sdk' #end #disabled it temporarily to separate out xcode build error. #target :TW do # pod 'ABC-iOS-SDK', :path => 'submodules/abc-ios-sdk' #end target :ABCTests do inherit! :search_paths pod 'OCMock', '~> 3' pod 'OCMockito', '~> 1' pod 'VCRURLConnection', '~> 0.2', :inhibit_warnings => true end end

Now I am trying to resolve compile errors upon build, which are related to libraries getting included multiple times.

<ul><li>Referred to CocoaPods Migration Guide at <a href="http://blog.cocoapods.org/CocoaPods-1.0-Migration-Guide/" rel="nofollow">http://blog.cocoapods.org/CocoaPods-1.0-Migration-Guide/</a></li> <li>Tried recompiling after complete clean (cmd-alt-shift-k), removing pod files (rm -rf Pods/ podfile.lock) & deleting DerivedData.</li> <li>Ensured that there is no duplicate *.a files in the Target->Build Phases->Link Binary with Libraries. Upon 'pod install', "Pods_ABC_v2.framework" is added there. </li> <li>Deleted other targets, such as Widget and an extension & disabled them in podfile as well. </li> <li>There is directly integrated evernote sdk (evernote-sdk-ios.xcodeproj), which has EVSSKeychain.h/.m files with modified definitions with EV prefix (EVSSKeychainErrorCode, EVSSKeychainErrorBadArguments, etc). Screenshot below:</li> <li>I believe above evernote sdk isn't causing the errors I am getting; I could try to remove evernote sdk (directly integrated), but I am not sure about it ?? </li> </ul>

<a href="https://i.stack.imgur.com/dMg0Z.png" rel="nofollow"><img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/dMg0Z.png" data-original="https://i.stack.imgur.com/dMg0Z.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" /></a>

Errors upon compilation:

<ul><li>

/path../Pods/SSKeychain/Sources/SSKeychain.h:65:1: Duplicate interface definition for class ‘SSKeychain'

</li> <li>

/path../Pods/SSKeychain/Sources/SSKeychain.h:22:27: Redefinition of 'SSKeychainErrorCode'

</li> <li>

/path../Pods/SSKeychain/Sources/SSKeychain.h:24:2: Redefinition of enumerator 'SSKeychainErrorBadArguments'

</li> </ul>

Please help with the ideas to remove these errors?

Answer1:

This was fixed by modifying the import statements for SSKeychain.h

Recommend

  • Source files not found in Swift
  • IONIC:Unable to install phonegap-plugin-push in ios app
  • App rejected by Apple caused by using Google Maps SDK
  • fixing ESPNConversations (add pause button)
  • CorePlot 1.2 - pod install no response
  • Python methods to find duplicates
  • How to optimize this simple but horrible implementation?
  • How to consume and replace a value in an &mut ref [duplicate]
  • How to write a Scala wrapper for javax.swing.Timer
  • Easily override NuGet DLL in development (VS 2015)
  • wp-admin can't access after moving
  • Is there a way to selectively skip silverlight field validation when using wcf ria?
  • Alternative to require.paths to edit require search directories programmatically?
  • access parent project OTHER_SWIFT_FLAGS from pod
  • SQL Service Broker: Collecting data from distributed sources.
  • Convert date string value from U.S. to native Date with current locale U.S.?
  • Error combining NSCalendarUnit with OR (pipe) in Swift 2.0
  • IIS 7.5 404 Error for .PDF files
  • Magento “Please specify the product's option(s)” message remains after completing add to cart a
  • WPF Listbox commands
  • IE11 textarea loses focus if another textarea is disabled
  • Neo4j: Filter nodes based on aggregate function
  • How can I reset dropdown data if modal closed on vue component?
  • Cuda Clang and OS X Mavericks
  • Most efficient way to move table rows from one table to another
  • Does Apportable support to build library binary (.a/.so)?
  • How can I replace the server in Web Component Tester
  • How to getText() from the input field of an angularjs Application
  • WPF - CanExecute dosn't fire when raising Commands from a UserControl
  • Highlight one bar in a series in highcharts?
  • Fetching methods from BroadcastReceiver to update UI
  • RectangularRangeIndicator format like triangular using dojo
  • swift auto completion not working in Xcode6-Beta
  • Is there a amazon webstore API for customers?
  • Cross-Platform Protobuf Serialization
  • Does CUDA 5 support STL or THRUST inside the device code?
  • Revoking OAuth Access Token Results in 404 Not Found
  • Proper folder structure for lots of source files
  • -fvisibility=hidden not passed by compiler for Debug builds
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass