Module file's deployment target is ios9.0 v9.0 with Xcode 7 / Swift 2
Same, in my case
Selected TARGETS
,
then go to "Build Settings
"
Search for "iOS Deployment target
” in search bar
Changed it from iOS 8.2
to 9.0
- in all
error: module file's minimum deployment target is ios8.3 v8.3
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:
- 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 versions now match (make sure they all match)
- 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.
Compiling for iOS 9.0, but module 'BSGridCollectionViewLayout' has a minimum deployment target of iOS 10.0
Your screen snapshot is showing the deployment target for the app, but you have to look at the deployment target of the dependency. E.g. if using Cocoapods:
By default, it uses the deployment version of the pod. But if you validate your project settings, it will try to change the deployment version, so I would uncheck that option during the settings validation process.
Upgrading project target to iOS 9.0
I found the answer in many places but it look different from the answers images.
Answer: Can no longer import app module into unit tests after changing deployment target
The deployment target settings of the test target that was needed to change, the title was labeled (null) - Deployment which threw me into a confusion. I have no idea why it is labeled such way, maybe something to do with some other settings which might had been modified by the previous developers working on the project.
Hope it helps someone.
My project's iOS deployment target is set to iOS 9.0 and i want to integrate Reality Kit in my app for iOS 13.0 and up
This happens because the framework RealityKit
always imports even though the device does not have that framework. The solution is to make it optional based on the device you are using.
- Go to you project's
Build Settings
. - Go to
Linking
->Other linker Flags
- Double click
Other linker Flags
values to add a new one. - Press add button then type
-weak_framework RealityKit
That should do it. Enter then run your app.
Hope this helps. Happy Coding. :D
swift 2.0 compatibility with iOS 7
For UIAlertController
, you can use the code below, but for try catch
no errors shows on my XCode.
if #available(iOS 8.0, *) {
let alertController = UIAlertController(title: "提示", message: hint+"不能为空", preferredStyle: .Alert)
let OKAlert = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil)
alertController.addAction(OKAlert)
self.presentViewController(alertController, animated: true, completion: nil)
} else {
let alertController: UIAlertView = UIAlertView(title: "提示", message: "不能为空", delegate: nil, cancelButtonTitle: "OK")
alertController.show()
}
EDIT:
Just wondering can you try:
if #available(iOS 8.0, *) {
do {
let str = try NSString(contentsOfFile: "Foo.bar",
encoding: NSUTF8StringEncoding)
}
catch let error as NSError {
print(error.localizedDescription)
}
}else{
#your code works on ios7
}
Playground execution failed:
I think I found what the problem is.
I opened an Xcode 6 playground file in Xcode 7.
When I create a new playground in Xcode 7 it works fine.
UIStackView before iOS 9.0
Check inProject Targets-> Deployment info -> Deployment Target
.If it's not 9.0 change it to 9.0.
You need to change the deployment target of your application's target to iOS 9. Otherwise the app supports down to whatever OS that your deployment target is set to.
Not solved?? Check out for other reason??? Check this:
If your Deployment target is already set to 9.0 and you still get this error then try then check your project File inspector-> Project Document -> Project Format
and check if its Xcode-6.3-compatible
or not.If its not then set it to Xcode-6.3-compatible
.
The other reason is may be you accidentally add UIStackView
and thats why you encounter the problem. UIStackView
supports 9.0 and later and your deployment target doesn't allow that. So just check if you accidentally add UIStackView
and if you added and you don't want it than just remove it.
Note: setting the deployment target to 9.0 means that only devices running iOS9 will be able to run your app
Related Topics
Swift Remove Object from Realm
Button Border with Transparent Background in Swift
How to Insert an Image Inline Uilabel in iOS 8 Using Swift
Swift Error When Trying to Access Dictionary: 'Could Not Find Member 'Subscript''
Swift Only -- Reading from Nsinputstream
How to Setup Viewcontroller in Playgrounds
Window Visible on All Spaces (Including Other Fullscreen Apps)
Uitableviewrowaction with Icon and Text
How to Launch an External Process
Speed Up Xcode Swift Build Times
How to Create Custom Uimenucontroller with Only Custom Items Other Than Default
Getting Timed Metadata in Swift iOS 8 from M3U8 Streaming Video
Uipopovercontroller, Xcode 6, iOS 8 Using Swift
How to Create a Cgsize in Swift
How to Call a Static Function on a Protocol in a Generic Way