onurhuseyincantay / Hover

Licence: mit
Async network layer with Combine

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Hover

Restofire
Restofire is a protocol oriented networking client for Alamofire
Stars: ✭ 377 (+273.27%)
Mutual labels:  networking, moya
Swifthub
GitHub iOS client in RxSwift and MVVM-C clean architecture
Stars: ✭ 2,330 (+2206.93%)
Mutual labels:  networking, moya
Netclient Ios
Versatile HTTP Networking in Swift
Stars: ✭ 117 (+15.84%)
Mutual labels:  networking, moya
Networking
Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support
Stars: ✭ 1,269 (+1156.44%)
Mutual labels:  networking, moya
Fast Path Lede Openwrt
PLEASE GO TO NEW OPENWRT TRUNK BASED SFE FIRMWARE ->
Stars: ✭ 96 (-4.95%)
Mutual labels:  networking
Computer Science Resources
A list of resources in different fields of Computer Science (multiple languages)
Stars: ✭ 1,316 (+1202.97%)
Mutual labels:  networking
Lda Topic Modeling
A PureScript, browser-based implementation of LDA topic modeling.
Stars: ✭ 91 (-9.9%)
Mutual labels:  reactive-programming
Zlb
This is the repository of ZEVENET Load Balancer (next generation of Zen Load Balancer)
Stars: ✭ 90 (-10.89%)
Mutual labels:  networking
Gossip Python
Implementation of the gossip protocol
Stars: ✭ 100 (-0.99%)
Mutual labels:  networking
Kitura Net
Kitura networking
Stars: ✭ 98 (-2.97%)
Mutual labels:  networking
Forgenetworkingremastered
In short, Forge Networking is a free and open source multiplayer game (multi-user) networking system that has a very good integration with the Unity game engine. You wanna make a multiplayer game or real time multi-user application? This is the library for you.
Stars: ✭ 1,338 (+1224.75%)
Mutual labels:  networking
Pcapplusplus
PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use. It provides C++ wrappers for the most popular packet processing engines such as libpcap, WinPcap, DPDK and PF_RING.
Stars: ✭ 1,322 (+1208.91%)
Mutual labels:  networking
Rerxswift
ReRxSwift: RxSwift bindings for ReSwift
Stars: ✭ 97 (-3.96%)
Mutual labels:  reactive-programming
Gns3 Gui
GNS3 Graphical Network Simulator
Stars: ✭ 1,307 (+1194.06%)
Mutual labels:  networking
Proxy
C++ TCP Proxy Server
Stars: ✭ 98 (-2.97%)
Mutual labels:  networking
Stnettaskqueue
STNetTaskQueue is a networking queue library for iOS and OS X. It's abstract and can be implemented in different protocols.
Stars: ✭ 90 (-10.89%)
Mutual labels:  networking
React Combinators
[NOT MAINTAINED] Seamless combination of React and reactive programming
Stars: ✭ 95 (-5.94%)
Mutual labels:  reactive-programming
Entitas Sync Framework
Networking framework for Entitas ECS. Targeted at turnbased games or other slow-paced genres.
Stars: ✭ 98 (-2.97%)
Mutual labels:  networking
Udp Ue4
Convenience UDP wrapper for Unreal Engine 4
Stars: ✭ 94 (-6.93%)
Mutual labels:  networking
Nestedtypes
BackboneJS compatibility layer for Type-R data framework.
Stars: ✭ 94 (-6.93%)
Mutual labels:  reactive-programming

Version 1.0.7

apmCocoaPods compatible Carthage compatible Swift Package Manager compatible Swift

Currently Available

Platform Version
iOS 12.0
tvOS 10.0
macOS 10.15
watchOS 3.0
macCatalyst 13.0

Hover is a Network layer which uses Apple's new framework Combine and provides async network calls with different kind of request functions.

Why and When to Use

The main benefit to use Hover is to abstract the networking layer as much as possible and remove redunant code from your projects as we know Apple announced a new framework called Combine the main goal is to provide a declarative Swift API for processing values over time. These values can represent many kinds of asynchronous events, so networking calls are the most important async events, which actually needs to have a support for Combine to prevent and integrate Apple's native framework. Why you shouldnt use is when you dont have that much networking calls and also not so complex data flows to keep track on which means actually that you dont have states for the UI then dont use it. :)

Cocoapods Installation

target 'MyApp' do
  pod 'HoverKitSDK', "~> 1.0.7"
end

Carthage Installation

github "onurhuseyincantay/Hover" ~> 1.0.7

if you are using Xcode 12 there are additional steps to take:

  1. create a carthage.sh file
  2. add the following code
set -euo pipefail

xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT

# For Xcode 12 (beta 3+) make sure EXCLUDED_ARCHS is set to arm architectures otherwise
# the build will fail on lipo due to duplicate architectures.
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig

export XCODE_XCCONFIG_FILE="$xcconfig"
carthage build "[email protected]"

  1. use chmod +x carthage.sh to make it executable
  2. rather than running carthage run ./carthage.sh { any carthage command you need }

Swift Package Manager Installation

Package branch

Sample Usage

Provide Target

 enum UserTarget {
  case login(email: String, password: String) 
 }
 
 extension UserTarget: NetworkTarget { 
    var path: String {
        switch self {
        ...
    }
    var providerType: AuthProviderType {
        ...
    }
    
    var baseURL: URL {
        ...
    }
    
    var methodType: MethodType {
        switch self {
          ...
        }
    }
    
    var contentType: ContentType? {
        switch self {
         ...
        }
    }
    
    var workType: WorkType {
        switch self {
          ...
        }
    }
    
    var headers: [String : String]? {
        ...
    }
 }

Request With Publisher

let provider = Hover()
let publisher = provider.request(
            with: UserTarget.login(email: "[email protected]", password: "123456"),
            scheduler: DispatchQueue.main,
            class: UserModel.self
        )
...
publisher.sink({ ... })

Request With Subscriber

let provider = Hover()
let userSubscriber = UserSubscriber()
provider.request(with: UserTarget.login(email: "[email protected]", password: "123456"), class: UserModel.self, subscriber: userSubscriber)

Tested with JsonPlaceholder Inspired By Moya Developed with 🧡

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].