Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

Use Carthage for dependencies #7

Merged
merged 7 commits into from
Jun 14, 2016
Merged

Use Carthage for dependencies #7

merged 7 commits into from
Jun 14, 2016

Conversation

siemensikkema
Copy link
Contributor

I don't want to start a flamewar with Cocoapods supporters but this way I was able to support both Carthage and Cocoapods for including Gaikan in a project.
Quick and Nimble are installed using Cartfile.private meaning they won't be compiled for users of the framework but they remain available for testing.

see #6

@pjechris
Copy link
Owner

pjechris commented May 28, 2016

I'm ok with supporting Carthage, but removing Podfile and Podfile.lock makes compiling Gaikan with Cocoapods impossible.

From what I see, we should do the following to get everything working:

  • Remove any references to Cocoapods and Carthage from pbx project. I know it will be OK for Cocoapods, but no idea if it's possible for Carthage?
  • Replace KVOController with another library that is both available through Cocoapods and Carthage. And if possible through SPM too.

What do you think about that?

@siemensikkema
Copy link
Contributor Author

I have tested both Carthage and Cocoapods with my changes and they both seem to work.

The Gaikan.podspec file is sufficient for 'external' Cocoapods support. The only reference to Carthage I left was in the framework search path. All you need to do now is run carthage update to get the dependencies and successfully compile. A project using Gaikan through Carthage would also have to link KVOController though.

KVOController is not the problem, it already supports both Cocoapods and Carthage.

@siemensikkema
Copy link
Contributor Author

Relevant video: https://realm.io/news/tryswift-jeff-hui-creating-a-swift-library/
He recommends against using CocoaPods for the library's dependencies because of the changes that it makes to the project pbx file.

@pjechris
Copy link
Owner

Gaikan.podspec is relevant for external dependencies, but what about development? Without Podfile and Podfile.lock it seems I won't be able to fetch my dependencies when developing.

@siemensikkema
Copy link
Contributor Author

Correct, you would have to use Carthage for that. carthage update --platform iOS --no-use-binaries is the way to go. The first option is to
build for iOS only (if needed) and the second is to prevent using
precompiled binaries which Xcode currently does not support.
From my understanding using carthage is the only way to support multiple
dependency managers it doesn't rely on adjustments to the pbx file unlike
Cocoapods.
On Mon, 30 May 2016 at 09:55, JC notifications@github.com wrote:

Gaikan.podspec is relevant for external dependencies, but what about
development? Without Podfile and Podfile.lock it seems I won't be able to
fetch my dependencies when developing.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#7 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABAFX0zFKR4zamWCAds-NWYEZtYOnFwrks5qGpftgaJpZM4IoeRD
.

@pjechris
Copy link
Owner

Ok I'll take a look ASAP.
Thanks!

@pjechris
Copy link
Owner

@siemensikkema I can't get carthage update working:

A shell task (/usr/bin/xcrun xcodebuild
-project /Users/pjechris/projects/akane/Gaikan/Carthage/Checkouts/Nimble/Nimble.xcodeproj
-scheme Nimble-tvOS
-configuration Release
-sdk appletvos
ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES
clean build) failed with exit code 65
ld: '/Applications/Xcode-7.3.0.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/Library/Frameworks/XCTest.framework/XCTest' does not contain bitcode.
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE) or obtain an updated library from the vendor for architecture arm64

@siemensikkema
Copy link
Contributor Author

@pjechris have you used the --no-use-binaries flag? If that doesn't work, it might have to do with the fact you're compiling for tvOS. I have no experience with that. Try --platform iOS for example to see if that works at least. By default it compiles for all available platforms.

@pjechris pjechris merged commit 3ff6d3f into pjechris:master Jun 14, 2016
@pjechris
Copy link
Owner

@siemensikkema I got everything working, thanks!

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

Successfully merging this pull request may close these issues.

2 participants