You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have not found an api to perform all steps required to add a swift package to project.
When a swift package is added to an xcode project, it is modified as follows:
a single entry is added to XCRemoteSwiftPackageReference section
a single entry is added to PBXProject section
an entry for each package product is added to XCSwiftPackageProductDependency section
an entry for each package product is added to PBXFrameworksBuildPhase section, for given target
an entry for each package product is added to PBXBuildFile section (the entry has productRef attribute in place of fileRef), for given target
an entry for each package product is added to PBXNativeTarget section, for given target
As a side note, a file *.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved is also created, but I think this is out of scope.
I have modified mod-pbxproj and added an add_package function that performs the steps stated above. It can be used as follows:
This code just suits my needs but if you find it a viable solution, I would be happy to add tests, refactor, accept suggestion for improvement and contribute a pull request.
Regards
The text was updated successfully, but these errors were encountered:
I have not found an api to perform all steps required to add a swift package to project.
When a swift package is added to an xcode project, it is modified as follows:
XCRemoteSwiftPackageReference
sectionPBXProject
sectionXCSwiftPackageProductDependency
sectionPBXFrameworksBuildPhase
section, for given targetPBXBuildFile
section (the entry hasproductRef
attribute in place offileRef
), for given targetPBXNativeTarget
section, for given targetAs a side note, a file
*.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
is also created, but I think this is out of scope.I have modified
mod-pbxproj
and added anadd_package
function that performs the steps stated above. It can be used as follows:You can take a look the patch master...garrik:develop
This code just suits my needs but if you find it a viable solution, I would be happy to add tests, refactor, accept suggestion for improvement and contribute a pull request.
Regards
The text was updated successfully, but these errors were encountered: