XMPPFramework icon indicating copy to clipboard operation
XMPPFramework copied to clipboard

Unable to compile in Xcode 8 GM with iOS 10

Open aliwt opened this issue 8 years ago • 35 comments

I tried to compile XMPPFramework (3.6.6) in Xcode 8 GM but I got error

Redefinition of module 'dnssd'

aliwt avatar Sep 08 '16 18:09 aliwt

You need install 3.7.0 ver

pod 'XMPPFramework', :git => "https://github.com/robbiehanson/XMPPFramework.git", :branch => 'master'

x3mall1986 avatar Sep 08 '16 19:09 x3mall1986

@x3mall1986 Thanks man, but now i am getting error for KissXML

#import <libxml/tree.h> include of non-modular header inside framework module kissXML

and

NSXMLElement+XEP_0335.h

could not build module KissXML

which i think is related to previous issue

aliwt avatar Sep 08 '16 20:09 aliwt

Which ver of the pod you use? I tested with ver 1.0.1 and everything worked fine. You develop on swift or obj-c?

x3mall1986 avatar Sep 09 '16 06:09 x3mall1986

Could it be some issue with not-using Cocoa Pods? Say If I added XMPPFramework via git submodule (also had run submodule update recursively), the modules defined in a .podfile wouldn't be automatically added into the project.

aceisScope avatar Sep 11 '16 14:09 aceisScope

I am getting Redefinition of module 'dnssd' error

https://www.dropbox.com/s/we3l4bynq0tqmfv/Screenshot%202016-09-14%2014.54.25.png?dl=0 My pod info: Pod verison: 1.0.1 Xcode: 8 Language: Objective C

pod 'XMPPFramework'

jakjothi avatar Sep 14 '16 09:09 jakjothi

@jakjothi As @x3mall1986 said with the newest version of XMPPFramework the redefinition of dnssd is already removed. Version 3.7.0 is the current one, rather than 1.0.1.

aceisScope avatar Sep 14 '16 09:09 aceisScope

@aceisScope

ok, if i change my pod spec like

pod 'XMPPFramework', :git => "https://github.com/robbiehanson/XMPPFramework.git", :branch => 'master'

now my xmppframework version 3.7.0

then i am getting #import "CocoaAsyncSocket/GCDAsyncSocket.h" file not found

jakjothi avatar Sep 14 '16 09:09 jakjothi

With update xcode to ver. 8.0 , i have the same problem. After I installed CocoaPods 1.1.0.rc.2 and reinstall my pods, the error *** file not found was gone

x3mall1986 avatar Sep 14 '16 10:09 x3mall1986

i update xmppframework to 3.7.0 , i have another problem. "Module kissXML not found", how can i fix this??

zhuxiaohan avatar Sep 14 '16 10:09 zhuxiaohan

I have found a temporary workaround to compile XMPPFramework in Xcode8:

  1. Install XMPPFramework v 3.7.0
  2. Replace @import KissXML; with #import "KissXML.h" @import CocoaAsyncSocket; with #import "GCDAsyncSocket.h in XMPPFramework header files.

AndriiK avatar Sep 14 '16 12:09 AndriiK

@AndriiK worked fine

huige1990 avatar Sep 14 '16 12:09 huige1990

How about use_frameworks! parameter in the podfile? it is uncommented? 2016-09-14 15 55 19

x3mall1986 avatar Sep 14 '16 12:09 x3mall1986

Project is compiled successfully with uncommented use_frameworks! without any changes in XMPPFramework files.

AndriiK avatar Sep 14 '16 13:09 AndriiK

I'm getting KissXML.h file not found in XMPPASLAuthentication.h after trying this quick fix.

Edit, installed cocoapods 1.1.0RC as above and it appears to be working.

ryanluce avatar Sep 14 '16 17:09 ryanluce

@x3mall1986 when i change my pod spec like this:

pod 'XMPPFramework', :git => "https://github.com/robbiehanson/XMPPFramework.git", :branch => 'master'

and then pod install, but failed,it tell ' - KissXML (~> 5.1.2) required by XMPPFramework/Core (3.7.0) None of your spec sources contain a spec satisfying the dependency: KissXML (~> 5.1.2). '

How can I solve this problem?

