How do i use local xcframework correctly in SwiftPM?

I have a third party framework called ThirdParty.framework.
It contain ThirdParty.framework, ThirdPartyHeader1.h and ThirdPartyHeader2.h.

The ThirdPartyHeader1.h looks like,

#include "ThirdPartyHeader2.h"
// functions declaration
.
.
.

I can convert ThirdParty.framework to ThirdParty.xcframework with command xcodebuild succeeded.

xcodebuild -create-xcframework -framework ThirdParty.framework -output ThirdParty.xcframework

I create a swift package MyPackage to use them(Local XCFramework).

MyPackage folder structure

MyPackage
├── Package.swift
├── README.md
├── Sources
│ └── MyPackage
│ └── MyPackage.swift
├── Tests
│ └── MyPackageTests
│ └── MyPackageTests.swift
├── ThirdParty.xcframework
├── ThirdPartyHeader1.h
└── ThirdPartyHeader2.h

Q1)Where do I put ThirdParty.xcframework, ThirdPartyHeader1.h and ThirdPartyHeader2.h to correct place?
I try to use binaryTarget for xcframework, but It not works.
Q2)How do I configure header search path for local binaryTarget?
Q3)Anyone could give me advice?

Thanks

Terms of Service

Privacy Policy

Cookie Policy