Skip to content

Instantly share code, notes, and snippets.

View EndLess728's full-sized avatar
💭
iF U Can DreaM iT , YoU Can Do iT

Mantu Kumar EndLess728

💭
iF U Can DreaM iT , YoU Can Do iT
  • Panchkula,India
View GitHub Profile
internal let DEFAULT_MIME_TYPE = "application/octet-stream"
internal let mimeTypes = [
"html": "text/html",
"htm": "text/html",
"shtml": "text/html",
"css": "text/css",
"xml": "text/xml",
"gif": "image/gif",
"jpeg": "image/jpeg",
@EndLess728
EndLess728 / IAPHelper.txt
Created October 17, 2019 09:33 — forked from mitchellporter/IAPHelper.txt
In App Purchase in Swift, with Receipt Validation
import UIKit
import StoreKit
//MARK: SKProductsRequestDelegate
extension IAPHelpers : SKProductsRequestDelegate
{
func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse)
{
@EndLess728
EndLess728 / UIColor+Hex.swift
Created September 10, 2019 11:47 — forked from haversnail/UIColor+Hex.swift
A Swift UIColor extension adding hex color code support.
//
// UIColor+Hex.swift
// Gist
//
// Created by Alexander Havermale on 5/26/17.
// Copyright © 2017 Alex Havermale. All rights reserved.
//
import UIKit
@EndLess728
EndLess728 / UIColor+Hex.swift
Created September 10, 2019 11:47 — forked from haversnail/UIColor+Hex.swift
A Swift UIColor extension adding hex color code support.
//
// UIColor+Hex.swift
// Gist
//
// Created by Alexander Havermale on 5/26/17.
// Copyright © 2017 Alex Havermale. All rights reserved.
//
import UIKit
@EndLess728
EndLess728 / jsonString method for Dictionary
Created July 16, 2019 07:56 — forked from stevenojo/jsonString method for Dictionary
Convert Dictionary to a JSON string in swift
extension Dictionary {
func jsonString() -> NSString? {
let jsonData = try? JSONSerialization.data(withJSONObject: self, options: [])
guard jsonData != nil else {return nil}
let jsonString = String(data: jsonData!, encoding: .utf8)
guard jsonString != nil else {return nil}
return jsonString! as NSString
}
}