Skip to content

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyGuiguen committed May 28, 2020
2 parents db281aa + 74f3996 commit 1c22c03
Show file tree
Hide file tree
Showing 49 changed files with 255 additions and 1,976 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# CHANGELOG
All notable changes to this project will be documented in this file.

## 3.0.0
* CometD - Remove CometDClient from ZetaPush
[Anthony GUIGUEN](https://https://github.com/anthonyGuiguen)
[#32](https://github.com/Insurlytech/zetapush-swift/pull/32)
* SPM - Migrate ZetaPushNetworks to Swift Package Manager
[Anthony GUIGUEN](https://https://github.com/anthonyGuiguen)
[#31](https://github.com/Insurlytech/zetapush-swift/pull/31)

## 2.4.2
* Client API - Add the possibility to override api Url for Smart and Weak Clients
Expand Down
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Frequently Asked Questions

## Why I get the following Swift Compiler Error 'No such module 'ZetaPushSwift' ?
## Why I get the following Swift Compiler Error 'No such module 'ZetaPushNetwork' ?

This is a common error due to incorrect project selection.

Expand Down
70 changes: 70 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"object": {
"pins": [
{
"package": "CometDClient",
"repositoryURL": "https://github.com/Insurlytech/CometDClient-iOS.git",
"state": {
"branch": null,
"revision": "7dc8edfe6af41db6c6e64bf8541b64d2c93a559a",
"version": "1.0.0"
}
},
{
"package": "Gloss",
"repositoryURL": "https://github.com/hkellaway/Gloss.git",
"state": {
"branch": null,
"revision": "d2249d299a17418dc69b7685a00ccd31510cf14e",
"version": "3.1.0"
}
},
{
"package": "PromiseKit",
"repositoryURL": "https://github.com/mxcl/PromiseKit",
"state": {
"branch": null,
"revision": "f14f16cc2602afec1030e4f492100d6d43dca544",
"version": "6.13.1"
}
},
{
"package": "Starscream",
"repositoryURL": "https://github.com/daltoniam/Starscream.git",
"state": {
"branch": null,
"revision": "cfc7b7b8dc98df3f7bef8aa068bbaec13d9ceb1b",
"version": "4.0.3"
}
},
{
"package": "swift-nio-zlib-support",
"repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git",
"state": {
"branch": null,
"revision": "37760e9a52030bb9011972c5213c3350fa9d41fd",
"version": "1.0.0"
}
},
{
"package": "SwiftyJSON",
"repositoryURL": "https://github.com/SwiftyJSON/SwiftyJSON.git",
"state": {
"branch": null,
"revision": "2b6054efa051565954e1d2b9da831680026cd768",
"version": "4.3.0"
}
},
{
"package": "XCGLogger",
"repositoryURL": "https://github.com/DaveWoodCom/XCGLogger.git",
"state": {
"branch": null,
"revision": "a9c4667b247928a29bdd41be2ec2c8d304215a54",
"version": "7.0.1"
}
}
]
},
"version": 1
}
35 changes: 35 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "ZetaPushNetwork",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "ZetaPushNetwork",
targets: ["ZetaPushNetwork"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(name: "CometDClient", url: "https://github.com/Insurlytech/CometDClient-iOS.git", .upToNextMajor(from: "1.0.0")),
// .package(name: "CometDClient", path: "../CometDClient-iOS"), //AGU
.package(url: "https://github.com/hkellaway/Gloss.git", .upToNextMajor(from: "3.1.0")),
.package(url: "https://github.com/mxcl/PromiseKit", .upToNextMajor(from: "6.13.1")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "ZetaPushNetwork",
dependencies: [
"CometDClient",
"Gloss",
"PromiseKit"
]),
.testTarget(
name: "ZetaPushNetworkTests",
dependencies: ["ZetaPushNetwork"]),
]
)
25 changes: 0 additions & 25 deletions Podfile

This file was deleted.

48 changes: 0 additions & 48 deletions Podfile.lock

This file was deleted.

80 changes: 35 additions & 45 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -10,56 +10,32 @@ These instructions will get you a copy of the project up and running on your loc

### Prerequisites

You must have [Cocoapods](https://cocoapods.org/) installed and running
## Installation

```
sudo gem install cocoapods
```

### Installing

First create a new project with XCode.
In the project directory launch the command

```console
pod init
```
### CocoaPods

A PodFile is created, edit it and add ZetaPushSwift pod
Check out [Get Started](http://cocoapods.org/) tab on [cocoapods.org](http://cocoapods.org/).

```
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
To use ZetaPushNetwork in your 'Podfile':
pod 'ZetaPushNetwork', '~> 3.0.0'

target 'ZetaPushTestPod' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
Then run:

# Pods for ZetaPushTestPod
pod "ZetaPushSwift"
pod install

end
### Swift Package Manager

```
The [Swift Package Manager](https://swift.org/package-manager/) is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler.

Finally, run pod install to install libraries
Once you have your Swift package set up, adding ZetaPushNetwork as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.

```console
pod install
```swift
dependencies: [
.Package(url: "https://github.com/Insurlytech/CometDClient-iOS.git", majorVersion: 3)
]
```

You can now open the newly generated workspace (.xcworkspace) in XCode

:warning: **Close the previously openned project and open the workspace instead.**

### Pre-requisit

You must have an account on [ZetaPush](https://zetapush.com) and a valid SandboxId. FYI, on ZetaPush a SandboxId identify your hosted application on ZetaPush cloud.

For the examples above, you must have deployed an authentication ( [Weak](https://ref.zpush.io/#it_weak) at least) and an [Echo](https://ref.zpush.io/#it_echo) service

You can read the [full documentation](https://doc.zetapush.com/how/introduction/) for more information

## Any questions?

* [Frequently Asked Questions](./FAQ.md)
Expand All @@ -70,15 +46,15 @@ You can read the [full documentation](https://doc.zetapush.com/how/introduction/

You must import the library into your swift file
```swift
import ZetaPushSwift
import ZetaPushNetwork

```

Create a ZetaPushWeakClient object. This object will do all the hard work for you to connect to ZetaPush with a weak authentication

```swift
import UIKit
import ZetaPushSwift
import ZetaPushNetwork

class ViewController: UIViewController {

Expand All @@ -100,7 +76,7 @@ To verify that you're really connected, let's add a callback to be warned when t

```swift
import UIKit
import ZetaPushSwift
import ZetaPushNetwork

class ViewController: UIViewController, ClientHelperDelegate {

Expand Down Expand Up @@ -139,7 +115,7 @@ Back to the code !

```swift
import UIKit
import ZetaPushSwift
import ZetaPushNetwork

class ViewController: UIViewController, ClientHelperDelegate {

Expand Down Expand Up @@ -215,7 +191,7 @@ Back to code !

```swift
import UIKit
import ZetaPushSwift
import ZetaPushNetwork

class ViewController: UIViewController, ClientHelperDelegate {

Expand Down Expand Up @@ -264,7 +240,7 @@ With ZetaPush IOs SDK, you can call a macro in a "nearly" synchronous way thanks

```swift
import UIKit
import ZetaPushSwift
import ZetaPushNetwork

class ViewController: UIViewController {

Expand Down Expand Up @@ -370,3 +346,17 @@ When you will create a MyAPIListener object, the sendMessage function will be ca
// The result will be returned to the AsyncAPIListener

```

## Contact

### Anthony GUIGUEN
* https://github.com/anthonyGuiguen
* anthony@insurlytech.com

### Steven WATREMEZ
* https://github.com/StevenWatremez
* steven@insurlytech.com

### Jérémie GOAS
* https://github.com/jgoas
* jeremie@insurlytech.com
Loading

0 comments on commit 1c22c03

Please sign in to comment.