Skip to content

Commit 70f81d2

Browse files
authored
Update README.md
1 parent e24050f commit 70f81d2

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

README.md

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ dependencies: [
3131
]
3232
```
3333

34-
## Foundations
35-
`APNSwift` is built with a layered approach. It exposes three tiers of API's.
36-
1. A [raw API](https://github.com/swift-server-community/APNSwift/blob/d60241fe2b6eb193331567a871697d3f4bdf70fb/Sources/APNSwift/APNSClient.swift#L254) that takes basic types such as `String`'s
37-
2. A slightly more [semantically safe API](https://github.com/swift-server-community/APNSwift/blob/d60241fe2b6eb193331567a871697d3f4bdf70fb/Sources/APNSwift/APNSClient.swift#L183), which takes types, like [`APNSPriority`](https://github.com/swift-server-community/APNSwift/blob/main/Sources/APNSwift/APNSPriority.swift), [`APNSPushType`](https://github.com/swift-server-community/APNSwift/blob/main/Sources/APNSwift/APNSPushType.swift), [`APNSNotificationExpiration`](https://github.com/swift-server-community/APNSwift/blob/main/Sources/APNSwift/APNSNotificationExpiration.swift), etc.
38-
3. The [safest API](https://github.com/swift-server-community/APNSwift/blob/d60241fe2b6eb193331567a871697d3f4bdf70fb/Sources/APNSwift/Alert/APNSClient%2BAlert.swift#L32) which takes fully semantic types such as [`APNSAlertNotification`](https://github.com/swift-server-community/APNSwift/blob/d60241fe2b6eb193331567a871697d3f4bdf70fb/Sources/APNSwift/Alert/APNSAlertNotification.swift#L177)
39-
40-
**We recommened using number 3, the semantically safest API to ensure your push notification is delivered correctly**. *This README assumes that you are using number 3.* However if you need more granular approach, or something doesn't exist in this library, please use 2 or 1. (Also please open an issue if we missed something so we can get a semantically correct version!)
41-
4234
## Getting Started
4335
APNSwift aims to provide semantically correct structures to sending push notifications. You first need to setup a [`APNSClient`](https://github.com/swift-server-community/APNSwift/blob/main/Sources/APNSwift/APNSClient.swift). To do that youll need to know your authentication method
4436

@@ -144,31 +136,6 @@ This logger can be passed into the `APNSClient` and will log background things l
144136
#### **Notification Send Logger**
145137
This logger can be passed into any of the `send:` methods and will log everything related to a single send request.
146138

147-
## Using the non semantic safe APIs
148-
149-
APNSwift provides the ability to send raw payloads. You can use `Data`, `ByteBuffer`, `DispatchData`, `Array`
150-
Though this is to be used with caution. APNSwift cannot gurantee delivery if you do not have the correct payload.
151-
For more information see: [Creating APN Payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html)
152-
153-
```swift
154-
/// Extremely Raw,
155-
try await client.send(
156-
payload: payload,
157-
deviceToken: token,
158-
pushType: "alert", deadline: .distantFuture
159-
)
160-
161-
/// or a little safer but still raw
162-
try await client.send(
163-
payload: payload,
164-
deviceToken: token,
165-
pushType: .alert,
166-
expiration: .immediatly,
167-
priority: .immediatly,
168-
deadline: .distantFuture
169-
)
170-
```
171-
172139
## Server Example
173140
Take a look at [Program.swift](https://github.com/swift-server-community/APNSwift/blob/main/Sources/APNSExample/Program.swift)
174141

0 commit comments

Comments
 (0)