Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic framework with static framework dependency results in duplicate classes #6895

Closed
1 task done
rajohns08 opened this issue Jul 24, 2017 · 2 comments
Closed
1 task done

Comments

@rajohns08
Copy link

Report

What did you do?

Created a dynamic framework that includes a static framework in its Linked Frameworks and Libraries section. The static framework dependency is provided by a 3rd party and is closed source. Run pod install on my podspec that lists the static framework dependency as a vendored_framework.

What did you expect to happen?

Vendored frameworks installed without duplicate classes warning.

What happened instead?

When running the application in Xcode after doing the pod install, I get the following runtime warnings:

objc[90367]: Class VisaURLConnection is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f48c8) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e52fde0). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaTDDefaults is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4918) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e52fe30). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaTDMURLSession is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4968) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e52fe80). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaWebViewImpl is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f49b8) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e52fed0). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaBrowserInfoGatherer is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4a08) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e52ff20). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaTDLocationHandler is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4a58) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e52ff70). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaTDMConnection is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4aa8) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e52ffc0). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaTHMTrustDefender is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4af8) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530010). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaNetworkInfoImpl is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4b48) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530060). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaInfoGathererImpl is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4bc0) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e5300d8). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaSecureUDID is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4be8) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530100). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaBPXLUUIDHandler is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4c60) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530178). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaOpenUDID is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4c88) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e5301a0). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaTDConfiguration is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4cd8) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e5301f0). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaStringUtils is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4d28) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530240). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaTDID is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4da0) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e5302b8). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaInfoGatherer is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4dc8) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e5302e0). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaRegion is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4e40) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530358). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaRegionInfo is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4e68) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530380). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaImageInfo is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4ee0) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e5303f8). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaBrowserInfoGathererBase is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4f08) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530420). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaScreenInfo is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4f58) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530470). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaNetworkInfo is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f4fa8) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e5304c0). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaDataUtils is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f5020) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530538). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaTrustDefenderCore is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f5048) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e530560). One of the two will be used. Which one is undefined.
objc[90367]: Class VisaCarrierInfoGatherer is implemented in both /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/Frameworks/VisaCheckoutSDK.framework/VisaCheckoutSDK (0x10e9f5098) and /Users/rjohns/Library/Developer/CoreSimulator/Devices/2A08D469-B3B8-4703-9888-9CC64F2A20BD/data/Containers/Bundle/Application/0DAB8C2E-0485-4A45-BD51-F7EEC3CB2424/SampleProject.app/SampleProject (0x10e5305b0). One of the two will be used. Which one is undefined.

This comment from a previous issue says that using inherit! :search_paths should prevent the static framework from being linked to the app target, but that doesn't seem to be working for me.

CocoaPods Environment

Stack

   CocoaPods : 1.2.1
        Ruby : ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin15]
    RubyGems : 2.6.11
        Host : Mac OS X 10.12.4 (16E195)
       Xcode : 8.3.3 (8E3004b)
         Git : git version 2.11.0 (Apple Git-81)
Ruby lib dir : /usr/local/Cellar/ruby/2.4.1_1/lib
Repositories : AdamPodTest - https://github.com/rajohns08/AdamPodTest.git @ 698b12f846d6e8cb25adf3cb7b714f7181696999
               master - https://github.com/CocoaPods/Specs.git @ c1c5c69bf746c71d8229686a884ed1f42db4bca0

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.2.0
cocoapods-try         : 1.1.0

Podfile

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'SampleProject' do
  # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
  use_frameworks!
  inherit! :search_paths

  # Pods for NewTrustTest
  pod 'VisaCheckoutSDK', '5.2.0-8.3.3'

end

Project that demonstrates the issue

https://github.com/rajohns08/SampleProject

@paulb777
Copy link
Member

paulb777 commented Oct 7, 2017

The linker does not support dynamic library dependencies on static libraries. With CocoaPods 1.4.0, you can use the static_framework podspec attribute to build a pod itself as static and have static library framework dependencies.

@rajohns08
Copy link
Author

@dnkoutso any suggestions? I linked to one of your comments that I thought indicated a fix for my issue.

@rajohns08 rajohns08 changed the title Dynamic framework containing static framework results in duplicate classes Dynamic framework with static framework dependency results in duplicate classes Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants