Skip to content

Commit 222bf4b

Browse files
Craig Lanekazydek
Craig Lane
andauthored
Initial Getting Started app (pubnub#1)
Co-authored-by: Karolina Zydek <[email protected]>
1 parent 0d6138e commit 222bf4b

File tree

20 files changed

+1026
-2
lines changed

20 files changed

+1026
-2
lines changed

.gitignore

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
## macOS
2+
.DS_Store
3+
4+
## Build generated
5+
build/
6+
DerivedData/
7+
8+
## Config files containing secret keys
9+
*.debug.xcconfig
10+
*.release.xcconfig
11+
12+
## Various settings
13+
*.pbxuser
14+
!default.pbxuser
15+
*.mode1v3
16+
!default.mode1v3
17+
*.mode2v3
18+
!default.mode2v3
19+
*.perspectivev3
20+
!default.perspectivev3
21+
xcuserdata/
22+
23+
## Other
24+
*.moved-aside
25+
*.xccheckout
26+
*.xcscmblueprint
27+
keysset.plist
28+
29+
## Obj-C/Swift specific
30+
*.hmap
31+
*.ipa
32+
*.dSYM.zip
33+
*.dSYM
34+
35+
## Playgrounds
36+
timeline.xctimeline
37+
playground.xcworkspace
38+
39+
# Swift Package Manager
40+
#
41+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
42+
# Packages/
43+
# Package.pins
44+
# Package.resolved
45+
.build
46+
.swiftpm
47+
Package.resolved
48+
49+
# CocoaPods
50+
#
51+
# We recommend against adding the Pods directory to your .gitignore. However
52+
# you should judge for yourself, the pros and cons are mentioned at:
53+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
54+
55+
Pods/
56+
57+
# Add this line if you want to avoid checking in source code from the Xcode workspace
58+
# *.xcworkspace
59+
60+
# Carthage
61+
#
62+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
63+
# Carthage/Checkouts
64+
65+
Carthage
66+
67+
# fastlane
68+
#
69+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
70+
# screenshots whenever they are needed.
71+
# For more information about the recommended setup visit:
72+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
73+
74+
fastlane/report.xml
75+
fastlane/test_output

Examples.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

LICENSE

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
2+
Copyright (c) 2022 PubNub Inc.
3+
https://www.pubnub.com/
4+
https://www.pubnub.com/terms
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in
14+
all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
THE SOFTWARE.
23+
24+
PubNub Real-time Cloud-Hosted Push API and Push Notification Client Frameworks
25+
Copyright (c) 2013 PubNub Inc.
26+
https://www.pubnub.com/
27+
https://www.pubnub.com/terms

README.md

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,28 @@
1-
# chat-components-ios-examples
2-
PubNub Chat Components Examples for iOS
1+
# Samples for PubNub Chat Components for iOS
2+
3+
This repository contains a set of iOS projects that will help you learn about PubNub Chat Components for iOS.
4+
5+
Each sample application demonstrates a different type of chat, set of features, and use case.
6+
7+
## Prerequisites
8+
9+
You need these to get started:
10+
11+
* [Xcode](https://developer.apple.com/xcode/) (>= Xcode 13)
12+
* [PubNub Keyset](https://dashboard.pubnub.com/)
13+
14+
Clone this project and open a given app in Xcode. If you're authenticated into Xcode with your GitHub account, you can also open the project directly from GitHub using the [Open in Xcode](https://github.blog/2017-06-05-clone-in-xcode/) button.
15+
16+
## Sample apps
17+
18+
Choose a sample application that demonstrates the use of chat components.
19+
20+
| Name | Features | Chat type | Use case |
21+
|-----|---------|---------|---------|
22+
| [`getting-started`](getting-started/) | <br><ul><li>Message list and message input integration</li><li>Light & dark themes</li></ul></br> | 1:1 | <img src="/assets/getting-started-ios-app.png" alt="Getting Started app for iOS" style="width:300px"/> |
23+
24+
## Useful links
25+
26+
For more information about PubNub Chat Components for iOS, refer to:
27+
* [GitHub repository](https://github.com/pubnub/chat-components-ios/blob/master/README.md)
28+
* [Documentation](https://www.pubnub.com/docs/chat/components/ios/get-started-ios)

assets/getting-started-ios-app.png

55.3 KB
Loading

getting-started/.gitignore

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
## macOS
2+
.DS_Store
3+
4+
## Build generated
5+
build/
6+
DerivedData/
7+
8+
## Config files containing secret keys
9+
*.debug.xcconfig
10+
*.release.xcconfig
11+
12+
## Various settings
13+
*.pbxuser
14+
!default.pbxuser
15+
*.mode1v3
16+
!default.mode1v3
17+
*.mode2v3
18+
!default.mode2v3
19+
*.perspectivev3
20+
!default.perspectivev3
21+
xcuserdata/
22+
23+
## Other
24+
*.moved-aside
25+
*.xccheckout
26+
*.xcscmblueprint
27+
keysset.plist
28+
29+
## Obj-C/Swift specific
30+
*.hmap
31+
*.ipa
32+
*.dSYM.zip
33+
*.dSYM
34+
35+
## Playgrounds
36+
timeline.xctimeline
37+
playground.xcworkspace
38+
39+
# Swift Package Manager
40+
#
41+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
42+
# Packages/
43+
# Package.pins
44+
# Package.resolved
45+
.build
46+
47+
# CocoaPods
48+
#
49+
# We recommend against adding the Pods directory to your .gitignore. However
50+
# you should judge for yourself, the pros and cons are mentioned at:
51+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
52+
53+
Pods/
54+
55+
# Add this line if you want to avoid checking in source code from the Xcode workspace
56+
# *.xcworkspace
57+
58+
# Carthage
59+
#
60+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
61+
# Carthage/Checkouts
62+
63+
Carthage
64+
65+
# fastlane
66+
#
67+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
68+
# screenshots whenever they are needed.
69+
# For more information about the recommended setup visit:
70+
# https://docs.fastlane.tools/best-practices/source-control/#source-control
71+
72+
fastlane/report.xml
73+
fastlane/test_output

getting-started/.swiftformat

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# format options
2+
--indent 2
3+
--commas inline
4+
5+
--disable wrapMultilineStatementBraces
6+
7+
# file options
8+
--exclude .build
9+
10+
# Swift Version
11+
--swiftversion 5.0

getting-started/.swiftlint.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
line_length:
2+
ignores_comments: true
3+
disabled_rules:
4+
- identifier_name
5+
- type_name
6+
- function_body_length
7+
- function_parameter_count
8+
excluded:
9+
- .build
10+
- bundle
11+
- .bundle
12+
- fastlane
13+
opt_in_rules:
14+
- force_unwrapping
15+
- overridden_super_call
16+
- prohibited_super_call
17+
- first_where
18+
- closure_spacing
19+
- unneeded_parentheses_in_closure_argument
20+
- redundant_nil_coalescing
21+
- pattern_matching_keywords
22+
- explicit_init
23+
- contains_over_first_not_nil
24+
- empty_parentheses_with_trailing_closure
25+
- empty_string
26+
- sorted_first_last
27+
- anyobject_protocol

getting-started/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Getting Started Application
2+
3+
`getting-started` is a basic 1:1 chat application that features a message input field and a list of messages that pile up on the screen as you send them.
4+
5+
<img src="../assets/getting-started-ios-app.png" alt="Getting Started app for iOS" style="width:300px"/>
6+
7+
## Prerequisites
8+
9+
This application uses [PubNub Swift SDK](https://github.com/pubnub/swift) (>= 4.1.2) for chat components and [UIKit](https://developer.apple.com/documentation/uikit) as the UI Toolkit.
10+
11+
To use the app, you need:
12+
13+
* [Xcode](https://developer.apple.com/xcode/) (>= Xcode 13)
14+
* PubNub account on [Admin Portal](https://dashboard.pubnub.com/).
15+
16+
## Usage
17+
18+
Read the [Getting Started](https://www.pubnub.com/docs/chat/components/ios/get-started-ios) guide to learn how to use the app and better understand the logic behind it.
19+
20+
## Features
21+
22+
The `getting-started` app showcases these PubNub Chat Components for iOS:
23+
24+
* [MessageInput](https://www.pubnub.com/docs/chat/components/ios/ui-components-ios#messageinput)
25+
* [MessageList](https://www.pubnub.com/docs/chat/components/ios/ui-components-ios#messagelist)

0 commit comments

Comments
 (0)