My pod info: Pod verison: 1.0.1 Xcode: 8 Language: Objective C

zhenshengLinGit avatar Sep 17 '16 15:09 zhenshengLinGit

Try 1.1.0 rc2 cocoapods ver

x3mall1986 avatar Sep 17 '16 16:09 x3mall1986

I had the same problem with dnssd. After update CocoaPods 1.1.0.rc.2 and XMPPFramework 3.7.0 I have got full stack of others problems. Any ideas how to resolve this problems? screen shot 2016-09-22 at 18 49 12

irakliitavadze avatar Sep 22 '16 15:09 irakliitavadze

@IrakliiTavadze

Before i have same issue after upgrade cocoapods rc2 it's working fine my pod spec

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, ’10.0’
use_frameworks!

def common_pods
    pod 'Alamofire', ‘~> 4.0’
    pod ‘PromiseKit’,’~> 4.0’
    pod 'JSQMessagesViewController'
    pod 'XMPPFramework', :git => "https://github.com/robbiehanson/XMPPFramework.git", :branch => 'master'
    pod 'Firebase'
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
    pod 'Firebase/Database'
    pod 'Firebase/Auth'
    pod 'Fabric'
    pod 'Crashlytics'
end

target 'TestSwift3' do
    platform :ios, ’10.0’
    common_pods
end

post_install do |installer|
    installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['SWIFT_VERSION'] = '3.0'
            config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
        end
    end
end

jakjothi avatar Sep 23 '16 03:09 jakjothi

pod --version1.1.0.rc.2 Pod install result:

