Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The example project does not compile on Xcode 7.1 #15

Closed
abbasmousavi opened this issue Oct 26, 2015 · 34 comments
Closed

The example project does not compile on Xcode 7.1 #15

abbasmousavi opened this issue Oct 26, 2015 · 34 comments

Comments

@abbasmousavi
Copy link
Contributor

@baoluo The example project (and the pod) does not compile on Xcode 7.1 (Compiles on XCode 7)

screen shot 2015-10-26 at 4 31 32 pm

@baoluo
Copy link
Contributor

baoluo commented Oct 26, 2015

I just updated to Xcode 7.1, and I can confirm this behaviour

@adozenlines
Copy link

Also had a few problems with the lib xml module mapping as well.

@baoluo
Copy link
Contributor

baoluo commented Oct 26, 2015

I will compile the XMPPFramework against Xcode 7.1 to fix those errors

@baoluo
Copy link
Contributor

baoluo commented Oct 26, 2015

Ok, two things about this error, the first one, I can pod spec lint without error. Secondly, if I use the XMPPFramework pod in a standalone app, it will compile. It's when it's embedded in xmpp-messenger-ios. I'll continue the investigation

@abbasmousavi
Copy link
Contributor Author

@baoluo, XMPPFramework 3.6.6 pod compiles without errors on XCode 7.1.

@baoluo
Copy link
Contributor

baoluo commented Oct 26, 2015

Ok I found the fix, I'll need to fix the XMPPFramework first, so I may include other changes before releasing a new pod for xmpp-messenger-ios

@baoluo
Copy link
Contributor

baoluo commented Oct 26, 2015

I fixed the error in JSQMessageViewController jessesquires/JSQMessagesViewController#1284

I will now do the same for the XMPPFramework

@baoluo
Copy link
Contributor

baoluo commented Oct 26, 2015

In the meantime, you can just replace the non-modular import with the @import syntax

@baoluo
Copy link
Contributor

baoluo commented Oct 27, 2015

I fixed the errors in the XMPPFramework, you can follow the pull request here robbiehanson/XMPPFramework#614

@abbasmousavi
Copy link
Contributor Author

@baoluo It seems that replacing non-modular import with the @import syntax does not solves the problem.

screen shot 2015-10-27 at 3 58 12 pm
(Compiler errors after replace)

It seems that CocoaLumberJack can not be compiled as a module also.
Can you compile xmpp-ios-messenger without errors after replacing non-modular import with the @import syntax?

@baoluo
Copy link
Contributor

baoluo commented Oct 27, 2015

Yes it's working fine. Maybe you can try to deep clean Xcode.

@import CocoaLumberJack;
@import CocoaAsyncSocket;

And don;t forget to remove the old imports :)

@adozenlines
Copy link

Failed to build - The link above reports this problem below but the Process One Project Builds
❌ /Users/travis/build/robbiehanson/XMPPFramework/Vendor/KissXML/DDXMLNode.h:6:9: module 'libxmlSimu' not found
@import libxmlSimu;

▸ Compiling XMPPMessage.m
❌  /Users/travis/build/robbiehanson/XMPPFramework/Vendor/KissXML/DDXMLNode.h:6:9: module 'libxmlSimu' not found

@abbasmousavi
Copy link
Contributor Author

@baoluo I downloaded a fresh copy of this repository, replaced import statements and deep cleaned XCode before compiling but still getting this error:

screen shot 2015-10-28 at 1 07 42 pm

@baoluo
Copy link
Contributor

baoluo commented Oct 28, 2015

@abbasmousavi , XMPPAnonymousAuthentication need to be changed as well ?

@abbasmousavi
Copy link
Contributor Author

@baoluo I don't think so, In another try I have changed .podspec file (this time without replacing import statements in xmpp and JSQMessagesViewController)

screen shot 2015-10-28 at 2 13 02 pm

