Skip to content

Commit

Permalink
Minor document updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonconnery committed Feb 23, 2024
1 parent 320702c commit 0bd983e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Installation

Add the SDK to your project using Swift Package Manager using this repo url.
Add the SDK to your project using Swift Package Manager using this repo url. From the project settings, select the Package Dependencies tab, beside Info and Build Settings tab. Search with this url to find and add the package.

TODO: explain further with specific example or screenshot of correct url?
NOTE: During alpha and beta testing, while this repository is private you may need to configure xcode with your Github Account. Add in account from the Xcode Preferences panel, in the account section. If building using a cli tool like xcodebuild, you may need to specify either `-scmProvider system` or `-scmProvider xcode` to choose if your system git credentials or xcode credentials are used.

## Configuration

Expand All @@ -30,12 +30,13 @@ Once configured, the chat view can be created and shown to users like any other
Button(action: {
showChat.toggle()
}, label: {
Text("\(Chat Now")
Text("Chat Now")
}).sheet(isPresented: $showChat, content: {
HubspotChatView()
})
```


## Documentation

Reference documentation can be found here: https://tapadoo.github.io/hubspot-mobile-sdk-ios/documentation/hubspotmobilesdk
9 changes: 9 additions & 0 deletions Sources/HubspotMobileSDK/Documentation.docc/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,19 @@ The basic steps to get the SDK installed and opening chat views.

The SDK is a swift package containing hubspot chat view , notification functionality, and additional optional UI components.

### Alpha / Beta Only - Ensure access to repository

Confirm the SDK repository is accessible at [https://github.com/HubSpot/mobile-chat-sdk-ios](https://github.com/HubSpot/mobile-chat-sdk-ios)

During alpha and beta testing, while the repository is private you may need to configure xcode with your Github Account. Add in account from the Xcode Preferences panel, in the account section. If building using a cli tool like xcodebuild, you may need to specify either `-scmProvider system` or `-scmProvider xcode` to choose if your system git credentials or xcode credentials are used.

### Installing & Configuring the SDK

Use swift packages to add the SDK to your workspace, using the github repository URL. Add the `HubspotMobileSDK` library as a dependency of your app project and target.

![Adding Package](confirm-spm)


Be sure to download and include the `Hubspot-Info.plist` file from your hubspot account at [hubspot.com](https://www.hubspot.com). Important - make sure to include the file as part of the target within Xcode , in the right inspection panel:
![Demo screenshot](hsIncludeFile) ![Demo screenshot](hsIncludedTarget)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ This article covers the 2 methods of integrating the SDK and Chat with push noti

There are two ways to handle hubspot push notifications in your app, first is for the app to be the main notification handler - in this setup, the app itself determines what to do with each notification, and controls the when and how notification permissions are prompted for. This is the choice for any app that already uses push for its own purposes. The second way is to allow the Hubspot SDK to handle the notifications itself, and trigger a callback whenever a chat needs to be displayed. This may be convenient for apps that have not yet configured push notifications.

### Make sure that push is enabled for your app

Confirm that in the target settings, under signing & capabilities, push notifications is listed. If its not listed use the `+Capability` button to add it.

![Push Capability Exists](push-messaging-added)

### App Delegate Changes

Whichever approach is taken, the SDK will need to be informed when the app has a push notification. In your app delegate, call the sdk method ``HubspotManager/setPushToken(apnsPushToken:)`` from within the push registration delegate method.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0bd983e

Please sign in to comment.