Xcode continues to forget imported Framework

I have Xcode 6.3 using Swift, importing the Parse 1.7.1 Framework as usual (drag and drop, copy) and I configured it in the group: Framework.

I am compiling and working fine all the time until the compiler no longer recognizes this sentence:

import Parse 

This gives me an error:

 No such module 'Parse' 

The workaround is to remove the Framework and copy it again, but after a while it starts to annoy, and I really would like to know the reason.

I am only coding and creating at this time (and sometimes creating new fast files), so I cannot explain why this is happening.

+6
source share
2 answers

I just fixed the same problem today with my project. I imported my obj-c infrastructure into a quick project and it worked for a while, then xcode seems to forget that this is causing the same error.

apple docs

I fixed it by specifying the bridge title in the build settings.

In the Build Settings section, make sure that the Objective-C Bridging Header header in the Swift Compiler - Code Generation section has a path to the header. The path should be relative to your project, a similar path to your Info.plist path is specified in the build settings. In most cases, you do not need to change this setting.

I just typed the name of the middle header folderName / xxxx-BridgingHeader.h into the field that indicates the bridge header, and everything was fine again.

+4
source

If you are targeting iOS 8 and above, you can tell Cocoapods use frameworks by putting

 use_frameworks! 

in your Podfile , as in this example:

 use_frameworks! platform :ios, '8.0' # Parse pod 'Parse', '~> 1.7' 

I could solve the same problem by doing this.

+5
source

Source: https://habr.com/ru/post/986463/


All Articles