IT박스

빠른.

itboxs 2020. 8. 5. 08:01
반응형

빠른. objective-c 모듈 'Alamofire'를 만들 수 없습니다


XCode6을 사용하고 T 방향을 따르는 Alamofire의 새로운 바닐라 서브 모듈 설치. 여기에 맞는 것은 맞지 않습니다. 내가 가져 오는 오류는 "import alamofire에서 objective-c 모듈"alamofire를 만들 수 없습니다 "입니다. 다음은 오류가 발생한 스크린 샷입니다.

여기에 이미지 설명을 입력하십시오 그리고 내 구성 :

여기에 이미지 설명을 입력하십시오


이런 경우에는 먼저 프레임 워크를 별도로 빌드하십시오. 귀하의 경우 :

  • 계획을 Alamofire로 변경
  • 빌드 ( ⌘B )
  • 당신의 계획으로 다시 변경
  • 운영

Developer / Xcode / DerivedData로 이동하여 프레임 워크의 폴더를 삭제하십시오. (또는 단지 DerivedData 자체를 삭제하십시오)

실행중인 시뮬레이터에 앱 빌드가있는 경우 앱을 삭제해야합니다.

그런 다음 청소 및 빌드


이것은 항상 나를 위해 작동합니다 :

  1. Xcode 종료
  2. 지우다 ~/Library/Developer/Xcode/DerivedData
  3. Change to your framework’s scheme and build ⌘B
  4. Change to your app’s scheme and build ⌘B

Deleting the DerivedData folder and cleaning and building the project solved this issue for me.


If you're getting this error trying to import a dynamic framework, make sure the framework is included in the target's Target Dependencies.

Project > "Target" > Build Phases > Target Dependencies


Build clean worked for me.

  1. Build clean for Alamo
  2. Build clean for HTTPDemo

Try the following in this order and one of the steps should work.

  1. Cmd+B - Builds the workspace and should possibly build the target or module we want.

  2. Cmd+K and then Cmd+B - Clean and then Build

  3. Cmd+Shift+Option+K and Cmd+B - Clean Build Folder

  4. Quit Xcode, Delete Derived Data, launch Xcode and Cmd+Shift+Option+K then Cmd+B

This happens to be the cleanest possible way to clean the derived data and other caches from Xcode.


Comment out the import and all code using it, build, run, then uncomment. It worked for me...


I resolved this issue in one of my Objective-C/Swift hybrid projects.

In your Objective-C bridging file, add the following line:

#import <Alamofire/Alamofire.h>


Any pod failed to build may cause this error as well. (in my case an old pod using obsolete syntax failed to build).

You may try pod update to update your pods to latest version and see how thing goes.

참고URL : https://stackoverflow.com/questions/26834293/swift-could-not-build-objective-c-module-alamofire

반응형