This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// guard.swift | |
// Created by Anas Zaheer on 12/05/17. | |
// Copyright © 2017 nfnlabs. All rights reserved. | |
// | |
import Foundation | |
//This is the most basic style to make sure a value exists and that meets a condition | |
func manualCheck(x: Int?) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Access_iCloudDrive_files: UIViewController, UIDocumentPickerDelegate{ | |
func show_iCloudDrive_All_Files(){ | |
let documentPicker = UIDocumentPickerViewController(documentTypes: ["Public.data"], in: .import) | |
documentPicker.delegate = self | |
documentPicker.modalPresentationStyle = .formSheet | |
self.present(documentPicker, animated: true, completion: nil) | |
} | |
//MARK: UIDocumentPickerDelegate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RemoveDuplicateFromArray: NSObject { | |
//MARK: -Remove duplicates from 'String' Array without any sorting | |
func removeDuplicates(array: [String]) -> [String] { | |
var encountered = Set<String>() | |
var result: [String] = [] | |
for value in array { | |
if encountered.contains(value) { | |
// Do not add a duplicate element. | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CoreDataStack.swift | |
// Created by Anas Zaheer on 24/09/17. | |
// Copyright © 2017 nfnlabs. All rights reserved. | |
// | |
import UIKit | |
import CoreData |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by Anas Zaheer on 31/10/17. | |
// Copyright © 2017 nfnlabs. All rights reserved. | |
import UIKit | |
import StoreKit | |
enum IAPs:string{ | |
case IAP_Plan = "com.company.app.iap" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Created by Anas Zaheer on 25/09/17. | |
// Copyright © 2017 nfnlabs. All rights reserved. | |
import UIKit | |
import Foundation | |
import SwiftyStoreKit | |
import StoreKit | |
enum IAP_Secret:String { | |
case sharedSecret = "be5xxxxxxxxxxxxxx82cdre" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo gem install cocoapods | |
$ pod init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pod 'AccountKit' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pod install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<plist version="1.0"> | |
<dict> | |
... | |
<key>FacebookAppID</key> | |
<string>{your-app-id}</string> | |
<key>AccountKitClientToken</key> | |
<string>{your-account-kit-client-token}</string> | |
<key>CFBundleURLTypes</key> | |
<array> | |
<dict> |
OlderNewer