Skip to content

Commit 0ca1814

Browse files
committed
Added Readme, License and Podspec files.
1 parent 4c2f6a3 commit 0ca1814

File tree

4 files changed

+148
-0
lines changed

4 files changed

+148
-0
lines changed

ABPasscode.podspec

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Pod::Spec.new do |s|
2+
3+
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
4+
s.name = 'ABPasscode'
5+
s.version = '0.1'
6+
s.summary = ‘This is pass code view controller which can be used for getting secure entry from users.
7+
s.description = <<-DESC
8+
SimplePhotoPicker is a control that optionally takes inputs of Source Type & allow Editing. On the basis of these inputs, this control displays the action sheet if needed and displays the iOS default image editor if selected. It has simple block based implementation. No need to implement delegate methods.
9+
DESC
10+
11+
s.homepage = 'https://github.com/asifbilal786/ABPasscode'
12+
s.screenshots = 'https://raw.githubusercontent.com/asifbilal786/ABPasscode/screenshots/Screenshot_1.png'
13+
s.frameworks = 'UIKit'
14+
s.requires_arc = true
15+
16+
17+
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
18+
s.license = { :type => 'MIT', :file => 'LICENSE' }
19+
20+
21+
22+
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
23+
s.author = { 'Asif Bilal' => '[email protected]' }
24+
25+
26+
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
27+
s.platform = :ios, "8.0"
28+
29+
30+
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
31+
s.source = { :git => 'https://github.com/asifbilal786/ABPasscode.git', :tag => s.version }
32+
s.social_media_url = 'https://twitter.com/asifbilal786'
33+
34+
s.default_subspec = 'Core'
35+
36+
s.subspec 'Core' do |sp|
37+
sp.source_files = 'Pod', 'ABPasscode/Source/*.swift'
38+
end
39+
40+
41+
end

ABPasscode.xcodeproj/project.pbxproj

+12
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
295EDDDC1F2B4EC30093D79C /* PasscodeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 295EDDD81F2B4EC30093D79C /* PasscodeViewController.swift */; };
1717
295EDDDD1F2B4EC30093D79C /* PasscodeViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 295EDDD91F2B4EC30093D79C /* PasscodeViewController.xib */; };
1818
295EDDDE1F2B4EC30093D79C /* String+Additions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 295EDDDA1F2B4EC30093D79C /* String+Additions.swift */; };
19+
295EDDE21F2B51330093D79C /* ABPasscode.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 295EDDDF1F2B51330093D79C /* ABPasscode.podspec */; };
20+
295EDDE31F2B51330093D79C /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 295EDDE01F2B51330093D79C /* LICENSE */; };
21+
295EDDE41F2B51330093D79C /* README.md in Sources */ = {isa = PBXBuildFile; fileRef = 295EDDE11F2B51330093D79C /* README.md */; };
1922
/* End PBXBuildFile section */
2023

2124
/* Begin PBXFileReference section */
@@ -30,6 +33,9 @@
3033
295EDDD81F2B4EC30093D79C /* PasscodeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasscodeViewController.swift; sourceTree = "<group>"; };
3134
295EDDD91F2B4EC30093D79C /* PasscodeViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PasscodeViewController.xib; sourceTree = "<group>"; };
3235
295EDDDA1F2B4EC30093D79C /* String+Additions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Additions.swift"; sourceTree = "<group>"; };
36+
295EDDDF1F2B51330093D79C /* ABPasscode.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ABPasscode.podspec; sourceTree = "<group>"; };
37+
295EDDE01F2B51330093D79C /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
38+
295EDDE11F2B51330093D79C /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
3339
/* End PBXFileReference section */
3440