and now the import problem is gone but I get a new error: ".../Pods/XMPPFramework/Vendor/KissXML/DDXMLNode.h:4:9: Module 'libxml' not found
(see this: robbiehanson/XMPPFramework#596)

May be there is no need to change import statement in other projects and fixing libxml problem will fix the issue?

@baoluo
Copy link
Contributor

baoluo commented Oct 28, 2015

@abbasmousavi Yes because you are not importing the module map file for libxml now.

@abbasmousavi
Copy link
Contributor Author

Yes, you are right.

@abbasmousavi
Copy link
Contributor Author

@baoluo any new progress?

@baoluo
Copy link
Contributor

baoluo commented Nov 2, 2015

I'm still waiting for JSQMessage and XMPPFramework to accept the pull request, but in the meantime you can manually fix the project by applying the modification

@abbasmousavi
Copy link
Contributor Author

@baoluo JSQMessage pull request is closed and as I said before, after applying the modifications I get another error that says Module "CocoaLumberJack" not found (in file XMPPLogging.h);

Could you please modify the example project in this repo so that it compiles with XCode 7.1?

@adozenlines
Copy link

The idea around open source is to allow the community to take part in the contribution of these projects. Fell free to make the change and submit your very own pull request to the respective repos.

Enjoy.

On Nov 2, 2015, at 11:33 AM, Abbas Mousavi [email protected] wrote:

JSQMessage pull request is closed and as I said before, after applying the modifications I get another error that says Module "CocoaLumberJack" not found (in file XMPPLogging.h);

Could you please modify the example project in this repo so that it compiles with XCode 7.1?


Reply to this email directly or view it on GitHub #15 (comment).

@baoluo
Copy link
Contributor

baoluo commented Nov 2, 2015

@abbasmousavi changes have been committed to the example project, but like @adozenlines said, the best options would have that you made the changes I showed you, or more importantly, support my pull requests to the other third party libs. Because right now I fixed the example, but not the source.

@abbasmousavi
Copy link
Contributor Author

@baoluo Thanks for changes (I didn't send PR because your proposed modifications didn't work on my project), finally I can compile my project, getting diff with your example project, I found that there was a strange permission issue on XMPPFramework folder in my project pods that caused "Module CocoaLumberJack not found" error. changing the permissions solved the problem.

Thanks again and I will support your PR on XMPP and JSQMessage certainly.

@adozenlines
Copy link

I guess this can be closed.

@BrianHenryIE
Copy link

Thanks guys. I got stuck on the permission issue for a while and to fix it I deleted the pods/XMPPFramework folder and to recreate it ran git clone https://github.com/robbiehanson/XMPPFramework.git
Then I got it to build after implementing the changes in
JSQMessagesViewController #1284 and XMPPFramework #614.

@novinfard
Copy link

I got the same error on Xcode 7.1 and also it could not add xmpp_messenger_ios in app delegate (it cause unknown module error). Do you have complete project fix files?

@novinfard
Copy link

Also this error appears when direct example uses:
Use of unresolved identifier 'OneLastActivity'

@adozenlines
Copy link

Looks like the pods and sample are out of sync and the OneLastActivity is not part of project may be a merger gone bad.

Sent from my iPhone

On Dec 1, 2015, at 7:16 AM, Best Quality Web Products [email protected] wrote:

Also this error appears when direct example uses:
Use of unresolved identifier 'OneLastActivity'


Reply to this email directly or view it on GitHub.

@orkhanalizade
Copy link
Contributor

@novinfard check have you in Pods the file "OneLastActivity.swift". If you do not have this file, add this manually and all will be fine.

@orkhanalizade
Copy link
Contributor

@baoluo please, close this issue, because it works even in Xcode 7.2

@baoluo
Copy link
Contributor

baoluo commented Dec 11, 2015

Ok @orkhanalizade, closing this now

@arunarya111
Copy link

@adozenlines how did you resolve this issue
Failed to build - The link above reports this problem below but the Process One Project Builds
❌ /Users/travis/build/robbiehanson/XMPPFramework/Vendor/KissXML/DDXMLNode.h:6:9: module 'libxmlSimu' not found
@import libxmlSimu;
i am facing the same after i installed xmpp seperately from github

@arunarya111
Copy link

@abbasmousavi how did you modify the permission to resolve cocoalumberjack not found issue

@baoluo
Copy link
Contributor

baoluo commented Mar 7, 2016

@abbasmousavi , you have this error because the compiler doesn't find the custom import. Add it to your folder and the path un you Xcode's build settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants