Skip to content

SPM Package file not defining linked frameworks #73

@jonnyklemmer

Description

@jonnyklemmer

I noticed the README / website docs instruct users to manually link the relevant frameworks for SPM rather than Singular defining them in the Package.swift file.

Presumably the best approach is for this framework to own its own dependencies on system libraries so for example when things like iAd are no longer required (as the current pod spec implies) the README docs don't become outdated.

In SPM this can be done by simply adding the following to the Package.swift target:

linkerSettings: [
    .linkedLibrary("z"),
    .linkedLibrary("sqlite3"),
    .linkedFramework("Security"),
    .linkedFramework("AdServices"),
    .linkedFramework("Webkit"),
    .linkedFramework("AdSupport"),
    .linkedFramework("StoreKit"),
    .linkedFramework("SystemConfiguration"),
]

Side-note: From my understanding SPM should automatically take care of not linking frameworks when they are unavailable for the given OS (ex AdServices before iOS 14.3). I didn't test this myself yet.

Is this something the team is open to including? Or any concerns/reasons why it wasn't done this way? Happy to open a PR if this approach works.

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions