iOS/Xcode: Include of non-modular header inside framework module
I have a native Swift iOS app (A). This app has an Augmented Reality aspect of the app which I keep separated into a Swift framework (B). I would like to include the LoadBalancing-objc library into framework B to make the AR aspect multiplayer.
I have followed these steps: https://forum.photonengine.com/discussion/comment/17052#Comment_17052), and am importing "LoadBalancing-objc/inc/EGLoadBalancingClient.h" into B.h.
However, I am getting this error:
Include of non-modular header inside framework module 'B': '<PhotonPath>/LoadBalancing-objc/inc/EGLoadBalancingClient.h'.
Sorry if this question has already been answered - I'm quite new to linking C++/ObjC into swift.
Answers
-
Hi @Nick_Russell.
This isn't anything Photon-specific and we don't have experience with this kind of issue, but a quick google-search for the error message "Include of non-modular header inside framework module" suggests, that you need to import the Photon headers inside a .swift file in B and not inside B.h.
0 -
Hi @Kaiserludi
Thanks for the response.
My problem was that I was treating my Framework Umbrella Header as if it was an application Bridging Header. I ended up creating a module map as described here: https://stackoverflow.com/a/37072619/12454116 which seems to be working.
I am now having a separate crash issue however which I have logged here:
0