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

podspec for binary built version of mailcore2: preserve_paths pattern did not match any file #959

Closed
dinhvh opened this issue Oct 30, 2014 · 32 comments

Comments

@dinhvh
Copy link
Member

dinhvh commented Oct 30, 2014

https://gist.github.com/dinhviethoa/1714b878d8fe7be7dc99

When I use pod spec lint, I get the following error:

 -> mailcore2 (0.4.5)
    - ERROR | [iOS] The `preserve_paths` pattern did not match any file.

The layout of the zip file is:

mailcore2-ios-5/include/MailCore/*.h
mailcore2-ios-5/lib/libMailCore-ios.a

If I prefix the pattern with mailcore2-ios-5, it will go through the lint.
Though, when I include mailcore2 in a Podfile, the library and the header files won't show up in the resulting project folder.

Is there anything I'm missing?

Thanks!

@alloy

@alloy
Copy link

alloy commented Oct 30, 2014

I will have time tomorrow again to look at issues, so please do keep them coming. In the meantime, please take a look at the vendored_library attribute: http://guides.cocoapods.org/syntax/podspec.html#vendored_libraries

In general, you should really stay away from using the xcconfig attribute, as it’s more fragile whenever paths might be different.

@dinhvh
Copy link
Member Author

dinhvh commented Oct 30, 2014

I updated the pod here to match your feedback.
https://gist.github.com/dinhviethoa/b554c26db5a9f3683777

pod spec lint succeeded.

I included the pod in a sample project:

platform :ios, '8.0'
pod 'mailcore2', :path => '~/Cocoapods/mailcore2'
pod 'FXKeychain'
pod 'gtm-oauth2'

And when building, I got the following issues:

screen shot 2014-10-30 at 1 06 07 pm

screen shot 2014-10-30 at 1 06 15 pm

$ find . -iname '*mailcore*'
./Pods/Local Podspecs/mailcore2.podspec.json
./Pods/Pods.xcodeproj/xcuserdata/dvh.xcuserdatad/xcschemes/Pods-mailcore2.xcscheme
./Pods/Target Support Files/Pods-mailcore2
./Pods/Target Support Files/Pods-mailcore2/Pods-mailcore2-dummy.m
./Pods/Target Support Files/Pods-mailcore2/Pods-mailcore2-prefix.pch
./Pods/Target Support Files/Pods-mailcore2/Pods-mailcore2-Private.xcconfig
./Pods/Target Support Files/Pods-mailcore2/Pods-mailcore2.xcconfig

It looks like the library has been removed.

@alloy
Copy link

alloy commented Oct 30, 2014

Can you upload this sample so I can try it tomorrow?

@dinhvh
Copy link
Member Author

dinhvh commented Oct 30, 2014

@alloy
Copy link

alloy commented Oct 31, 2014

Here’s a fixed podspec https://gist.github.com/alloy/f3e0ce3f72fd55cb90ee. As was the case before, you should really try to not use the xcconfig attribute, but instead use the vendored_libraries attribute that I mentioned above.

In addition, using that attribute instead of hardcoding paths in the xcconfig attribute also correctly makes the path relative when using the :path Podfile option:

platform :ios, '8.0'
pod 'mailcore2', :path => '../mailcore2-ios-5'
pod 'FXKeychain'
pod 'gtm-oauth2'

Using the vendored_libraries attribute results in the following settings in the xcconfig files:

LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/../../mailcore2-ios-5/lib"
OTHER_LDFLAGS = -ObjC -l"MailCore-ios"

After specifying the public_header_files and the MailCore header namespace with the header_dir attribute, the following headers are linked into Pods/Headers/Public:

~/t/C/MC2CocoaPodsSample [mailcore2-binary] » tree Pods/Headers/Public
Pods/Headers/Public
└── mailcore2
    └── MailCore
        ├── MCAbstract.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAbstract.h
        ├── MCAbstractMessage.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAbstractMessage.h
        ├── MCAbstractMessagePart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAbstractMessagePart.h
        ├── MCAbstractMultipart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAbstractMultipart.h
        ├── MCAbstractPart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAbstractPart.h
        ├── MCAddress.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAddress.h
        ├── MCAddressDisplay.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAddressDisplay.h
        ├── MCArray.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCArray.h
        ├── MCAssert.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAssert.h
        ├── MCAsync.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAsync.h
        ├── MCAsyncIMAP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAsyncIMAP.h
        ├── MCAsyncNNTP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAsyncNNTP.h
        ├── MCAsyncPOP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAsyncPOP.h
        ├── MCAsyncSMTP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAsyncSMTP.h
        ├── MCAttachment.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAttachment.h
        ├── MCAutoreleasePool.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCAutoreleasePool.h
        ├── MCBaseTypes.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCBaseTypes.h
        ├── MCConnectionLogger.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCConnectionLogger.h
        ├── MCCore.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCCore.h
        ├── MCData.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCData.h
        ├── MCDateFormatter.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCDateFormatter.h
        ├── MCHTMLRendererCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCHTMLRendererCallback.h
        ├── MCHash.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCHash.h
        ├── MCHashMap.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCHashMap.h
        ├── MCICUTypes.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCICUTypes.h
        ├── MCIMAP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAP.h
        ├── MCIMAPAppendMessageOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPAppendMessageOperation.h
        ├── MCIMAPAsyncSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPAsyncSession.h
        ├── MCIMAPCapabilityOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPCapabilityOperation.h
        ├── MCIMAPConnectOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPConnectOperation.h
        ├── MCIMAPCopyMessagesOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPCopyMessagesOperation.h
        ├── MCIMAPFetchContentOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFetchContentOperation.h
        ├── MCIMAPFetchFoldersOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFetchFoldersOperation.h
        ├── MCIMAPFetchMessagesOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFetchMessagesOperation.h
        ├── MCIMAPFetchNamespaceOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFetchNamespaceOperation.h
        ├── MCIMAPFetchParsedContentOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFetchParsedContentOperation.h
        ├── MCIMAPFolder.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFolder.h
        ├── MCIMAPFolderInfoOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFolderInfoOperation.h
        ├── MCIMAPFolderStatus.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFolderStatus.h
        ├── MCIMAPFolderStatusOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPFolderStatusOperation.h
        ├── MCIMAPIdentity.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPIdentity.h
        ├── MCIMAPIdentityOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPIdentityOperation.h
        ├── MCIMAPIdleOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPIdleOperation.h
        ├── MCIMAPMessage.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPMessage.h
        ├── MCIMAPMessagePart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPMessagePart.h
        ├── MCIMAPMessageRenderingOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPMessageRenderingOperation.h
        ├── MCIMAPMultipart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPMultipart.h
        ├── MCIMAPNamespace.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPNamespace.h
        ├── MCIMAPNamespaceItem.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPNamespaceItem.h
        ├── MCIMAPNoopOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPNoopOperation.h
        ├── MCIMAPOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPOperation.h
        ├── MCIMAPOperationCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPOperationCallback.h
        ├── MCIMAPPart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPPart.h
        ├── MCIMAPProgressCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPProgressCallback.h
        ├── MCIMAPQuotaOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPQuotaOperation.h
        ├── MCIMAPSearchExpression.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPSearchExpression.h
        ├── MCIMAPSearchOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPSearchOperation.h
        ├── MCIMAPSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPSession.h
        ├── MCIMAPSyncResult.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIMAPSyncResult.h
        ├── MCIndexSet.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIndexSet.h
        ├── MCIterator.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCIterator.h
        ├── MCJSON.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCJSON.h
        ├── MCLibetpanTypes.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCLibetpanTypes.h
        ├── MCLog.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCLog.h
        ├── MCMD5.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMD5.h
        ├── MCMailProvider.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMailProvider.h
        ├── MCMailProvidersManager.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMailProvidersManager.h
        ├── MCMainThread.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMainThread.h
        ├── MCMessageBuilder.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMessageBuilder.h
        ├── MCMessageConstants.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMessageConstants.h
        ├── MCMessageHeader.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMessageHeader.h
        ├── MCMessageParser.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMessageParser.h
        ├── MCMessagePart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMessagePart.h
        ├── MCMultipart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCMultipart.h
        ├── MCNNTP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTP.h
        ├── MCNNTPAsyncSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPAsyncSession.h
        ├── MCNNTPCheckAccountOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPCheckAccountOperation.h
        ├── MCNNTPFetchAllArticlesOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPFetchAllArticlesOperation.h
        ├── MCNNTPFetchArticleOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPFetchArticleOperation.h
        ├── MCNNTPFetchHeaderOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPFetchHeaderOperation.h
        ├── MCNNTPFetchOverviewOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPFetchOverviewOperation.h
        ├── MCNNTPFetchServerTimeOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPFetchServerTimeOperation.h
        ├── MCNNTPGroupInfo.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPGroupInfo.h
        ├── MCNNTPListNewsgroupsOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPListNewsgroupsOperation.h
        ├── MCNNTPOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPOperation.h
        ├── MCNNTPOperationCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPOperationCallback.h
        ├── MCNNTPProgressCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPProgressCallback.h
        ├── MCNNTPSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNNTPSession.h
        ├── MCNetService.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNetService.h
        ├── MCNull.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCNull.h
        ├── MCOAbstract.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOAbstract.h
        ├── MCOAbstractMessage.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOAbstractMessage.h
        ├── MCOAbstractMessagePart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOAbstractMessagePart.h
        ├── MCOAbstractMultipart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOAbstractMultipart.h
        ├── MCOAbstractPart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOAbstractPart.h
        ├── MCOAddress.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOAddress.h
        ├── MCOAttachment.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOAttachment.h
        ├── MCOConstants.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOConstants.h
        ├── MCOHTMLRendererDelegate.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOHTMLRendererDelegate.h
        ├── MCOHTMLRendererIMAPDelegate.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOHTMLRendererIMAPDelegate.h
        ├── MCOIMAP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAP.h
        ├── MCOIMAPAppendMessageOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPAppendMessageOperation.h
        ├── MCOIMAPBaseOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPBaseOperation.h
        ├── MCOIMAPCapabilityOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPCapabilityOperation.h
        ├── MCOIMAPCopyMessagesOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPCopyMessagesOperation.h
        ├── MCOIMAPFetchContentOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFetchContentOperation.h
        ├── MCOIMAPFetchFoldersOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFetchFoldersOperation.h
        ├── MCOIMAPFetchMessagesOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFetchMessagesOperation.h
        ├── MCOIMAPFetchNamespaceOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFetchNamespaceOperation.h
        ├── MCOIMAPFetchParsedContentOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFetchParsedContentOperation.h
        ├── MCOIMAPFolder.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFolder.h
        ├── MCOIMAPFolderInfo.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFolderInfo.h
        ├── MCOIMAPFolderInfoOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFolderInfoOperation.h
        ├── MCOIMAPFolderStatus.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFolderStatus.h
        ├── MCOIMAPFolderStatusOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPFolderStatusOperation.h
        ├── MCOIMAPIdentity.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPIdentity.h
        ├── MCOIMAPIdentityOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPIdentityOperation.h
        ├── MCOIMAPIdleOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPIdleOperation.h
        ├── MCOIMAPMessage.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPMessage.h
        ├── MCOIMAPMessagePart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPMessagePart.h
        ├── MCOIMAPMessageRenderingOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPMessageRenderingOperation.h
        ├── MCOIMAPMultipart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPMultipart.h
        ├── MCOIMAPNamespace.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPNamespace.h
        ├── MCOIMAPNamespaceItem.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPNamespaceItem.h
        ├── MCOIMAPOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPOperation.h
        ├── MCOIMAPPart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPPart.h
        ├── MCOIMAPQuotaOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPQuotaOperation.h
        ├── MCOIMAPSearchExpression.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPSearchExpression.h
        ├── MCOIMAPSearchOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPSearchOperation.h
        ├── MCOIMAPSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIMAPSession.h
        ├── MCOIndexSet.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOIndexSet.h
        ├── MCOMailProvider.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOMailProvider.h
        ├── MCOMailProvidersManager.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOMailProvidersManager.h
        ├── MCOMessageBuilder.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOMessageBuilder.h
        ├── MCOMessageHeader.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOMessageHeader.h
        ├── MCOMessageParser.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOMessageParser.h
        ├── MCOMessagePart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOMessagePart.h
        ├── MCOMultipart.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOMultipart.h
        ├── MCONNTP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTP.h
        ├── MCONNTPDisconnectOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPDisconnectOperation.h
        ├── MCONNTPFetchAllArticlesOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPFetchAllArticlesOperation.h
        ├── MCONNTPFetchArticleOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPFetchArticleOperation.h
        ├── MCONNTPFetchHeaderOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPFetchHeaderOperation.h
        ├── MCONNTPFetchOverviewOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPFetchOverviewOperation.h
        ├── MCONNTPFetchServerTimeOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPFetchServerTimeOperation.h
        ├── MCONNTPGroupInfo.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPGroupInfo.h
        ├── MCONNTPListNewsgroupsOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPListNewsgroupsOperation.h
        ├── MCONNTPOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPOperation.h
        ├── MCONNTPSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONNTPSession.h
        ├── MCONetService.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCONetService.h
        ├── MCOObjectWrapper.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOObjectWrapper.h
        ├── MCOOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOOperation.h
        ├── MCOPOP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOPOP.h
        ├── MCOPOPFetchHeaderOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOPOPFetchHeaderOperation.h
        ├── MCOPOPFetchMessageOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOPOPFetchMessageOperation.h
        ├── MCOPOPFetchMessagesOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOPOPFetchMessagesOperation.h
        ├── MCOPOPMessageInfo.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOPOPMessageInfo.h
        ├── MCOPOPNoopOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOPOPNoopOperation.h
        ├── MCOPOPOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOPOPOperation.h
        ├── MCOPOPSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOPOPSession.h
        ├── MCOProvider.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOProvider.h
        ├── MCORFC822.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCORFC822.h
        ├── MCORange.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCORange.h
        ├── MCOSMTP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOSMTP.h
        ├── MCOSMTPOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOSMTPOperation.h
        ├── MCOSMTPSendOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOSMTPSendOperation.h
        ├── MCOSMTPSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOSMTPSession.h
        ├── MCOUtils.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOUtils.h
        ├── MCObjC.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCObjC.h
        ├── MCObject.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCObject.h
        ├── MCOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOperation.h
        ├── MCOperationCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOperationCallback.h
        ├── MCOperationQueue.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCOperationQueue.h
        ├── MCPOP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOP.h
        ├── MCPOPAsyncSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPAsyncSession.h
        ├── MCPOPFetchHeaderOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPFetchHeaderOperation.h
        ├── MCPOPFetchMessageOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPFetchMessageOperation.h
        ├── MCPOPFetchMessagesOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPFetchMessagesOperation.h
        ├── MCPOPMessageInfo.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPMessageInfo.h
        ├── MCPOPNoopOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPNoopOperation.h
        ├── MCPOPOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPOperation.h
        ├── MCPOPOperationCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPOperationCallback.h
        ├── MCPOPProgressCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPProgressCallback.h
        ├── MCPOPSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCPOPSession.h
        ├── MCProvider.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCProvider.h
        ├── MCRFC822.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCRFC822.h
        ├── MCRange.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCRange.h
        ├── MCRenderer.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCRenderer.h
        ├── MCSMTP.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSMTP.h
        ├── MCSMTPAsyncSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSMTPAsyncSession.h
        ├── MCSMTPNoopOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSMTPNoopOperation.h
        ├── MCSMTPOperation.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSMTPOperation.h
        ├── MCSMTPOperationCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSMTPOperationCallback.h
        ├── MCSMTPProgressCallback.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSMTPProgressCallback.h
        ├── MCSMTPSession.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSMTPSession.h
        ├── MCSet.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSet.h
        ├── MCSizeFormatter.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCSizeFormatter.h
        ├── MCString.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCString.h
        ├── MCUtils.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCUtils.h
        ├── MCValue.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MCValue.h
        ├── MailCore.h -> ../../../../../../mailcore2-ios-5/include/MailCore/MailCore.h
        ├── NSArray+MCO.h -> ../../../../../../mailcore2-ios-5/include/MailCore/NSArray+MCO.h
        ├── NSData+MCO.h -> ../../../../../../mailcore2-ios-5/include/MailCore/NSData+MCO.h
        ├── NSDictionary+MCO.h -> ../../../../../../mailcore2-ios-5/include/MailCore/NSDictionary+MCO.h
        ├── NSError+MCO.h -> ../../../../../../mailcore2-ios-5/include/MailCore/NSError+MCO.h
        ├── NSIndexSet+MCO.h -> ../../../../../../mailcore2-ios-5/include/MailCore/NSIndexSet+MCO.h
        ├── NSObject+MCO.h -> ../../../../../../mailcore2-ios-5/include/MailCore/NSObject+MCO.h
        ├── NSString+MCO.h -> ../../../../../../mailcore2-ios-5/include/MailCore/NSString+MCO.h
        └── NSValue+MCO.h -> ../../../../../../mailcore2-ios-5/include/MailCore/NSValue+MCO.h

@alloy
Copy link

alloy commented Oct 31, 2014

Ah there is an additional issue when linting, or rather downloading, looking at that now.

@dinhvh
Copy link
Member Author

dinhvh commented Oct 31, 2014

Let me know what your findings are. Thanks!

@alloy
Copy link

alloy commented Oct 31, 2014

Ok, updated the spec and it passes now:

~/t/C/mailcore2-ios-5 » pod spec lint mailcore2.podspec.json --only-errors

 -> mailcore2 (0.4.5)
    - WARN  | [iOS] Incompatible `flatten` key(s) with `http` primary key for `source` attribute

Analyzed 1 podspec.

mailcore2.podspec.json passed validation.

The only issue is that apparently our linter raises a warning when using the flatten option for http sources when provided through a JSON podspec. I have filed the following ticket for that CocoaPods/Core#193.

@alloy
Copy link

alloy commented Oct 31, 2014

PS the flatten option is necessary, because after unpacking the zip file it contains an extra mailcore2-ios-5 directory, which is removed with this option. You can inspect the difference on disk by using the --no-clean --verbose options and then inspecting the tmp dir where it was unpacked.

@dinhvh
Copy link
Member Author

dinhvh commented Oct 31, 2014

I think I tried using the flatten option and removed it since it was showing a warning.
btw, is there a way to refer to a URL for the license?
I had to do it and found it was lame :(

"prepare_command": "curl -O https://github.com/MailCore/mailcore2/raw/master/LICENSE"

@alloy
Copy link

alloy commented Oct 31, 2014

No, but why not always include the license file in the archive?

@dinhvh
Copy link
Member Author

dinhvh commented Oct 31, 2014

That's one way I could also do it.
I was looking into option not to change the content of the archive :)

@alloy
Copy link

alloy commented Oct 31, 2014

We kinda want to nudge people to always include a license so that everything’s clear. Legalese is bad enough as it is.

@dinhvh
Copy link
Member Author

dinhvh commented Oct 31, 2014

That's a very useful option for spec lint: --no-clean! You should document it in pod spec help :)

@dinhvh
Copy link
Member Author

dinhvh commented Oct 31, 2014

$ pod spec lint
 -> mailcore2 (0.4.5)
    - WARN  | [iOS] Incompatible `flatten` key(s) with `http` primary key for `source` attribute
Analyzed 1 podspec.
[!] The spec did not pass validation.

This issue result in the spec not passing the validation for me.
Should I wait for the bug to be fixed before submitting?

@alloy
Copy link

alloy commented Oct 31, 2014

That's a very useful option for spec lint: --no-clean! You should document it in pod spec help :)

See pod spec lint --help ;)

@alloy
Copy link

alloy commented Oct 31, 2014

This issue result in the spec not passing the validation for me.
Should I wait for the bug to be fixed before submitting?

No, because most people use Ruby specs this is currently an edge case, so it won’t be fixed for the next release which we are trying to get out atm (beta).

For now you should use the --only-errors option to push the spec.

@dinhvh
Copy link
Member Author

dinhvh commented Oct 31, 2014

Cool. I was looking into pod spec lint help :)

@dinhvh
Copy link
Member Author

dinhvh commented Oct 31, 2014

$ pod trunk push --allow-warnings mailcore2.podspec.json 
Validating podspec
 -> mailcore2 (0.4.5)
    - WARN  | [iOS] Incompatible `flatten` key(s) with `http` primary key for `source` attribute

[!] The Pod Specification did not pass validation.

It didn't go through :(

@alloy
Copy link

alloy commented Nov 1, 2014

Sigh. One thing you can do is hot-patch your installation to apply this fix

You can find the right file like so:

~/t/C/mailcore2-ios-5 » gem which cocoapods-core
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.34.4/lib/cocoapods-core.rb
~/t/C/mailcore2-ios-5 » sudo mvim /Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.34.4/lib/cocoapods-core/specification/dsl.rb 

@dinhvh
Copy link
Member Author

dinhvh commented Nov 2, 2014

Applying this fix didn't actually help.
Is there anything to do after I patched manually?

@dinhvh
Copy link
Member Author

dinhvh commented Nov 4, 2014

@alloy Any other suggestion?

@dinhvh
Copy link
Member Author

dinhvh commented Nov 7, 2014

Here's the output when using 0.35.0.rc2
https://gist.github.com/dinhviethoa/5a5889e38b5bb26b3a25

@dinhvh
Copy link
Member Author

dinhvh commented Nov 9, 2014

0.4.5 has been pushed.

@dinhvh dinhvh closed this as completed Nov 9, 2014
@dinhvh dinhvh reopened this Nov 9, 2014
@dinhvh
Copy link
Member Author

dinhvh commented Nov 9, 2014

Hi @alloy,

Using https://github.com/MailCore/MC2CocoaPodsSample, branch mailcore2-binary

It didn't add the following flags to my xcode target:

LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/../../mailcore2-ios-5/lib"
OTHER_LDFLAGS = -ObjC -l"MailCore-ios"

Also, there was nothing related to headers. Therefore, I also had the following build error:

/Users/dvh/MailCore/MC2CocoaPodsSample/MC2CocoaPodsSample/main.mm:12:9: fatal error: 'MailCore/MailCore.h' file not found
#import <MailCore/MailCore.h>
        ^
1 error generated.

@alloy
Copy link

alloy commented Nov 10, 2014

That’s because you did not include the header_dir attribute https://gist.github.com/alloy/f3e0ce3f72fd55cb90ee#file-mailcore2-podspec-json-L19. When you do that, you will get the directory structure as I showed above.

@dinhvh
Copy link
Member Author

dinhvh commented Nov 10, 2014

I included that option.

Result of installation:

$ pod --verbose install
WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
See https://github.com/CocoaPods/guides.cocoapods.org/issues/26 for
possible solutions.

  Preparing

Analyzing dependencies

Updating spec repositories
  $ /usr/bin/git rev-parse  >/dev/null 2>&1
Updating spec repo `master`
  $ /usr/bin/git pull --ff-only
  From https://github.com/CocoaPods/Specs
     aecef4a..3c1d918  master     -> origin/master
  Updating aecef4a..3c1d918
  Fast-forward
   Specs/SwrveSDK/3.3.0/SwrveSDK.podspec.json | 30 ++++++++++++++++++++++++++++++
   1 file changed, 30 insertions(+)
   create mode 100644 Specs/SwrveSDK/3.3.0/SwrveSDK.podspec.json

Inspecting targets to integrate
  Using `ARCHS` setting to build architectures of target `Pods`: (``)

Fetching external sources
-> Fetching podspec for `mailcore2` from `~/Cocoapods/mailcore2`

Resolving dependencies of `Podfile`
.

Comparing resolved specification to the sandbox manifest
  A FXKeychain
  A GTMHTTPFetcher
  A gtm-oauth2
  A mailcore2

Downloading dependencies

-> Installing FXKeychain (1.5.2)
 > Git download
 > Git download
     $ /usr/bin/git clone https://github.com/nicklockwood/FXKeychain.git
     /Users/dvh/MailCore/MC2CocoaPodsSample/Pods/FXKeychain --single-branch
     --depth 1 --branch 1.5.2
     Cloning into '/Users/dvh/MailCore/MC2CocoaPodsSample/Pods/FXKeychain'...
     Note: checking out 'd546cbc62c0f186a72b491dfe6ac98442f0894e0'.

     You are in 'detached HEAD' state. You can look around, make experimental
     changes and commit them, and you can discard any commits you make in this
     state without impacting any branches by performing another checkout.

     If you want to create a new branch to retain commits you create, you may
     do so (now or later) by using -b with the checkout command again. Example:

       git checkout -b new_branch_name


-> Installing GTMHTTPFetcher (0.1.0)
 > Subversion download
   $ /usr/bin/svn export --non-interactive --trust-server-cert --force
   "http://gtm-http-fetcher.googlecode.com/svn/trunk/" -r "138"
   /Users/dvh/MailCore/MC2CocoaPodsSample/Pods/GTMHTTPFetcher
   A    Pods/GTMHTTPFetcher
   A    Pods/GTMHTTPFetcher/Source
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcherLogViewController.h
   A    Pods/GTMHTTPFetcher/Source/GTMReadMonitorInputStream.m
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcher.m
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPUploadFetcher.h
   A    Pods/GTMHTTPFetcher/Source/GTMMIMEDocument.h
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcher.xcodeproj
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcher.xcodeproj/project.pbxproj
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcherLogViewController.m
   A    Pods/GTMHTTPFetcher/Source/UnitTests-Info.plist
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcherLogging.h
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPUploadFetcher.m
   A    Pods/GTMHTTPFetcher/Source/GTMMIMEDocument.m
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcherLogging.m
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcherService.h
   A    Pods/GTMHTTPFetcher/Source/Tests
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPFetcherCachingTest.m
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMReadMonitorInputStreamTest.m
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPFetcherServiceTest.m
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPServer.h
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPFetcherTestServer.h
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPFetcherUtilityTest.m
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPUploadFetcherTest.m
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMGatherInputStreamTest.m
   A    Pods/GTMHTTPFetcher/Source/Tests/Data
   A    Pods/GTMHTTPFetcher/Source/Tests/Data/gettysburgaddress.txt
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPServer.m
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMMIMEDocumentTest.m
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPFetcherTestServer.m
   A    Pods/GTMHTTPFetcher/Source/Tests/GTMHTTPFetcherFetchingTest.m
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcherService.m
   A    Pods/GTMHTTPFetcher/Source/GTMGatherInputStream.h
   A    Pods/GTMHTTPFetcher/Source/ReleaseNotes.txt
   A    Pods/GTMHTTPFetcher/Source/GTMGatherInputStream.m
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetchHistory.h
   A    Pods/GTMHTTPFetcher/Source/GTMReadMonitorInputStream.h
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetcher.h
   A    Pods/GTMHTTPFetcher/Source/GTMHTTPFetchHistory.m
   A    Pods/GTMHTTPFetcher/COPYING.txt
   A    Pods/GTMHTTPFetcher/README.txt
   Exported revision 138.

-> Installing gtm-oauth2 (0.1.0)
 > Subversion download
   $ /usr/bin/svn export --non-interactive --trust-server-cert --force
   "http://gtm-oauth2.googlecode.com/svn/trunk/" -r "121"
   /Users/dvh/MailCore/MC2CocoaPodsSample/Pods/gtm-oauth2
   A    Pods/gtm-oauth2
   A    Pods/gtm-oauth2/Source
   A    Pods/gtm-oauth2/Source/GTMOAuth2Authentication.h
   A    Pods/gtm-oauth2/Source/Mac
   A    Pods/gtm-oauth2/Source/Mac/GTMOAuth2WindowController.m
   A    Pods/gtm-oauth2/Source/Mac/GTMOAuth2Window.xib
   A    Pods/gtm-oauth2/Source/Mac/GTMOAuth2Framework-Info.plist
   A    Pods/gtm-oauth2/Source/Mac/GTMOAuth2WindowController.h
   A    Pods/gtm-oauth2/Source/Touch
   A    Pods/gtm-oauth2/Source/Touch/GTMOAuth2ViewControllerTouch.h
   A    Pods/gtm-oauth2/Source/Touch/GTMOAuth2ViewControllerTouch.m
   A    Pods/gtm-oauth2/Source/Touch/GTMOAuth2ViewTouch.xib
   A    Pods/gtm-oauth2/Source/GTMOAuth2Authentication.m
   A    Pods/gtm-oauth2/Source/GTMOAuth2.xcodeproj
   A    Pods/gtm-oauth2/Source/GTMOAuth2.xcodeproj/project.pbxproj
   A    Pods/gtm-oauth2/Source/ReleaseNotes.txt
   A    Pods/gtm-oauth2/Source/GTMOAuth2SignIn.h
   A    Pods/gtm-oauth2/Source/GTMOAuth2SignIn.m
   A    Pods/gtm-oauth2/Examples
   A    Pods/gtm-oauth2/Examples/OAuth2Sample
   A    Pods/gtm-oauth2/Examples/OAuth2Sample/main.m
   A    Pods/gtm-oauth2/Examples/OAuth2Sample/OAuth2SampleAppController.h
   A    Pods/gtm-oauth2/Examples/OAuth2Sample/OAuth2Sample.xcodeproj
   A    Pods/gtm-oauth2/Examples/OAuth2Sample/OAuth2Sample.xcodeproj/project.pbxproj
   A    Pods/gtm-oauth2/Examples/OAuth2Sample/OAuth2SampleAppController.m
   A    Pods/gtm-oauth2/Examples/OAuth2Sample/Info.plist
   A    Pods/gtm-oauth2/Examples/OAuth2Sample/OAuth2Sample_Prefix.pch
   A    Pods/gtm-oauth2/Examples/OAuth2Sample/MainMenu.xib
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/OAuth2SampleRootViewControllerTouch.h
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/mainTouch.m
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/OAuth2SampleTouch.xcodeproj
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/OAuth2SampleTouch.xcodeproj/project.pbxproj
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/OAuth2SampleRootViewControllerTouch.m
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/Info.plist
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/OAuth2SampleMainiPad.xib
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/OAuth2SampleAppDelegateTouch.h
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/prefixTouch.pch
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/README.txt
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/OAuth2SampleMainTouch.xib
   A    Pods/gtm-oauth2/Examples/OAuth2SampleTouch/OAuth2SampleAppDelegateTouch.m
   A    Pods/gtm-oauth2/HTTPFetcher
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcherLogViewController.h
   A    Pods/gtm-oauth2/HTTPFetcher/GTMReadMonitorInputStream.m
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcher.m
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPUploadFetcher.h
   A    Pods/gtm-oauth2/HTTPFetcher/GTMMIMEDocument.h
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcher.xcodeproj
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcher.xcodeproj/project.pbxproj
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcherLogViewController.m
   A    Pods/gtm-oauth2/HTTPFetcher/UnitTests-Info.plist
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcherLogging.h
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPUploadFetcher.m
   A    Pods/gtm-oauth2/HTTPFetcher/GTMMIMEDocument.m
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcherLogging.m
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcherService.h
   A    Pods/gtm-oauth2/HTTPFetcher/Tests
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPFetcherCachingTest.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMReadMonitorInputStreamTest.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPFetcherServiceTest.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPServer.h
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPFetcherTestServer.h
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPFetcherUtilityTest.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPUploadFetcherTest.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMGatherInputStreamTest.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/Data
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/Data/gettysburgaddress.txt
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPServer.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMMIMEDocumentTest.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPFetcherTestServer.m
   A    Pods/gtm-oauth2/HTTPFetcher/Tests/GTMHTTPFetcherFetchingTest.m
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcherService.m
   A    Pods/gtm-oauth2/HTTPFetcher/GTMGatherInputStream.h
   A    Pods/gtm-oauth2/HTTPFetcher/ReleaseNotes.txt
   A    Pods/gtm-oauth2/HTTPFetcher/GTMGatherInputStream.m
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetchHistory.h
   A    Pods/gtm-oauth2/HTTPFetcher/GTMReadMonitorInputStream.h
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetcher.h
   A    Pods/gtm-oauth2/HTTPFetcher/GTMHTTPFetchHistory.m
   Exported revision 141.
   A    Pods/gtm-oauth2/JSON
   A    Pods/gtm-oauth2/JSON/JSON.h
   A    Pods/gtm-oauth2/JSON/NSObject+SBJSON.h
   A    Pods/gtm-oauth2/JSON/NSObject+SBJSON.m
   A    Pods/gtm-oauth2/JSON/NSString+SBJSON.h
   A    Pods/gtm-oauth2/JSON/NSString+SBJSON.m
   A    Pods/gtm-oauth2/JSON/SBJsonBase.h
   A    Pods/gtm-oauth2/JSON/SBJsonBase.m
   A    Pods/gtm-oauth2/JSON/SBJsonParser.h
   A    Pods/gtm-oauth2/JSON/SBJsonParser.m
   A    Pods/gtm-oauth2/JSON/SBJsonWriter.h
   A    Pods/gtm-oauth2/JSON/SBJsonWriter.m
   Exported revision 1763.
   Exported revision 121.

-> Installing mailcore2 (0.4.5)
 > Running prepare command
   $ /bin/bash  set -e curl -O
   https://github.com/MailCore/mailcore2/raw/master/LICENSE
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
100   133    0   133    0     0    280      0 --:--:-- --:--:-- --:--:--   281
  - Running pre install hooks

Generating Pods project
  - Creating Pods project
  - Adding source files to Pods project
  - Adding frameworks to Pods project
  - Adding libraries to Pods project
  - Adding resources to Pods project
  - Linking headers
  - Installing targets
    - Installing target `Pods-FXKeychain` iOS 8.0
    - Installing target `Pods-GTMHTTPFetcher` iOS 8.0
    - Installing target `Pods-gtm-oauth2` iOS 8.0
    - Installing target `Pods-mailcore2` iOS 8.0
    - Installing target `Pods` iOS 8.0
  - Running post install hooks
  - Writing Xcode project file to `Pods/Pods.xcodeproj`
  - Writing Lockfile in `Podfile.lock`
  - Writing Manifest in `Pods/Manifest.lock`

Integrating client project

[!] From now on use `MC2CocoaPodsSample.xcworkspace`.

Integrating target `Pods` (`MC2CocoaPodsSample.xcodeproj` project)

Headers files:

$ find Pods/Headers/Public/
Pods/Headers/Public/
Pods/Headers/Public//FXKeychain
Pods/Headers/Public//FXKeychain/FXKeychain.h
Pods/Headers/Public//gtm-oauth2
Pods/Headers/Public//gtm-oauth2/GTMOAuth2Authentication.h
Pods/Headers/Public//gtm-oauth2/GTMOAuth2SignIn.h
Pods/Headers/Public//gtm-oauth2/GTMOAuth2ViewControllerTouch.h
Pods/Headers/Public//GTMHTTPFetcher
Pods/Headers/Public//GTMHTTPFetcher/GTMGatherInputStream.h
Pods/Headers/Public//GTMHTTPFetcher/GTMHTTPFetcher.h
Pods/Headers/Public//GTMHTTPFetcher/GTMHTTPFetcherLogging.h
Pods/Headers/Public//GTMHTTPFetcher/GTMHTTPFetcherLogViewController.h
Pods/Headers/Public//GTMHTTPFetcher/GTMHTTPFetcherService.h
Pods/Headers/Public//GTMHTTPFetcher/GTMHTTPFetchHistory.h
Pods/Headers/Public//GTMHTTPFetcher/GTMHTTPUploadFetcher.h
Pods/Headers/Public//GTMHTTPFetcher/GTMMIMEDocument.h
Pods/Headers/Public//GTMHTTPFetcher/GTMReadMonitorInputStream.h

The headers are missing.
Also, I could not find the library.

@alloy
Copy link

alloy commented Nov 11, 2014

It works fine for me. The only difference is that I changed the Podfile to use iOS 7.1, because the mailcore2 spec states it isn’t compatible with 6.1.

~/t/C/MC2CocoaPodsSample [master] » cat Podfile 
platform :ios, '7.1'
pod 'MailCore2'
pod 'FXKeychain'
pod 'gtm-oauth2'
~/t/C/MC2CocoaPodsSample [master] » pod install
Analyzing dependencies
Downloading dependencies
Installing FXKeychain (1.5.2)
Installing GTMHTTPFetcher (0.1.0)
Installing gtm-oauth2 (0.1.0)
Installing mailcore2 (0.4.5)
Generating Pods project
Integrating client project
~/t/C/MC2CocoaPodsSample [master] » ls Pods/mailcore2/lib/libMailCore-ios.a 
Pods/mailcore2/lib/libMailCore-ios.a
~/t/C/MC2CocoaPodsSample [master] » ls Pods/Headers/Public/mailcore2/MailCore/
MCAbstract.h                         MCIMAPIdleOperation.h                MCNNTPOperation.h                    MCOIMAPQuotaOperation.h              MCObjC.h
MCAbstractMessage.h                  MCIMAPMessage.h                      MCNNTPOperationCallback.h            MCOIMAPSearchExpression.h            MCObject.h
MCAbstractMessagePart.h              MCIMAPMessagePart.h                  MCNNTPProgressCallback.h             MCOIMAPSearchOperation.h             MCOperation.h
MCAbstractMultipart.h                MCIMAPMessageRenderingOperation.h    MCNNTPSession.h                      MCOIMAPSession.h                     MCOperationCallback.h
MCAbstractPart.h                     MCIMAPMultipart.h                    MCNetService.h                       MCOIndexSet.h                        MCOperationQueue.h
MCAddress.h                          MCIMAPNamespace.h                    MCNull.h                             MCOMailProvider.h                    MCPOP.h
MCAddressDisplay.h                   MCIMAPNamespaceItem.h                MCOAbstract.h                        MCOMailProvidersManager.h            MCPOPAsyncSession.h
MCArray.h                            MCIMAPNoopOperation.h                MCOAbstractMessage.h                 MCOMessageBuilder.h                  MCPOPFetchHeaderOperation.h
MCAssert.h                           MCIMAPOperation.h                    MCOAbstractMessagePart.h             MCOMessageHeader.h                   MCPOPFetchMessageOperation.h
MCAsync.h                            MCIMAPOperationCallback.h            MCOAbstractMultipart.h               MCOMessageParser.h                   MCPOPFetchMessagesOperation.h
MCAsyncIMAP.h                        MCIMAPPart.h                         MCOAbstractPart.h                    MCOMessagePart.h                     MCPOPMessageInfo.h
MCAsyncNNTP.h                        MCIMAPProgressCallback.h             MCOAddress.h                         MCOMultipart.h                       MCPOPNoopOperation.h
MCAsyncPOP.h                         MCIMAPQuotaOperation.h               MCOAttachment.h                      MCONNTP.h                            MCPOPOperation.h
MCAsyncSMTP.h                        MCIMAPSearchExpression.h             MCOConstants.h                       MCONNTPDisconnectOperation.h         MCPOPOperationCallback.h
MCAttachment.h                       MCIMAPSearchOperation.h              MCOHTMLRendererDelegate.h            MCONNTPFetchAllArticlesOperation.h   MCPOPProgressCallback.h
MCAutoreleasePool.h                  MCIMAPSession.h                      MCOHTMLRendererIMAPDelegate.h        MCONNTPFetchArticleOperation.h       MCPOPSession.h
MCBaseTypes.h                        MCIMAPSyncResult.h                   MCOIMAP.h                            MCONNTPFetchHeaderOperation.h        MCProvider.h
MCConnectionLogger.h                 MCIndexSet.h                         MCOIMAPAppendMessageOperation.h      MCONNTPFetchOverviewOperation.h      MCRFC822.h
MCCore.h                             MCIterator.h                         MCOIMAPBaseOperation.h               MCONNTPFetchServerTimeOperation.h    MCRange.h
MCData.h                             MCJSON.h                             MCOIMAPCapabilityOperation.h         MCONNTPGroupInfo.h                   MCRenderer.h
MCDateFormatter.h                    MCLibetpanTypes.h                    MCOIMAPCopyMessagesOperation.h       MCONNTPListNewsgroupsOperation.h     MCSMTP.h
MCHTMLRendererCallback.h             MCLog.h                              MCOIMAPFetchContentOperation.h       MCONNTPOperation.h                   MCSMTPAsyncSession.h
MCHash.h                             MCMD5.h                              MCOIMAPFetchFoldersOperation.h       MCONNTPSession.h                     MCSMTPNoopOperation.h
MCHashMap.h                          MCMailProvider.h                     MCOIMAPFetchMessagesOperation.h      MCONetService.h                      MCSMTPOperation.h
MCICUTypes.h                         MCMailProvidersManager.h             MCOIMAPFetchNamespaceOperation.h     MCOObjectWrapper.h                   MCSMTPOperationCallback.h
MCIMAP.h                             MCMainThread.h                       MCOIMAPFetchParsedContentOperation.h MCOOperation.h                       MCSMTPProgressCallback.h
MCIMAPAppendMessageOperation.h       MCMessageBuilder.h                   MCOIMAPFolder.h                      MCOPOP.h                             MCSMTPSession.h
MCIMAPAsyncSession.h                 MCMessageConstants.h                 MCOIMAPFolderInfo.h                  MCOPOPFetchHeaderOperation.h         MCSet.h
MCIMAPCapabilityOperation.h          MCMessageHeader.h                    MCOIMAPFolderInfoOperation.h         MCOPOPFetchMessageOperation.h        MCSizeFormatter.h
MCIMAPConnectOperation.h             MCMessageParser.h                    MCOIMAPFolderStatus.h                MCOPOPFetchMessagesOperation.h       MCString.h
MCIMAPCopyMessagesOperation.h        MCMessagePart.h                      MCOIMAPFolderStatusOperation.h       MCOPOPMessageInfo.h                  MCUtils.h
MCIMAPFetchContentOperation.h        MCMultipart.h                        MCOIMAPIdentity.h                    MCOPOPNoopOperation.h                MCValue.h
MCIMAPFetchFoldersOperation.h        MCNNTP.h                             MCOIMAPIdentityOperation.h           MCOPOPOperation.h                    MailCore.h
MCIMAPFetchMessagesOperation.h       MCNNTPAsyncSession.h                 MCOIMAPIdleOperation.h               MCOPOPSession.h                      NSArray+MCO.h
MCIMAPFetchNamespaceOperation.h      MCNNTPCheckAccountOperation.h        MCOIMAPMessage.h                     MCOProvider.h                        NSData+MCO.h
MCIMAPFetchParsedContentOperation.h  MCNNTPFetchAllArticlesOperation.h    MCOIMAPMessagePart.h                 MCORFC822.h                          NSDictionary+MCO.h
MCIMAPFolder.h                       MCNNTPFetchArticleOperation.h        MCOIMAPMessageRenderingOperation.h   MCORange.h                           NSError+MCO.h
MCIMAPFolderInfoOperation.h          MCNNTPFetchHeaderOperation.h         MCOIMAPMultipart.h                   MCOSMTP.h                            NSIndexSet+MCO.h
MCIMAPFolderStatus.h                 MCNNTPFetchOverviewOperation.h       MCOIMAPNamespace.h                   MCOSMTPOperation.h                   NSObject+MCO.h
MCIMAPFolderStatusOperation.h        MCNNTPFetchServerTimeOperation.h     MCOIMAPNamespaceItem.h               MCOSMTPSendOperation.h               NSString+MCO.h
MCIMAPIdentity.h                     MCNNTPGroupInfo.h                    MCOIMAPOperation.h                   MCOSMTPSession.h                     NSValue+MCO.h

@dinhvh
Copy link
Member Author

dinhvh commented Nov 11, 2014

I don't have the same behavior:

Here's the Podfile:
https://gist.github.com/dinhviethoa/5ec52dd5ab89f137128b

Here's the spec for MailCore2:
https://gist.github.com/dinhviethoa/1f38b169a7f99a0273eb

Here's the pod version:
0.35.0.rc2

Is there anything I'm missing?

Is there more information I can provide to investigate why the behavior is not the same?

@dinhvh dinhvh mentioned this issue Nov 13, 2014
@alloy
Copy link

alloy commented Nov 13, 2014

pod 'mailcore2', :path => '~/Cocoapods/mailcore2'

What is at that path? Is it a clone of https://github.com/MailCore/mailcore2.git or is it a download of http://d.etpan.org/mailcore2-deps/mailcore2-ios/mailcore2-ios-5.zip ? The former would clearly not work, because it does not have the same structure as the zipball nor does it have the prebuilt binary.


I have created a simpler example that you can test to verify, where I copied the podspec into the MC2CocoaPodsSample dir:

~/t/C/MC2CocoaPodsSample [master] » cat Podfile
platform :ios, '7.1'
pod 'mailcore2', :podspec => 'mailcore2.podspec.json'
pod 'FXKeychain'
pod 'gtm-oauth2'
~/t/C/MC2CocoaPodsSample [master] » ls -l
total 32
-rw-r--r--   1 eloy  staff  1500 Nov 10 10:14 LICENSE
drwxr-xr-x  24 eloy  staff   816 Nov 10 10:14 MC2CocoaPodsSample
drwxr-xr-x@  4 eloy  staff   136 Nov 10 10:16 MC2CocoaPodsSample.xcodeproj
drwxr-xr-x   5 eloy  staff   170 Nov 10 10:16 MC2CocoaPodsSample.xcworkspace
-rw-r--r--   1 eloy  staff   109 Nov 13 12:10 Podfile
-rw-r--r--   1 eloy  staff    97 Nov 10 10:14 README.md
-rw-r--r--   1 eloy  staff   816 Nov 13 12:11 mailcore2.podspec.json
~/t/C/MC2CocoaPodsSample [master] » pod install
Analyzing dependencies
Fetching podspec for `mailcore2` from `mailcore2.podspec.json`
Downloading dependencies
Installing FXKeychain (1.5.2)
Installing GTMHTTPFetcher (0.1.0)
Installing gtm-oauth2 (0.1.0)
Installing mailcore2 (0.4.5)
Generating Pods project
Integrating client project

Besides some ARC errors in the sample app code, this version builds fine for me.

@dinhvh
Copy link
Member Author

dinhvh commented Nov 13, 2014

:path was pointing to the folder with the .podspec file.
It was wrong.
It's fixed. Thanks!

@dinhvh dinhvh closed this as completed Nov 13, 2014
@alloy
Copy link

alloy commented Nov 14, 2014

Ace!

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

2 participants