The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

iOS/Xcode: Include of non-modular header inside framework module

Nick_Russell
2021-09-27 04:49:32

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': '/LoadBalancing-objc/inc/EGLoadBalancingClient.h'.

Sorry if this question has already been answered - I'm quite new to linking C++/ObjC into swift.

Comments

Kaiserludi
2021-09-27 18:15:55

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.

Nick_Russell
2021-09-28 01:14:28

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:

https://forum.photonengine.com/discussion/18963/ios-exc-bad-access-exitgames-photon-internal-peerbase-getconnectionprotocol#latest

Back to top