iospubnubcarthage

PubNub - iOS - Carthage only?


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)


Solution

  • 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.