Skip to content
This repository was archived by the owner on Feb 4, 2020. It is now read-only.

Commit 68b53bf

Browse files
HenrikHenrik
authored andcommitted
Make classes public
1 parent 05138a1 commit 68b53bf

12 files changed

+54
-31
lines changed

PCA-iOS-Lib.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
AF967B031F02A5D5004EF605 /* PCALookupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PCALookupView.xib; sourceTree = "<group>"; };
3535
AF967B051F02A5F8004EF605 /* PCALookupViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PCALookupViewController.swift; sourceTree = "<group>"; };
3636
AF967B071F02A62F004EF605 /* Reachability.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Reachability.swift; sourceTree = "<group>"; };
37+
AF967B091F02F317004EF605 /* PCABridgingHeader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PCABridgingHeader.h; sourceTree = "<group>"; };
3738
AFBE01EF1F01911800354C0C /* FindResponseItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FindResponseItem.swift; sourceTree = "<group>"; };
3839
C47CC6020658BCE0F9DEB520 /* Pods_PCA_iOS_Lib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PCA_iOS_Lib.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3940
/* End PBXFileReference section */
@@ -85,6 +86,7 @@
8586
AF6B36BC1EFD93140016207D /* Info.plist */,
8687
AF967B051F02A5F8004EF605 /* PCALookupViewController.swift */,
8788
AF967B071F02A62F004EF605 /* Reachability.swift */,
89+
AF967B091F02F317004EF605 /* PCABridgingHeader.h */,
8890
);
8991
path = "PCA-iOS-Lib";
9092
sourceTree = "<group>";
@@ -354,6 +356,7 @@
354356
DYLIB_INSTALL_NAME_BASE = "@rpath";
355357
INFOPLIST_FILE = "PCA-iOS-Lib/Info.plist";
356358
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
359+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
357360
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
358361
PRODUCT_BUNDLE_IDENTIFIER = "com.pcapredict.captureplus.PCA-iOS-Lib";
359362
PRODUCT_NAME = PCAiOSLib;
@@ -375,6 +378,7 @@
375378
DYLIB_INSTALL_NAME_BASE = "@rpath";
376379
INFOPLIST_FILE = "PCA-iOS-Lib/Info.plist";
377380
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
381+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
378382
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
379383
PRODUCT_BUNDLE_IDENTIFIER = "com.pcapredict.captureplus.PCA-iOS-Lib";
380384
PRODUCT_NAME = PCAiOSLib;

PCA-iOS-Lib/FindResponse.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ import Alamofire
1111
import AlamofireObjectMapper
1212
import ObjectMapper
1313

