Getting "Include of non-modular header inside framework module " when following tutorial. Help?

Discussion in 'iOS Programming' started by Dookieman, Mar 31, 2016.

  1. Dookieman macrumors 6502

    Joined:
    Oct 12, 2009
    #1
    So I'm having a difficult time following this tutorial. https://github.com/processone/xmpp-messenger-ios

    I get all good when installing via cocoapods but I can't get passed step 1. After I import xmpp_messenger_ios and a clean, I keep getting these errors:

    Include of non-modular header inside framework module 'XMPPFramework.XMPPStream'
    Include of non-modular header inside framework module 'XMPPFramework.XMPPLogging'
    Could not build Objective-C module 'XMPPFramework'

    Anyone help me out? I've been trying for hours to get past this first step....
     
  2. Dookieman thread starter macrumors 6502

    Joined:
    Oct 12, 2009
  3. tyche macrumors 6502

    Joined:
    Jul 30, 2010
    #4
    I did this using a new Swift project using the latest Xcode. I got some errors but not what I think you got.

    I tried the initial part and got it running. In my Podfile, I used 9.0 as the ios version instead of 8.0, did my pod init and opened the workspace project. Added the import in app delegate and doing a build fails with 2 code errors that xcode had recommended fixes which I took. It would not compile properly until I did a Project / Clean. Then it would build.
     
  4. Dookieman, Apr 1, 2016
    Last edited: Apr 1, 2016

    Dookieman thread starter macrumors 6502

    Joined:
    Oct 12, 2009
    #5
    Ok. Let me give it shot. I appreciate your help!

    Hmm I tried the setting the version to 9.0 and I am still getting the same errors....

    This is on a fresh Swift project and you got it to compile? I wonder what in the world is wrong. Non of my friends or co-workers have been able to get this to build on a new project either. The weird thing is, I am able to compile the example project fine, but not a new one...

    I wonder if some Xcode preferences are making a difference... What version of Cocoa pods are you using?
     
  5. tyche macrumors 6502

    Joined:
    Jul 30, 2010
    #6
    Code:
    pod --version
    1.0.0.beta.3
    
    Podfile
    Code:
    platform :ios, '9.0'
    use_frameworks!
    
    target 'xx' do
    pod "xmpp-messenger-ios"
    end
    
    Pod install
    Code:
    Analyzing dependencies
    Downloading dependencies
    Installing CocoaAsyncSocket (7.4.3)
    Installing CocoaLumberjack (1.9.2)
    Installing FMDB (1.5.1)
    Installing JSQMessagesViewController (7.2.0)
    Installing JSQSystemSoundPlayer (2.0.1)
    Installing XMPPFramework (3.6.6)
    Installing xmpp-messenger-ios (1.0.1)
    Generating Pods project
    Integrating client project
    error building blank workspace (no import line)
    Code:
    .../Pods/xmpp-messenger-ios/Pod/Classes/OneChat.swift:134:44: Incorrect argument label in call (have 'withvCardStorage:', expected 'vCardStorage:')
    
    .../Pods/xmpp-messenger-ios/Pod/Classes/OneChat.swift:135:48: Incorrect argument label in call (have 'withvCardTempModule:', expected 'vCardTempModule:')
    
    Fixed with supplied suggestions

    Clean Project, add line to appdelegate.swift
    Code:
    import xmpp_messenger_ios
    Project builds

    Is this were you fail?
     
  6. Dookieman thread starter macrumors 6502

    Joined:
    Oct 12, 2009
    #7
    Yep, I tried 3 times and it's still not working for me. I wonder if there is something wrong with my Xcode?
     
  7. Dookieman thread starter macrumors 6502

    Joined:
    Oct 12, 2009
    #8
    Well, long story short. I'm using the XMPPFramework directly rather than the Swift layer. I guess that gives more control.
     

Share This Page