Analyzing dependencies
Pre-downloading: `XMPPFramework` from `https://github.com/robbiehanson/XMPPFramework.git`, branch `master`
Downloading dependencies
Installing CocoaAsyncSocket (7.5.0)
Installing CocoaLumberjack (2.4.0)
Installing KissXML (5.1.2)
Installing XMPPFramework (3.7.0)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use `APP_NAME.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 4 total
pods installed.

@jakjothi you are lucky, I also made pod deintegrate and pod clean, without result.

irakliitavadze avatar Sep 23 '16 06:09 irakliitavadze

pod --version1.1.0.rc.2

why pod 'XMPPFramework' is so fast , and " pod 'XMPPFramework', :git => "https://github.com/robbiehanson/XMPPFramework.git", :branch => 'master' " show me:

[!] Error installing XMPPFramework [!] /usr/bin/git clone https://github.com/robbiehanson/XMPPFramework.git /var/folders/s5/d2ccf62162s9m6j8jmn4ggwc0000gn/T/d20161009-5006-ma2dsh --template=

Cloning into '/var/folders/s5/d2ccf62162s9m6j8jmn4ggwc0000gn/T/d20161009-5006-ma2dsh'... error: RPC failed; curl 56 SSLRead() return error -9806 fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed

--------------------------------------------------------------------------10.10 edit create a new project ,it's working fine.

helloYukino avatar Oct 09 '16 09:10 helloYukino

如果出现错误: [module "KissXML" not found] ,在pod-file文件使用 #use_frameworks! 可以解决这个问题。 http://www.jianshu.com/p/6795ce156525

davidloveengles avatar Oct 10 '16 07:10 davidloveengles

手滑,上面那个能用

helloYukino avatar Oct 10 '16 08:10 helloYukino

Please let's focus on an English conversation here so more people can benefit from the information that is shared.

aceisScope avatar Oct 10 '16 08:10 aceisScope

K, finally solved it for myself at least for these conditions..

  • Existing Objective-C iOS Project
  • xCode 8
  1. Install latest via pods
use_frameworks!

target 'MY TARGET NAME' do
    pod 'XMPPFramework', :git => "https://github.com/robbiehanson/XMPPFramework.git", :branch => 'master'
end
  1. 'pod install' via GM 0.39.0 version. I didn't use the RC 1.1 version for Obj-c build

  2. Open workspace now

  3. Find and replace all "@import KissXML" with "#import "KissXML.h". You will have to unlock source files.

6) In your projects target -> Build Settings -> Allow Non-modular Includes in Framework Modules = YES

works for me..

popwarfour avatar Oct 10 '16 14:10 popwarfour

@zhenshengLinGit I Hava the same problem, how to solve

codeliujun avatar Oct 11 '16 03:10 codeliujun

Hi guys! Sorry if I'm using this thread. I'm trying to implement XMPPFramework copying classes inside the project. Now I'm getting "module not found KissXML. Steps I tried to follow:

  • Downloaded KissXML inside the project too without any solution. Replaced HEADER SEARCH PATH too
  • Replaced KissXML with DDXML without no success

Any idea? Thanks in advance

d4r1091 avatar Nov 02 '16 16:11 d4r1091

@ @ @d4r1091 use_frameworks!

simpletony avatar Nov 10 '16 08:11 simpletony

I roseoled by update CocoPods,

在 2016年11月3日,00:42,Dario Carlomagno [email protected] 写道:

Hi guys! Sorry if I'm using this thread. I'm trying to implement XMPPFramework copying classes inside the project. Now I'm getting "module not found KissXML. Steps I tried to follow:

Downloaded KissXML inside the project too without any solution. Replaced HEADER SEARCH PATH too Replaced KissXML with DDXML without no success Any idea? Thanks in advance

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/robbiehanson/XMPPFramework/issues/800#issuecomment-257923209, or mute the thread https://github.com/notifications/unsubscribe-auth/AMXCaRdsig3RC0p6gzt-45d_fUbYVXaOks5q6L2JgaJpZM4J4UxY.

codeliujun avatar Nov 12 '16 15:11 codeliujun

@x3mall1986 if i use 1.1.0.rc.2 of cocoa pods, when i do "pod install", will get error: " [!] Error installing XMPPFramework [!] /usr/bin/git clone https://github.com/robbiehanson/XMPPFramework.git /var/folders/6b/glbc2rg94bzgt1bgyhls6bw00000gn/T/d20161128-14297-n4lo7g --template=

Cloning into '/var/folders/6b/glbc2rg94bzgt1bgyhls6bw00000gn/T/d20161128-14297-n4lo7g'... error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: The remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed "

YLightC avatar Nov 28 '16 09:11 YLightC

Hey, I just upgraded my XCode to 8.3.1. and I am unable to compile my code. I get the following errors: screen shot 2017-04-11 at 2 54 13 pm Here's my Podfile code:

Disable CocoaPods deterministic UUIDs as Pods are not checked in

ENV["COCOAPODS_DISABLE_DETERMINISTIC_UUIDS"] = "true"

Disable Bitcode for all targets http://stackoverflow.com/a/32685434/805882

post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ENABLE_BITCODE'] = 'NO' end end end

post_install do |installer| Dir['Pods//**/.h'].each { |file| search_text = %q["sqlite3.h"] replace_text = '<SQLCipher/sqlite3.h>'

oldFile = File.read(file) if oldFile.include? search_text puts "#{file} includes #{search_text}"

File.chmod(0604, file) # rw----r-- newFile = oldFile.gsub(/#{search_text}/, replace_text) File.open(file, "w") { |file| file << newFile } end } end

platform :ios, "8.0"

use_frameworks! inhibit_all_warnings!

source 'https://github.com/CocoaPods/Specs.git'

target 'SNMessagingApp' do pod 'Instabug' pod 'GoogleMaps' pod 'AFNetworking', '~> 3.1' pod "Appirater", '~> 2.0' pod 'OpenInChrome', '~> 0.0' pod 'MWFeedParser', '~> 1.0' pod "CocoaLumberjack", '~> 2.0' pod "HockeySDK-Source", '~> 3.7' pod 'MBProgressHUD', '~> 0.9' pod "SSKeychain", '~> 1.2'

pod 'gtm-oauth2', '~> 0.1.0' # Trunk is outdated, using local podspec

pod 'YapDatabase/SQLCipher', '~> 2.9' pod 'Mantle', '~> 2.0' pod 'Navajo', '~> 0.0' pod 'BBlock', '~> 1.2' pod 'JVFloatLabeledTextField', '~> 1.0' pod 'TTTAttributedLabel', '~> 1.10' pod 'VTAcknowledgementsViewController', '~> 0.15' pod 'PureLayout', '~> 3.0' pod 'BButton', '~> 4.0' pod 'uservoice-iphone-sdk', '~> 3.2' pod 'TUSafariActivity', '~> 1.0' pod 'ARChromeActivity', '~> 1.0' pod 'CocoaAsyncSocket', '~> 7.4' pod 'JTSImageViewController', '~> 1.4' pod 'KVOController', '~> 1.0' #Reachability only needed for YapActionItems pod 'Reachability', '~> 3' pod 'XLForm', '~> 3.1' pod 'ParkedTextField', '~> 0.2'

pod 'RNGridMenu' pod 'IQAudioRecorderController' pod 'FFGlobalAlertController'

Local Podspecs

pod 'gtm-http-fetcher', :podspec => 'Podspecs/gtm-http-fetcher.podspec' pod 'gtm-oauth2', :podspec => 'Podspecs/gtm-oauth2.podspec' #pod 'SQLCipher/fts', :podspec => 'Podspecs/SQLCipher.podspec.json'

Submodules

pod 'ChatSecure-Push-iOS', :path => 'Submodules/ChatSecure-Push-iOS/ChatSecure-Push-iOS.podspec' pod 'ProxyKit/Client', :path => 'Submodules/ProxyKit/ProxyKit.podspec' pod 'OTRKit', :path => 'Submodules/OTRKit/OTRKit.podspec' pod 'CPAProxy', :path => 'Submodules/CPAProxy/CPAProxy.podspec' pod 'XMPPFramework', :path => 'Submodules/XMPPFramework/XMPPFramework.podspec' pod 'IOCipher/GCDWebServer', :path => 'Submodules/IOCipher/IOCipher.podspec'

platform :ios, '8.1' end

Please help?! Need to get this to run ASAP... I am aware that there are far too many pods installed in the project, precisely why I cannot update them. I get many more error once I update the pod. None of the above solutions work for me. Any direction will be much appreciated!

holykou avatar Apr 11 '17 09:04 holykou

@holykou I hope you are aware of the GPL license of ChatSecure and that closed source commercial derivatives are not supported at this time.

chrisballinger avatar Apr 11 '17 17:04 chrisballinger

@chrisballinger, ChatSecure is only for reference, not using it as a product in our app. :)

holykou avatar Apr 13 '17 06:04 holykou

@holykou I meet the same error messages, this is my workaround

  1. Manually Back up the XMPP framework files you used in project
  2. Edit cocoapod Podfile to remove "pod 'XMPPFramework'"
  3. In terminal, enter "pod install" to remove XMPPFramework
  4. Manually join the XMPP framework files you back up in step 1 to project
  5. Join 'CocoaLumberjack' and 'GCDAsyncSocket' to your project(XMPP framework need them)
  6. Remember to check close bit code again
  7. Fix compiler error by replace <xxxxx/xxxxx.h> to "xxxx.h" Then I compiler project successfully in Xcode 8.3.1, maybe you can try it!

Jimmygio avatar Apr 14 '17 13:04 Jimmygio

After some work through, I found that XMPPFramework podspec for version 3.7.0 will not work for objective C project.

Tested in Xcode version: 8.3.3 , MacOS version: 10.12.1

And found a solution for that,

  1. Download podspec from drive.google.com/file/d/1xkQUjl3Qq-Z8p1yzah0gMssd4PWvz4vN/view
  2. Paste XMPPFramework.podspec in your project path (the path which has *.xcodeproj file)
  3. Change your podfile as below (‘StackSecPo’ text should be change to your target name)
target 'StackSecPo' do   
use_frameworks!

  pod 'XMPPFramework', :path => 'XMPPFramework.podspec'

  target 'StackSecPoTests' do

    inherit! :search_paths   
  end

  target 'StackSecPoUITests' do

  inherit! :search_paths   
  end

end
  1. run 'pod install' in terminal

if you face 'Module 'CocoaAsyncSocket' not found' compile time error,

Add 'CocoaAsyncSocket.framework' in your project target's Linked Frameworks and Libraries.

shebinkoshy avatar Feb 28 '18 09:02 shebinkoshy

Getting below issue: - clang: error: no such file or directory: 'KissXML' Command Ld failed with a nonzero exit code

JaspreetiOSDev avatar Aug 19 '20 08:08 JaspreetiOSDev