4
votes

Question for someone who's quite fresh with PubNub and iOS-Swift,

as of today can you put PubNub in a project, entirely, absolutely not using cocoapods in any way? So, pure Carthage?

(PubNub's own doco is a little confused on the matter, at a quick glance.)

(Strictly iOS 10, no legacy)

2

2 Answers

4
votes

Docs looks pretty clear about how to use Carthage way of integration. To run this command you don't need CocoaPods (platform can be any: macos, tvos, ios and watchos or w/o platform to build all):

carthage update --platform ios

The only thing is required is Cartfile at the same directory from which you will call command from above. It should contain at leas this line (depending from version which you need):

github "pubnub/objective-c" ~> 4.1

As result you will get .framework bundle under Carthage/Build/{platform-name}/PubNub.framework. As mentioned in docs you can drag&drop it into your project and don't forget to add it to Embedded Binaries.

2
votes

It looks like the project builds standalone frameworks, so you could add it as a Carthage dependency.

Carthage just downloads the project and builds it according to the project settings. All the consuming project needs to do is add the specific built product to you project.