14-
class FindResponse: Mappable {
15-
var Items: [FindResponseItem]?;
14+
public class FindResponse: Mappable {
15+
public var Items: [FindResponseItem]?;
1616

17-
required init(map: Map) {
17+
required public init(map: Map) {
1818

1919
}
2020

2121
init(){
2222
self.Items = [];
2323
}
2424

25-
func mapping(map: Map) {
25+
public func mapping(map: Map) {
2626
Items <- map["Items"];
2727
}
2828

PCA-iOS-Lib/FindResponseItem.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import Alamofire
1111
import AlamofireObjectMapper
1212
import ObjectMapper
1313

14-
class FindResponseItem: NSObject, Mappable {
15-
var
14+
public class FindResponseItem: NSObject, Mappable {
15+
public var
1616
Id: String?,
1717
ItemType: String?,
1818
Text: String?,
@@ -22,7 +22,7 @@ class FindResponseItem: NSObject, Mappable {
2222
Cause: String?,
2323
Resolution: String?;
2424

25-
required init(map: Map) {
25+
required public init(map: Map) {
2626

2727
}
2828

@@ -34,7 +34,7 @@ class FindResponseItem: NSObject, Mappable {
3434
self.Description = "";
3535
}
3636

37-
func mapping(map: Map) {
37+
public func mapping(map: Map) {
3838
Id <- map["Id"];
3939
ItemType <- map["Type"];
4040
Text <- map["Text"];

PCA-iOS-Lib/PCA-iOS-Lib.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
#import <UIKit/UIKit.h>
10+
#import <PCA_iOS_Lib/PCABridgingHeader.h>
1011

1112
//! Project version number for PCA-iOS-Lib.
1213
FOUNDATION_EXPORT double PCA_iOS_LibVersionNumber;

PCA-iOS-Lib/PCABridgingHeader.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// PCABridgingHeader.h
3+
// PCA-iOS-Lib
4+
//
5+
// Created by Henrik on 6/27/17.
6+
// Copyright © 2017 Henrik. All rights reserved.
7+
//
8+
9+
#ifndef PCABridgingHeader_h
10+
#define PCABridgingHeader_h
11+
#import "PCALookupViewController"
12+
13+
#endif /* PCABridgingHeader_h */

PCA-iOS-Lib/PCALookupViewController.swift

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import UIKit
22
import Alamofire
33
import CoreLocation
44

5-
class PCALookupViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
5+
public class PCALookupViewController: UIViewController, UITableViewDataSource, UITableViewDelegate {
66

7-
init(licenseKey: String) {
7+
public init(licenseKey: String) {
88
self.key = licenseKey;
99
super.init(nibName: "PCALookupView", bundle: nil)
1010
}
@@ -89,15 +89,15 @@ class PCALookupViewController: UIViewController, UITableViewDataSource, UITableV
8989
}
9090

9191

92-
required init?(coder aDecoder: NSCoder) {
92+
required public init?(coder aDecoder: NSCoder) {
9393
fatalError("init(coder:) has not been implemented")
9494
}
9595

9696

9797
var manager: Alamofire.SessionManager? = nil;
9898
let locationManager = CLLocationManager()
9999

100-
override func viewDidLoad() {
100+
override public func viewDidLoad() {
101101
super.viewDidLoad()
102102

103103
if let bgColor = self.addressDelegate?.pca_backgroundColor?() {
@@ -119,16 +119,15 @@ class PCALookupViewController: UIViewController, UITableViewDataSource, UITableV
119119
searchField.becomeFirstResponder()
120120
}
121121

122-
var addressDelegate:PCALookupViewDelegate?
123-
122+
public var addressDelegate:PCALookupViewDelegate?
124123

125124

126125
var currentResponse: FindResponse? = nil;
127126
var currentItem: FindResponseItem? = nil;
128127
var lastText: String? = nil;
129128

130129

131-
func isValid() -> Bool{
130+
public func isValid() -> Bool{
132131
//TODO -- Check for errors - no credit, bad key, no network connection etc
133132

134133
if !Reachability.isInternetAvailable() {
@@ -220,17 +219,17 @@ class PCALookupViewController: UIViewController, UITableViewDataSource, UITableV
220219

221220
}
222221

223-
override func didReceiveMemoryWarning() {
222+
override public func didReceiveMemoryWarning() {
224223
super.didReceiveMemoryWarning()
225224
// Dispose of any resources that can be recreated.
226225
}
227226

228227

229-
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
228+
public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
230229
return self.currentResponse?.Items?.count ?? 0;
231230
}
232231

233-
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
232+
public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
234233

235234
if let currentItem = self.currentResponse?.Items?[indexPath.item] {
236235

@@ -254,7 +253,7 @@ class PCALookupViewController: UIViewController, UITableViewDataSource, UITableV
254253
return UITableViewCell(style: .subtitle, reuseIdentifier: "");
255254
}
256255

257-
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
256+
public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
258257
currentItem = self.currentResponse?.Items?[indexPath.item];
259258
if(currentItem?.ItemType == "Address"){
260259
MakeRetrieveRequest(id: (currentItem?.Id)!)

PCA-iOS-Lib/Reachability.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22
import SystemConfiguration
33

44
public class Reachability {
5-
static func isInternetAvailable() -> Bool
5+
public static func isInternetAvailable() -> Bool
66
{
77
var zeroAddress = sockaddr_in()
88
zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))

PCA-iOS-Lib/ResponseError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import Foundation
1010

11-
class ResponseError: NSObject{
12-
var
11+
public class ResponseError: NSObject{
12+
public var
1313
Error: String?,
1414
Description: String?,
1515
Cause: String?,

PCA-iOS-Lib/RetrieveResponse.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ import Alamofire
1111
import AlamofireObjectMapper
1212
import ObjectMapper
1313

14-
class RetrieveResponse: Mappable {
15-
var Items: [RetrieveResponseItem]?;
14+
public class RetrieveResponse: Mappable {
15+
public var Items: [RetrieveResponseItem]?;
1616

17-
required init(map: Map) {
17+
required public init(map: Map) {
1818

1919
}
2020

2121
init(){
2222
self.Items = [];
2323
}
2424

25-
func mapping(map: Map) {
25+
public func mapping(map: Map) {
2626
Items <- map["Items"];
2727
}
2828

PCA-iOS-Lib/RetrieveResponseDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Foundation
1010
import UIKit
1111

1212

13-
@objc protocol PCALookupViewDelegate: class {
13+
@objc public protocol PCALookupViewDelegate: class {
1414
func didRecieveAddress(address: RetrieveResponseItem)
1515
@objc optional func pca_didRecieveError(error: ResponseError);
1616
@objc optional func pca_cellForFindResponse(findResponse: FindResponseItem) -> UITableViewCell

0 commit comments

Comments
 (0)