compiling for iOS 14.0, but module 'MockTechPost' has a minimum deployment target of iOS 15.0

Viewed 5090

i have seen other post simmilar to this and their solution is either upgrade it to ios 15 or put @available ios xx, I've done both and still got this error, are there any other solution? thank you

<unknown>:0: error: compiling for iOS 14.0, but module 'MockTechPost' has a minimum deployment target of iOS 15.0: /Users/fdika24/Library/Developer/Xcode/DerivedData/MockTechPost-gkosutlxcjcxfobkjgdzjwenfqcr/Build/Intermediates.noindex/MockTechPost.build/Debug-iphonesimulator/MockTechPost.build/Objects-normal/arm64/PostsDataSource~partial.swiftmodule
Command MergeSwiftModule failed with a nonzero exit code
7 Answers

I had the same problem and solved it by deleting the folder corresponding to the application for which compilation failed in: ~/Library/Developer/Xcode/DerivedData/ Then recompile. The folder is re-created and compilation went well, at least for me.

I just had this and after checking all the settings were correct in the Build Settings tabs a "Product -> Clean Build Folder" solved it without manually having to delete folders.

So you have to set both Project and Target version.

Project:

Project

Target:

Target

I have fixed it,and this might sound crazy but the solution is not upgrading it into ios 15, adding a reference to the Main storyboard is the solution, crazy huh

Product -> Clean build folder -> Build. Worked for me

Deleting derived data worked for me ~/Library/Developer/Xcode/DerivedData/ but also make sure that other targets have the same deployment target like your app ones have such as Tests, UITests tests etc. After that recompile the app and everything should work

Click on your project and go to "General" tab and make sure the deployment target for your project is iOS 15.0 as shown here:

enter image description here

Also, check the same for this configuration property has in "Build Settings" tab

deployment target

Related