Cannot load module coreData as CoreData
You have a namespace clash with apples own CoreData framework. Rename your project or create a new one with a different name and move your files across.
xcode 7 + coredata : cannot import module being compiled
This is happening because you project has the same name as the CoreData framework, try renaming your project and it should work.
CoreData: warning: Unable to load class named
This warning is one of the quirks we have to deal with while the details of the Swift implementation are being ironed out. The warning occurs spuriously, i.e. your setup might work even if you do not follow the steps outlined below.
I have been able to get rid of it in most cases by making sure that the class is set correctly in the model editor. Unlike in many other SOF posts (including answers to this question), the suggestion to include the module name (like MyApp.Shows
) has not helped me.
Make sure you check these three items:
1.
Version that works up to Xcode 7 beta 3
Notice that I corrected your entity name to the more appropriate singular.
Version that works for Swift 2.0 in Xcode 7.1
(Should work for Xcode 7 beta 4 and above)
You need to delete the text "Current Product Module" in Module!
2.
You should also follow the frequent recommendation to include
@objc(Show)
just above your class.
Note: If you are using Xcode 7 beta 4 or later, this step is optional.
3.
Also make sure to cast the created managed object to the proper class, as the default would be just NSManagedObject
.
var newShow = NSEntityDescription.insertNewObjectForEntityForName("Show",
inManagedObjectContext: context) as Show
file viewController.swift is part of module coreData ignoring import
Is your project name "CoreData" ? You can't call your project with the name of a module. Try creating another project with another name
Codegen for CoreData entity not working in Xcode 11
Try creating a new project with a different name (not CoreData)
Related Topics
Non-Modular Headers of Openssl Library When Using Modulemap for Swift Framework
C-Style Uninitialized Pointer Passing in Apple Swift
Repeating Action Continuously in Swiftui
How to Trigger Updateuiview of a Uiviewrepresentable
iOS Corebluetooth: Startadvertising() Error Advertising Static Data
Show User Location on Map Swiftui
Avplayerviewcontroller Black Screen When Swiping on iOS 11
Using 'If-Case' Format in Boolean Assignment in Swift
Delegate Property with Different Type in Swift
How to Change the Colour of Separator in List of Swiftui
Nsinvocationoperation' Is Unavailable in Xcode 6.1
How to Fix Error: Abort Trap 6 (In Target 'Realmswift' from Project 'Pods')
Firebase iOS Receive Data from Push Notification