Search code examples
iosios-frameworks

Multiple iOS Framework, nested "Library Not loaded" issue if Main Framework name is "Network"


This is really strange issue, I have encountered today with XCode version 10.1

I had created iOS Framework, named "ProjectInterfaces" earlier.

Then I created another iOS Framework named "Network" which has the dependency on ProjectInterfaces framework. Now while running the unit test cases for Network project, I was getting the error saying "Library Not found" with some @rpath error.

Then, I created another framework with name of "ProjectNetwork" and followed the same steps and it worked.

I repeated the same steps by creating a fresh framework with same name "Network", thinking I might have had altered some build settings earlier. But nope, I got same issue as earlier.

So my question, Is there any restriction of use of "Network" keyword as framework, please try these steps your self?


Solution

  • Yes, you cannot name the framework which already exists.

    Network.framework is already exists in iOS 12.0+, macOS 10.14+ and tvOS 12.0+

    Please refer here

    Hope it helps