magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.8k forks source link

use_frameworks! causes error: include of non-modular header inside framework module 'MagicalRecord.MagicalRecord_ShorthandMethods' #1276

Closed elviin closed 5 years ago

elviin commented 7 years ago

I use cocapods v1.1.1. Using MagicalRecord (2.3.2) I have already in my Podfile pod 'MagicalRecord'. In the file I have also added use_frameworks! instruction and also the library pod 'Socket.IO-Client-Swift'.

The Swift library requires using use_frameworks! in the Podfile.

When building I get the errors:

` While building module 'MagicalRecord' imported from .../MagicalRecord/MagicalRecord.framework/Headers/NSManagedObjectContext+MagicalSaves.h:10:

.../Build/Products/Debug-iphonesimulator/MagicalRecord/MagicalRecord.framework/Headers/MagicalRecord+ShorthandMethods.h:4:9: error: include of non-modular header inside framework module 'MagicalRecord.MagicalRecord_ShorthandMethods' [-Werror,-Wnon-modular-include-in-framework-module]
#import <MagicalRecord/MagicalRecord.h>

.../Build/Products/Debug-iphonesimulator/MagicalRecord/MagicalRecord.framework/Headers/NSManagedObjectContext+MagicalSaves.h:10:9: fatal error: could not build module 'MagicalRecord'

import <MagicalRecord/MagicalRecordDeprecationMacros.h>

 ~~~~~~~^
2 errors generated.

`

amleszk commented 7 years ago

Related to closed issue: https://github.com/CocoaPods/CocoaPods/issues/4420

Coeur commented 5 years ago

@amleszk that issue was marked as resolved in CocoaPods 1.0.0, but elviin was using CocoaPods 1.1.1.

I'll try to see if I reproduce the issue nowadays (CocoaPods 1.6.2 +) or not.

Coeur commented 5 years ago

I took the objective-c MagicalRecordRecipes sample from the project:

=> I only got some deprecation warnings, no building error related to MagicalRecord.

Coeur commented 5 years ago

I'll apply a minor import improvement in #1350 for next release. But as I can't reproduce your issue, I'll close it.