Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

SMCalloutView has caused the conflict at the time of build, when I have already integrate it by CocoaPods on iOS #1757

Closed

Description

@tisayama

I have already integrate 'SMCalloutView' in Xcode project by CocoaPods on iOS. It has integrated for displaying calloutview in other map library.
I want to include in together Mapbox GL and other map library.
How do I can solve this problem?

The following is the error message of conflict.

duplicate symbol _OBJC_IVAR_$_SMCalloutView._backgroundView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._delegate in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._title in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._subtitle in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._leftAccessoryView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._rightAccessoryView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._permittedArrowDirection in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._currentArrowDirection in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._constrainedInsets in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._titleView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._subtitleView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._contentView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._contentViewInset in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._calloutOffset in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._presentAnimation in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._dismissAnimation in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._containerView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._titleLabel in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._subtitleLabel in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutView._popupCancelled in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutMaskedBackgroundView._containerView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutMaskedBackgroundView._containerBorderView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutMaskedBackgroundView._arrowView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutMaskedBackgroundView._arrowImageView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutMaskedBackgroundView._arrowHighlightedImageView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutMaskedBackgroundView._arrowBorderView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutBackgroundView._arrowPoint in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutBackgroundView._highlighted in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutBackgroundView._contentMask in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutBackgroundView._anchorHeight in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_IVAR_$_SMCalloutBackgroundView._anchorMargin in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _kSMCalloutViewRepositionDelayForUIScrollView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_CLASS_$_SMCalloutView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_METACLASS_$_SMCalloutView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_CLASS_$_SMCalloutMaskedBackgroundView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_METACLASS_$_SMCalloutMaskedBackgroundView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_CLASS_$_SMCalloutBackgroundView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
duplicate symbol _OBJC_METACLASS_$_SMCalloutBackgroundView in:
    /Users/tette/PathToProject/Pods/MapboxGL/libMapboxGL.a(SMCalloutView.o)
    /Users/tette/Library/Developer/Xcode/DerivedData/myproject-ghpyhvccoqkfgngwmtkdjsofxcdk/Build/Products/Debug(DevEnv)-iphonesimulator/libPods-SMCalloutView.a(SMCalloutView.o)
ld: 38 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Activity

  1. added
    iOS
    on Jun 19, 2015
  2. 1ec5 commented on Jun 19, 2015

    @1ec5
    Contributor

    Interesting. We're pulling SMCalloutView in via a submodule, which is why CocoaPods is allowing a second copy to be placed in the project. I think we'll have to add an MGL prefix to all SMCalloutView's classes like we did to our copy of Reachability.

  3. incanus commented on Jun 20, 2015

    @incanus
    Contributor

    Related: nfarina/calloutview#88

    You should be able to just include the header where you need it and use the already built-in version for now.

  4. jfirebaugh commented on Jul 2, 2015

    @jfirebaugh
    Contributor

    I believe #898 is the proper fix for this issue and others of its ilk.

  5. 1ec5 commented on Jul 2, 2015

    @1ec5
    Contributor

    Even with #898, you’d probably get warnings at runtime – and non-deterministic behavior if we ever use a different version of SMCalloutView than the developer. The Objective-C runtime has no namespacing, and NSClassFromString("SMCalloutView") would return unpredictable results.

  6. incanus commented on Jul 5, 2015

    @incanus
    Contributor

    This really comes down to a build process issue for us, since installing via CocoaPods is supposed to resolve dependency issues, but we distribute a binary which includes it already. Until we hit #1437 we can't fix this.

  7. 1ec5 commented on Jul 5, 2015

    @1ec5
    Contributor

    Until we hit #1437 we can't fix this.

    But we can work around it by prefixing our copy of SMCalloutView, SMCalloutArrowDirection, etc. in a fork of nfarina/calloutview.

  8. friedbunny commented on Jul 29, 2016

    @friedbunny
    Contributor

    We’re replacing SMCalloutView with a homegrown solution, per #4392.

  9. friedbunny commented on Oct 11, 2017

    @friedbunny
    Contributor

    The duplicate symbol compilation errors are gone after #898, but objc still doesn’t appreciate that there are two SMCalloutView implementations:

    objc[83589]: Class SMCalloutView is implemented in both test.app/Frameworks/Mapbox.framework/Mapbox (0x107015060) and test.app/test (0x10511bf40). One of the two will be used. Which one is undefined.

  10. added this to the milestone on Oct 11, 2017
  11. self-assigned this
    on Oct 11, 2017
  12. friedbunny commented on Oct 11, 2017

    @friedbunny
    Contributor

    Fixed in #10183 and v3.7.0-beta.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buildiOS

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions