Proper Setup for Swift Package to inherit Privacy Settings from iOS Info.plist

Hey, I've written a small swift library for discovering ssdp devices and created a swift package for this. This library uses another library (BlueSocket) as dependency.

Now I wanted to use this library within my iOS application and did add it as SPM dependency. For the Simulator everything is fine, on the real iOS14 device I get some problems which led (to me) to a strange behavior (As ssdp is used within the local network I've added the NSLocalNetworkUsageDescription property to my info.plist).

I would expect, everything to work after the user has granted this permissions. But the BlueSocket library (the dependency used by my own library) seems not have access to the local network.

The really strange behavior for me now starts at the following point. To exclude problems within my code, I've moved over all of my library code and included it directly within the Xcode project. The BlueSocket Library is now referenced from my Xcode Project via SPM (instead only by my library). And now everything works as expected, also on the device.

As I understood, the privacy settings from the info.plist should work for the application and than for all dependencies and integrated frameworks and libraries. But in this case it does not seem to work.

So my question is if I have to setup anything within my Swift Package that has to be configured to work in such a way, that also a dependency of this library has the valid permissions?

I appreciate any hints or help.

1 Like
Terms of Service

Privacy Policy

Cookie Policy