Is MapKit being deprecated? [duplicate] - ios

After upgrading Xcode to 7.3, I just found that some modules are stricken out while importing, like in this screenshot:
But after adding the module (so just pressing enter) everything is fine. What does that mean? The module here is written in Swift and works fine.

This is a bug. We have fixed it in 218010af, which should be included in the Swift 2.2.1 release and is included in the 2016-04-12-a developer snapshot.

The strikethrough occurs if you try to import a module that has already been imported by your file or module:
In this case, I have already imported Foundation (which implicitly imports CoreFoundation), so Xcode is telling you that there is no need to import either module again.

It usually happens when a framework is already imported by any other framework you have already been imported.
For example, UIKit is already imported with Foundation so you don't need to import it manually.

I changed the order of the imports
import Foundation
import UIKit
import LayerKit
import Atlas < red line
import Foundation
import UIKit
import Atlas
import LayerKit
Some notes that may be causing it:
LayerKit importing Atlas even though LayerKit is the lower level API
Atlas is the UI layer
Both were Cocoapod imports
Error appeared when I created an 2nd Schema for App Store/Enteprise
releases and cleaned one and switch to the other.
Deleting Derived
Data didnt clear it.
So tried rearranging them and red line disappeared

Related

How does imports work in swift?

I frankly have a hard time understanding how imports work in Swift. When I make a new class it will start out with:
import foundation
As an alternative we could use import Swift or import UIKit depending on what libraries we need. BUT I've noticed that if I simply remove the imports my projects runs without any problems (even though I use classes from these libraries). This is where I need some help: I'm wondering if that is because I have internal frameworks that I import Swift/UIKit/Foundation and thereby get the import. So imports works like plague... if they touch a new class everything that class touches will have access to that import.
Yes, when a class that you use imports that framework, it is imported in your class too. This is to make things more clear, for example when class Foo's method abc has a parameter that needs UIKit, which is present in Foundation. Therefore, when you use the class Foo, UIKit is automatically imported.
As a side note, importing UIKit will import Foundation, in which it will also import Darwin. So it is really like plague. If a third party library (such as Charts) imports UIKit, it imports Foundation and Darwin too.
So we found the issue. Someone had added header file to each framework with:
#import <UIKit/UIKit.h>
Removing this line made everything less mad.
Now about how imports works. If a class A in library A import library B, class A will not have access to UIKit even though library B imports UIKit. This is how I'd expect it to work and how it actually works.

Swift compiler crashes when importing RealmSwift

In a totally new project, with no code except for the default template, when I import RealmSwift Xcode shows a Swift compiler error like this:
I've followed the Realm installation guide many times over for both CocoaPods and manually installing into a project.
When I don't import RealmSwift, I can build the project.
I'm using Swift version 3.0.2.
I think you're hitting a known issue with the Swift compiler that leads to it crashing when you import a module with the same name as your application target. In this case, you've named your app target "Realm". That's the name of the Objective-C framework that RealmSwift depends on. Importing RealmSwift attempts to import the Realm module, which causes the compiler to get confused because it's not sure if that Realm module is referring to your app or the Realm framework. Renaming your application target so it doesn't share the name with any other modules you depend on should work around this compiler bug.

Xcode error importing module not being imported

I left Xcode unsupervised for the weekend and I come back and it's telling me I have missing modules Corelocation and SQLite at:
import SQLite
import CoreLocation
both giving me the error Missing required module 'CSQLite'. I'm not sure where its getting "CSQLite" especially in relation to Corelocation
I have the SQLite.xcodeproj added to the general page to be linked it was building fine a couple days ago and absolutely nothing's changed.
In swift, if you want to use sqlite, you can either use modulemap feature of llvm to import c library or you can use cocoapods and import sqlite based any third party pod.

Xcode 7.3: import Module displayed with strikethrough

After upgrading Xcode to 7.3, I just found that some modules are stricken out while importing, like in this screenshot:
But after adding the module (so just pressing enter) everything is fine. What does that mean? The module here is written in Swift and works fine.
This is a bug. We have fixed it in 218010af, which should be included in the Swift 2.2.1 release and is included in the 2016-04-12-a developer snapshot.
The strikethrough occurs if you try to import a module that has already been imported by your file or module:
In this case, I have already imported Foundation (which implicitly imports CoreFoundation), so Xcode is telling you that there is no need to import either module again.
It usually happens when a framework is already imported by any other framework you have already been imported.
For example, UIKit is already imported with Foundation so you don't need to import it manually.
I changed the order of the imports
import Foundation
import UIKit
import LayerKit
import Atlas < red line
import Foundation
import UIKit
import Atlas
import LayerKit
Some notes that may be causing it:
LayerKit importing Atlas even though LayerKit is the lower level API
Atlas is the UI layer
Both were Cocoapod imports
Error appeared when I created an 2nd Schema for App Store/Enteprise
releases and cleaned one and switch to the other.
Deleting Derived
Data didnt clear it.
So tried rearranging them and red line disappeared

The module required to be imported but displayed in strikethrough font in Xcode 7.3 [duplicate]

After upgrading Xcode to 7.3, I just found that some modules are stricken out while importing, like in this screenshot:
But after adding the module (so just pressing enter) everything is fine. What does that mean? The module here is written in Swift and works fine.
This is a bug. We have fixed it in 218010af, which should be included in the Swift 2.2.1 release and is included in the 2016-04-12-a developer snapshot.
The strikethrough occurs if you try to import a module that has already been imported by your file or module:
In this case, I have already imported Foundation (which implicitly imports CoreFoundation), so Xcode is telling you that there is no need to import either module again.
It usually happens when a framework is already imported by any other framework you have already been imported.
For example, UIKit is already imported with Foundation so you don't need to import it manually.
I changed the order of the imports
import Foundation
import UIKit
import LayerKit
import Atlas < red line
import Foundation
import UIKit
import Atlas
import LayerKit
Some notes that may be causing it:
LayerKit importing Atlas even though LayerKit is the lower level API
Atlas is the UI layer
Both were Cocoapod imports
Error appeared when I created an 2nd Schema for App Store/Enteprise
releases and cleaned one and switch to the other.
Deleting Derived
Data didnt clear it.
So tried rearranging them and red line disappeared

Resources