Avijit Das
Avijit Das

Reputation: 300

Xcode 7 Swift Framework Cannot import module being compiled

My framework WebCoreDataStaticLibrary was working fine with ios 8.3 in Xcode 6.3. After I updated to ios 9 and Xcode 7 I am not able to compile my framework. This framework contain both swift and Objective C classes.

I have converted to To Latest Swift Syntax via Xcode

In any swift classes where I have imported WebCoreDataStaticLibrary its coming Cannot import module being compiled.

import WebCoreDataStaticLibrary Cannot import module being compiled

As a result I am not able to build the framework As a result getting this fatal error.

fatal error: lipo: can't open input file: /*/Developer/Xcode/DerivedData/A3WebCoreDataStaticLibrary-ctaegtiwmwhrsdeggeswpkjvucua/Build/Products/Debug-iphonesimulator/A3WebCoreDataStaticLibrary.framework/A3WebCoreDataStaticLibrary (No such file or directory) Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure

enter image description here

Project Settings

enter image description here

Upvotes: 0

Views: 934

Answers (1)

Jeffery Thomas
Jeffery Thomas

Reputation: 42598

It's telling you the problem. It can't find A3WebCoreDataStaticLibrary.framework/A3WebCoreDataStaticLibrary.

I even know why. There is no directory on your file system named /*/.

Something in your project settings is set wrong. My guess is your Framework Search Paths is wrong, or the Link Binary With Libraries section is wrong. Without knowing what's in your project settings, it's hard to tell.


UPDATE The screenshot shows a different error than the description.

At this point, you need to start digging. Go to that directory. Make sure that file exists.

If the file doesn't exist, you need to look at the A3WebCoreDataStaticLibrary target and see why it's not building the framework where you expect it to be.

If the file does exist, then you need to check the build order. It may be building the framework after it tries to build your app.

Upvotes: 1

Related Questions