0

Can we access protocol extensions implemented in a framework outside the framework? I mean suppose there is a target say "Framework" in which I declared a protocol and implemented protocol extension. Now if I try to access this protocol outside the framework it asks me to reimplement the protocol methods. Can we share the extension implemented in the framework?

func createObject<T: NSManagedObject>(type: T.Type, filterPredicate: NSPredicate, context: NSManagedObjectContext) -> NSManagedObject

Thanks

Ankit

Ankit Sachan
  • 7,690
  • 16
  • 63
  • 98
  • You probably have access control set up incorrectly, but without seeing the actual code it's impossible to tell for sure. Did you mark the extension methods using the same access control modifiers as the other methods that are visible outside the framework? – Dávid Pásztor Jun 04 '18 at 19:40
  • @DávidPásztor all the methods, protocols and extensions are public – Ankit Sachan Jun 05 '18 at 06:26
  • @DávidPásztor added sample code the probem seems to be because of generics, normal methods work fine – Ankit Sachan Jun 05 '18 at 06:42

0 Answers0