3541
/* Begin PBXFrameworksBuildPhase section */
@@ -46,6 +52,9 @@
4652
295EDDB71F2B4E4C0093D79C = {
4753
isa = PBXGroup;
4854
children = (
55+
295EDDDF1F2B51330093D79C /* ABPasscode.podspec */,
56+
295EDDE01F2B51330093D79C /* LICENSE */,
57+
295EDDE11F2B51330093D79C /* README.md */,
4958
295EDDC21F2B4E4C0093D79C /* ABPasscode */,
5059
295EDDC11F2B4E4C0093D79C /* Products */,
5160
);
@@ -151,7 +160,9 @@
151160
isa = PBXResourcesBuildPhase;
152161
buildActionMask = 2147483647;
153162
files = (
163+
295EDDE31F2B51330093D79C /* LICENSE in Resources */,
154164
295EDDDD1F2B4EC30093D79C /* PasscodeViewController.xib in Resources */,
165+
295EDDE21F2B51330093D79C /* ABPasscode.podspec in Resources */,
155166
295EDDCE1F2B4E4C0093D79C /* LaunchScreen.storyboard in Resources */,
156167
295EDDCB1F2B4E4C0093D79C /* Assets.xcassets in Resources */,
157168
295EDDC91F2B4E4C0093D79C /* Main.storyboard in Resources */,
@@ -165,6 +176,7 @@
165176
isa = PBXSourcesBuildPhase;
166177
buildActionMask = 2147483647;
167178
files = (
179+
295EDDE41F2B51330093D79C /* README.md in Sources */,
168180
295EDDDC1F2B4EC30093D79C /* PasscodeViewController.swift in Sources */,
169181
295EDDDE1F2B4EC30093D79C /* String+Additions.swift in Sources */,
170182
295EDDC61F2B4E4C0093D79C /* ViewController.swift in Sources */,

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Asif Bilal
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# PasscodeViewController
2+
A utility control with built in functionality of pass code view that takes inputs in the form secure entry from user. To get the call back methods, you must implement it’s delegate methods to get the code, when user finish entering the passcode.
3+
4+
## Demo
5+
6+
7+
### Screenshots
8+
9+
10+
## Requirements
11+
12+
- iOS 8 and above.
13+
- Xcode 8 and above
14+
15+
16+
## Adding ABPasscodeViewController to your project
17+
18+
### METHOD 1:
19+
1. Add a pod entry for `ABPasscodeViewController` to your Podfile
20+
21+
```ruby
22+
source 'https://github.com/CocoaPods/Specs.git'
23+
platform :ios, '8.0'
24+
use_frameworks!
25+
26+
pod 'ABPasscode', '~> 0.1'
27+
```
28+
29+
2. Install the pod(s) by running `pod install`.
30+
31+
### MEHTOD 2: (Source files)
32+
Alternatively, you can directly add all files under the folder Core to your project.
33+
34+
1. Download the [latest code version](https://github.com/asifbilal786/SimplePhotoPicker/archive/master.zip) or add the repository as a git submodule to your git-tracked project.
35+
2. Open your Xcode project, then drag and drop `PhotoPicker.swift` directory onto your project. Make sure to select Copy items when asked if you extracted the code archive outside of your project.
36+
37+
38+
## Usage
39+
40+
Create instance variable of PhotoPicker in your view controller and push in navigation controller.
41+
42+
```
43+
let passcodeVC = PasscodeViewController()
44+
passcodeVC.delegate = self
45+
navigationController?.pushViewController(passcodeVC, animated: true)
46+
```
47+
48+
And then call the delegate functions for different event.
49+
50+
```
51+
extension ViewController: PasscodeViewDelegate {
52+
53+
func passcodeView(_ passcodeView: PasscodeViewController, didEnteredCode code: String) {
54+
55+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
56+
57+
self.navigationController?.popViewController(animated: true)
58+
self.lblPasscode.text = "Entered Code: \(code)"
59+
}
60+
61+
}
62+
63+
func passcodeView(_ passcodeView: PasscodeViewController, didTapResendButton resendButton: UIButton) {
64+
65+
}
66+
67+
}
68+
```
69+
70+
See example projects for detail.
71+
72+
## License
73+
This code is distributed under the terms and conditions of the [MIT license](LICENSE).
74+

0 commit comments

Comments
 (0)