<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi, Victor. The particular things I'd look at are<div class=""><br class=""></div><div class="">- Make sure the protobuf-generated headers end up in the final "Headers" folder of your framework. (You may need to add a custom "Copy Headers" build phase, not sure.)</div><div class="">- Make sure your all #imports use the angle-bracket style: <MyFramework/GPBProtocolBuffers.h> rather than "GPBProtocolBuffers.h".</div><div class="">- Make sure your umbrella header imports all of the generated headers you want to be visible from Swift. (You can also do this with a <i class="">custom module map,</i> but this way is simpler.)</div><div class=""><br class=""></div><div class="">I'm guessing it's #2 that might be some trouble. I'm afraid any issue there might have to be taken up with the ObjC protobuf folks.</div><div class=""><br class=""></div><div class="">Hope that helps,</div><div class="">Jordan<br class=""><div class=""><br class=""></div><div class="">P.S. The related problem of "this should just be an implementation detail of my framework; why is it in my umbrella header?" is something we know is an issue, but which needs a bit of design work to get right. (Both the compiler and the debugger need to know what they can and can't assume about a framework.)</div><div class=""><br class=""><br class=""><blockquote type="cite" class="">On Jan 25, 2016, at 15:14, Victor Leong via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:<br class=""><br class="">Hey everyone,<br class=""> <br class="">I'm running into a very specific case right now and I'm wondering if anyone has any experience with this situation.<br class=""> <br class="">I have a Swift project that is using a custom Swift framework that I created. The Swift framework contains a bunch of public objects that can be used by the projects that import this framework.<br class=""> <br class="">I now want to change those public objects to be defined and generated by Google Protocol Buffers. Currently, Google's supported languages only has Objective-C and not Swift for iOS classes so I have generated a bunch of Objective-C classes. This is where the problem comes in.<br class=""> <br class="">If I want to use the Objective-C classes in Swift inside and outside of the Framework, I need to include the generated class headers into the framework's umbrella header. In Xcode 7.1 and above, the Swift compiler has become very strict and will not accept non-modular headers. I've made all the generated classes public but their imported classes all need to be public as well which also need to be made public, and since this is the protobuf Framework, this is made much harder.<br class=""> <br class="">eg. #import "GPBProtocolBuffers.h" //This has to be made public and everything GPBProtocolBuffers.h has to be modular etc.<br class=""> <br class="">I need my generated Objective-C classes to be made public and accessible to everything that imports that framework I've created. Has anyone come across this before and have a reasonable solution?<br class=""> <br class="">Summary:<br class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Have a Swift project using a Swift framework's public objects.<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Changed the framework's objects to Google Protocol Buffer generated Objective-C classes.<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• The Objective-C classes have to be added to the umbrella header so Swift can access them.<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Swift compiler complains about inclusion of non-modular classes.<br class=""></div> <br class="">Thanks,<br class="">Vic<br class="">_______________________________________________<br class="">swift-users mailing list<br class=""><a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-users<br class=""></blockquote><br class=""></div></div></body></html>