Gem alternatives and similar libraries
Based on the "Networking" category.
Alternatively, view Gem alternatives based on common mentions on social networks and blogs.
-
AFNetworking
A delightful networking framework for iOS, macOS, watchOS, and tvOS. -
CocoaAsyncSocket
Asynchronous socket networking library for Mac and iOS -
RestKit
RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X -
Reachability.swift
Replacement for Apple's Reachability re-written in Swift with closures -
YTKNetwork
YTKNetwork is a high level request util based on AFNetworking. -
ASIHTTPRequest
Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone -
apollo-ios
๐ฑ ย A strongly-typed, caching GraphQL client for iOS, written in Swift. -
swift-protobuf
Plugin and runtime library for using protobuf with Swift -
RealReachability
We need to observe the REAL reachability of network. That's what RealReachability do. -
Netfox
A lightweight, one line setup, iOS / OSX network debugging library! ๐ฆ -
MonkeyKing
MonkeyKing helps you to post messages to Chinese Social Networks. -
SwiftHTTP
Thin wrapper around NSURLSession in swift. Simplifies HTTP requests. -
APIKit
Type-safe networking abstraction layer that associates request type with response type. -
ResponseDetective
Sherlock Holmes of the networking layer. :male_detective: -
Networking
Easy HTTP Networking in Swift a NSURLSession wrapper with image caching support -
XMNetworking
A lightweight but powerful network library with simplified and expressive syntax based on AFNetworking. -
Pitaya
๐ A Swift HTTP / HTTPS networking library just incidentally execute on machines -
Digger
Digger is a lightweight download framework that requires only one line of code to complete the file download task -
SOAPEngine
This generic SOAP client allows you to access web services using a your iOS app, Mac OS X app and AppleTV app. -
TWRDownloadManager
A modern download manager based on NSURLSession to deal with asynchronous downloading, management and persistence of multiple files. -
Restofire
Restofire is a protocol oriented networking client for Alamofire -
ws โ๏ธ
โ ๏ธ Deprecated - (in favour of Networking) :cloud: Elegantly connect to a JSON api. (Alamofire + Promises + JSON Parsing) -
EVURLCache
a NSURLCache subclass for handling all web requests that use NSURLRequest -
AFNetworking+RetryPolicy
Nice category that adds the ability to set the retry interval, retry count and progressiveness. -
MultiPeer
๐ฑ๐ฒ A wrapper for the MultipeerConnectivity framework for automatic offline data transmission between devices -
AFNetworking-Synchronous
Synchronous requests for AFNetworking 1.x, 2.x, and 3.x
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Gem or a related project?
README
Gem
A light weight network library with automated model parser for rapid development.
Managing all http request with automated model parser calls in app with closure
Requirements
- iOS 10.0+
- Swift 4.1+
- Xcode 9.2+
Installation
CocoaPods
Task is available through CocoaPods. To install it, simply add the following line to your Podfile:
use_frameworks!
pod "Gem"
or
use_frameworks!
pod 'Gem', git: 'https://github.com/Albinzr/Gem', :tag => '1.0.3'
Carthage
To integrate Task into your Xcode project using Carthage, specify it in your Cartfile:
github "Albinzr/Gem"
Usage & Requirement
- All model class should have Codable protocol
Naming for variable should be as follow
//json { name:"Albin CR", published_on:123455, Time:"23.10" } // model class class Details:Codable{ var name:String? // same variable as in json var publishedOn:Int? // incase of snake casing use camel casing of the same name var Time:String // same variable as in json }
Example
Get Request
//model
class User:Codable{
var id:Int?
var name:String?
var username:String?
var email:String?
var address:Address?
var phone:String?
var website:String?
var company:Company?
}
Gem.request(url: "https://jsonplaceholder.typicode.com/uses", method: Methods.get, model:User.self,
Success: { (data, response) in
// success block
print(data,response)
}) { (error, response) in
//error block
print(error,response)
}
response - contain all details related to network call like status code etc..
Post Request
class User:Codable{
var id:Int?
var name:String?
var username:String?
var email:String?
var address:Address?
var phone:String?
var website:String?
var company:Company?
}
let param: [String : Any] = [
"id":12324,
"name":"Albin CR",
"username":"Albi",
"email":"[email protected]",
"phone":"8907575123",
"website":"www.albin.in",
"company":[
"name":"Quin",
"catchPhrase":"Time to change",
"bs":"Pika",
]
]
Gem.request(url: "https://jsonplaceholder.typicode.com/posts", method: Methods.post,parameter:param,header:nil, model:User.self, Success: { (data, response) in
print(data,response ?? "")
print("success")
}) { (error, response) in
print(error ?? "",response!.statusCode)
}
ImageUpload
class ImageUpload:Codable{
var link:String?
var width:Float?
var height:Float?
var id:String?
}
let image:UIImage = UIImage(named: "scan") // or image url
let imageData:Data = UIImagePNGRepresentation(image)!
let base64Data = imageData.base64EncodedString()
let param:[String:Any] = [
"image":base64Data
]
let header:[String:String] = [
"Authorization":"Client-ID {{your client key}}",//replace your client key
"Content-type":"multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'"
]
Gem.request(url: "https://api.imgur.com/3/image", method: Methods.post,parameter:param,header:header, model:ImageUpload.self, Success: { (data, response) in
print(data,response ?? "")
print("success")
}) { (error, response) in
print(error ?? "",response!.statusCode)
}
PR/request/suggestions are always welcome
*Note that all licence references and agreements mentioned in the Gem README section above
are relevant to that project's source code only.