JohnSundell / SwiftPlate

Easily generate cross platform Swift framework projects from the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add SwiftPlate generated project as dependence for another SwiftPlate generated project

navartis opened this issue · comments

How to add SwiftPlate generated project as dependence for another SwiftPlate generated project?

It it posible?

Projects that SwiftPlate generate support all 3 of the major package managers for Swift: the Swift Package Manager, Carthage and CocoaPods. Using either of them you can easily setup dependencies for your projects.

This is not something that SwiftPlate does, instead it's something you do using your package manager of choice after you've generated your projects with SwiftPlate. Please refer to their documentation for more information.

Hi, John!
Of course yes it is not SwiftPlate fault.
SwiftPlate is great, really helpful.
Thank you for it's creation.

But, it seems to me question is actual.
I have framework ProjectA.
And have framework ProjectB.

I added ProjectA as dependency for ProjectB in Package.swift.
Then run “pod init” for the ProjectB, edit Podfile adding “pod ‘ProjectA’, :git=> ‘…’’“

As result:
swift test - OK
CMD+U for MacOS target - OK
CMD+U for iOS - fails with the error

Target 'Pods-ProjectB-iOS' of project 'Pods' was rejected as an implicit dependency for 'Pods_ProjectB_iOS.framework' because its architectures 'x86_64' didn't contain all required architectures 'i386 x86_64'

I would really glade if you or some one help me.

I think this might be related to #13?

Hi again @navartis! Happy to hear you like SwiftPlate 😄

I understood that you didn't mean that it was SwiftPlate's fault. I closed the issue simply because it's outside of the scope of SwiftPlate. The best place to ask for help about CocoaPods is through their support channels. For the issue that you mention, it looks like it's because you need to set the Build Active Architecture Only build setting for Debug to No (Xcode's default is Yes).

For more information about how to setup frameworks with dependencies with CocoaPods, please refer to their documentation and their support channels.