gonzalezreal / Groot

From JSON to Core Data and back.
Other
534 stars 61 forks source link

Cocoapods Groot compile problem #51

Closed KrisToe4 closed 9 years ago

KrisToe4 commented 9 years ago

Hi there,

I'm pretty new to cocoapods as well as xcode/iOS development in general so I'm likely doing something wrong. I've set up CocoaPods itself (I tested it with AFNetworking) but when I include Groot it gets a ton of compile errors. Is there something else I need to include as well?

Below are the copied compile errors (not sure if its actually useful or not). All I'm doing is adding pod 'Groot' to my Podfile and running the install and then trying to compile the project:

CompileSwift normal x86_64 /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.swift cd /Users/kristoforwilson/Projects/cps-inspection/Pods /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.swift /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/NSValueTransformer+Groot.swift -target x86_64-apple-ios8.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.4.sdk -I /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Products/Debug-iphonesimulator -F /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Products/Debug-iphonesimulator -g -import-underlying-module -module-cache-path /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/ModuleCache -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Groot-generated-files.hmap -Xcc -I/Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Groot-own-target-headers.hmap -Xcc -I/Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Groot-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Groot-project-headers.hmap -Xcc -I/Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/kristoforwilson/Projects/cps-inspection/Pods/Headers/Private -Xcc -I/Users/kristoforwilson/Projects/cps-inspection/Pods/Headers/Private/Groot -Xcc -I/Users/kristoforwilson/Projects/cps-inspection/Pods/Headers/Public -Xcc -I/Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/DerivedSources/x86_64 -Xcc -I/Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -ivfsoverlay -Xcc /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/unextended-module-overlay.yaml -Xcc -working-directory/Users/kristoforwilson/Projects/cps-inspection/Pods -emit-module-doc-path /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Objects-normal/x86_64/Groot~partial.swiftdoc -Onone -module-name Groot -emit-module-path /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Objects-normal/x86_64/Groot~partial.swiftmodule -serialize-diagnostics-path /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Objects-normal/x86_64/Groot.dia -emit-dependencies-path /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Objects-normal/x86_64/Groot.d -emit-reference-dependencies-path /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Objects-normal/x86_64/Groot.swiftdeps -o /Users/kristoforwilson/Library/Developer/Xcode/DerivedData/cps-inspection-donliihuvlglwhbfwljnwvpimznd/Build/Intermediates/Pods.build/Debug-iphonesimulator/Groot.build/Objects-normal/x86_64/Groot.o

:1:9: note: in file included from :1: # import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ``` ^ ``` /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: # import "Groot.h" ``` ^ ``` /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: # import ``` ^ ``` /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:42:30: error: expected '>' - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ :1:9: note: in file included from :1: #import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: #import "Groot.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: #import ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:42:4: error: nullability specifier 'nullable' cannot be applied to non-pointer type 'NSArray' - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ :1:9: note: in file included from :1: #import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: #import "Groot.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: #import ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:42:30: error: expected ')' - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:42:3: note: to match this '(' - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ :1:9: note: in file included from :1: #import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: #import "Groot.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: #import ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:42:1: error: interface type 'NSArray' cannot be returned by value; did you forget \* in 'NSArray'? - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ :1:9: note: in file included from :1: #import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: #import "Groot.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: #import ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:60:13: error: expected ')' - (nullable __kindof NSManagedObject *)objectWithEntityName:(NSString *)entityName ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:60:3: note: to match this '(' - (nullable __kindof NSManagedObject *)objectWithEntityName:(NSString *)entityName ^ :1:9: note: in file included from :1: #import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: #import "Groot.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: #import ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:76:30: error: expected '>' - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ :1:9: note: in file included from :1: #import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: #import "Groot.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: #import ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:76:4: error: nullability specifier 'nullable' cannot be applied to non-pointer type 'NSArray' - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ :1:9: note: in file included from :1: #import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: #import "Groot.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: #import ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:76:30: error: expected ')' - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:76:3: note: to match this '(' - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ :1:9: note: in file included from :1: #import "/Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Target Support Files/Groot/Groot-umbrella.h:3: #import "Groot.h" ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34:9: note: in file included from /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/Groot.h:34: #import ^ /Users/kristoforwilson/Projects/cps-inspection/Pods/Groot/Groot/GRTJSONSerialization.h:76:1: error: interface type 'NSArray' cannot be returned by value; did you forget \* in 'NSArray'? - (nullable NSArray<__kindof NSManagedObject *> *)objectsWithEntityName:(NSString *)entityName ^ :0: error: could not build Objective-C module 'Groot'
gonzalezreal commented 9 years ago

Hi there,

Which version of Xcode are you using? Starting from Groot 1.2 you need Xcode 7. Use pod ‘Groot’, '1.1' for Xcode 6.

If you're not using Swift at all, you can use the objective-c only subspec: pod 'Groot/ObjC', '1.1'.

Let me know if that works for you.