110

All attempts to import a dynamic framework in an Xcode playground yield the following error:

error: module file's minimum deployment target is ios8.3 v8.3
Vatsal Manot
  • 17,695
  • 9
  • 44
  • 80

9 Answers9

169

You might have created a target after updating Xcode, which made 8.3 the iOS Deployment Target in Build Settings for that target.

I fixed this by:

  1. Setting the iOS Deployment Target to 8.0 (Which is the same as the rest of the project)

Note iOS version mismatch in this screenshot (one is 10.0, other is 9.3) Note iOS version mismatch

Note iOS versions now match (make sure they all match) iOS versions changed to match

  1. Doing a clean (Command+Shift+k) and build

If a clean+build doesn't fix it, switching the device/simulator that you are deploying to from the scheme menu and building again should help.

Community
  • 1
  • 1
alreadytaken
  • 2,146
  • 2
  • 16
  • 17
  • Just a note: this issue has been resolved with the GM build of Xcode 6.3. – Vatsal Manot May 14 '15 at 05:55
  • 5
    Not for me .. just got the build and the issue is still applicable for me. – Nate Uni May 15 '15 at 12:56
  • I had to try multiple times: When I changed the deployment target, it didn't seem to actually change until I switched to a different deployment device. Then it finally worked. – Suz May 29 '15 at 17:51
  • Changing the deployment target of my Xcode project fixed the problem for me. – King-Wizard Jul 09 '15 at 13:15
  • Same problem Version 7.2.1 (7C1002) – William Entriken Feb 20 '16 at 22:56
  • I wonder, how dynamic framework and the app would behave during runtime on iOS 8, if the app deployment target is set to iOS 8.0 and the framework's is iOS 9.0. ? – Yevhen Dubinin Sep 29 '16 at 10:46
  • 1
    @EugeneDubinin: It would crash upon usage of non-existent APIs. Developers attempting to support multiple iOS versions usually implement runtime checks for these sort of things. – Vatsal Manot Nov 27 '16 at 05:46
  • For case: "Module file's minimum deployment target is ios10.0 v10.0", My target was already 10.0. I cleaned and rebuilt: no joy I changed deployment target, cleaned rebuild: no joy I changed target to 10.1, clean rebuild, change back to 10.0, clean rebuild: no joy. Could not resolve issue with this solution. – Jacob F. Davis C-CISO Jan 20 '18 at 16:19
  • This answer explained in a different way led me to the answer: https://stackoverflow.com/questions/32692828/module-files-deployment-target-is-ios9-0-v9-0-with-xcode-7-swift-2 I edited this answer by adding screenshots to show exactly where to change the iOS version data. – Jacob F. Davis C-CISO Jan 20 '18 at 16:25
  • Got this error in xCode 9.4 with iOS 11.4 while working through Ray Wenderlich's Framework Tutorial (https://www.raywenderlich.com/126365/ios-frameworks-tutorial) . There was an old IOS 8.0 target buried deep in the test suite settings structure that @JacobDavis 's post help me find. – Michael Jun 02 '18 at 18:37
81

This error might also crop up if you're unit testing. So in addition to what @Tony and @Allreadyhome has suggested, do the following:

  • With your test target selected, go to 'Build Settings'
  • Search for 'iOS Deployment target' at the top search bar.
  • Change the value for the iOS Deployment Target accordingly, (in the context of this question, you will change the deployment target to 8.0)

And you should be good.

Vick Swift
  • 2,945
  • 1
  • 15
  • 17
  • 3
    I've been looking for a way to do this for weeks! Thanks a lot! Just a hint, maybe it won't show up if the tab "Basic" is selected. Choose "All" before searching and you'll be good to go. – jotaEsse Aug 05 '16 at 14:52
  • 1
    This also led me to check the "Project"s build settings, and they were old, too. Updated those, and now I'm golden! Thanks! – u2Fan Jan 30 '19 at 17:32
  • "With your test target selected..." was what I was missing from other answers. – gnarlybracket Apr 08 '20 at 21:08
18

As mentioned by Tony you have to

1. Set the iOS Deployment Target to 8.0

If using Pods the further step you may need to do:

2. Go into the Pods dependancies and change the deployment targets to 8.0 also.

In my case, I had to change the deployment target on each of my pods to 8.0 as they were all on 8.3.

Allreadyhome
  • 1,252
  • 2
  • 25
  • 46
12

In your Pod File, just delete the comment at this line:

platform :ios, '8.0'

It work for me.

Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116
6

I've encountered error:

Module file's minimum deployment target is ios9.2 v9.2

After I changed the iOS deployment target to 8.0 for my PROJECT. The project is created by Xcode 7.2, with 'Include Unit Tests' and 'Include UI Tests' checked.

Because of the XCUIApplication() requires iOS 9.0+, to fix the error, just change the deployment target of UI Tests to 9.0 or above, and leaves 8.0 for other targets.

Nianliang
  • 2,926
  • 3
  • 29
  • 22
2

1) Goto, Target -> General -> deployment Info

2) set the deployment Target as the one being prompted in the error message(8.3 in your case).

3) product -> clean

4) product -> Build

priya
  • 69
  • 2
1

I had this problem when the minimum deployment target of a select few dependencies was set to a more recent iOS version than main targets minimum deployment target.

1

I had the same issue when i downloaded a framework tutorial with ios 12 & my sdk has to have ios 11.4. I set the iOS Deployment Target to the version I needed(11.4) and updated the Pods dependancies also. But missed a few. So, then I did a search with the version that i wanted to change (that is 12.0). It just lists everything that has the version number (target, project, podspec, pods). Changing everyone of those (to 11.4 in my case), solved it.

anoo_radha
  • 812
  • 1
  • 15
  • 34
0

We must change 2 place to get new deploy version. After that, clean build (Command+Shift+k) and build again.

enter image description here

enter image description here

Trần Hữu Hiền
  • 872
  • 1
  • 9
  • 22