Mayuri Patel
Mayuri Patel

Reputation: 11

How to use two seperate xcframework which is having depedency to each other in the xcode project

I am creating SPM which is having third party depedency, so I added like this in Package.swift :

let package = Package(
    name: “MyLibrary”,
    platforms: [
            .iOS(.v15),
            .macOS(.v10_15)
    ],
    products: [
        .library(
            name: "MyLibrary",
            targets: ["MyLibrary"]),
    ],
    dependencies: [
            .package(url: “ThirdpartyURL“, from: “version”),
            // Add other dependencies if needed
    ],
    targets: [
      
        .target(
            name: "MyLibrary",
            dependencies: [
                .product(name: "Thirdparty", package: "swift")
            ],
            path: "Sources/MyLibrary")
    ],
    swiftLanguageVersions: [.v5]
)

Now, the requirements are to use only xcframework. How to use two separate xcframework in the project?

I tried to create seprate xcframework and then added to project, it's build succeded but on launch of the application, it's giving me error : Updated name to keep privacy.

dyld[39348]: Symbol not found: 
_$s6CoreListenerC22didReceiveSubscriptionyAA0abC5EventOcSgvpWvd

  Referenced from: <C1B65D0B-4667-3F69-BF3B-803F4E9115D1> /Xcode/DerivedData/MyProject-gixiebjcmdvfsfbimdufaeuxcxwe/Build/Products/Debug-iphonesimulator/MyLibrary.framework/MyLibrary

  Expected in:     <70E8B1C0-1024-347D-B1BA-8262F72AA4C1> /Xcode/DerivedData/MyProject-gixiebjcmdvfsfbimdufaeuxcxwe/Build/Products/Debug-iphonesimulator/ThirdParty.framework/ThirdParty

Upvotes: 0

Views: 42

Answers (0)

Related Questions