Skip to content

Commit bdcbf78

Browse files
committed
xcode 16 support
0 parents  commit bdcbf78

File tree

317 files changed

+44804
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+44804
-0
lines changed

.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# OS X
2+
.DS_Store
3+
4+
# Xcode
5+
build/
6+
*.pbxuser
7+
!default.pbxuser
8+
*.mode1v3
9+
!default.mode1v3
10+
*.mode2v3
11+
!default.mode2v3
12+
*.perspectivev3
13+
!default.perspectivev3
14+
xcuserdata/
15+
*.xccheckout
16+
profile
17+
*.moved-aside
18+
DerivedData
19+
*.hmap
20+
*.ipa
21+
22+
# Bundler
23+
.bundle
24+
25+
# Add this line if you want to avoid checking in source code from Carthage dependencies.
26+
# Carthage/Checkouts
27+
28+
Carthage/Build
29+
30+
# We recommend against adding the Pods directory to your .gitignore. However
31+
# you should judge for yourself, the pros and cons are mentioned at:
32+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
33+
#
34+
# Note: if you ignore the Pods directory, make sure to uncomment
35+
# `pod install` in .travis.yml
36+
#
37+
# Pods/

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# references:
2+
# * https://www.objc.io/issues/6-build-tools/travis-ci/
3+
# * https://github.com/supermarin/xcpretty#usage
4+
5+
osx_image: xcode7.3
6+
language: objective-c
7+
# cache: cocoapods
8+
# podfile: Example/Podfile
9+
# before_install:
10+
# - gem install cocoapods # Since Travis is not always on latest version
11+
# - pod install --project-directory=Example
12+
script:
13+
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/Bootpay.xcworkspace -scheme Bootpay-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
14+
- pod lib lint

Bootpay.podspec

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#
2+
# Be sure to run `pod lib lint Bootpay.podspec' to ensure this is a
3+
# valid spec before submitting.
4+
#
5+
# Any lines starting with a # are optional, but their use is encouraged
6+
# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html
7+
#
8+
9+
Pod::Spec.new do |s|
10+
s.name = 'Bootpay'
11+
s.version = '4.4.6'
12+
s.summary = 'Bootpay에서 지원하는 공식 Swift 라이브러리 입니다. ios 14 이상부터 사용가능합니다.'
13+
14+
# This description is used to generate tags and improve search results.
15+
# * Think: What does it do? Why did you write it? What is the focus?
16+
# * Try to keep it short, snappy and to the point.
17+
# * Write the description between the DESC delimiters below.
18+
# * Finally, don't worry about the indent, CocoaPods strips it!
19+
20+
s.description = <<-DESC
21+
Bootpay에서 지원하는 공식 Swift 라이브러리 입니다. ios 11 이상부터 사용가능합니다.
22+
DESC
23+
24+
s.homepage = 'https://github.com/bootpay/ios_swift'
25+
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
26+
s.license = { :type => 'MIT', :file => 'LICENSE' }
27+
s.author = { 'bootpay' => 'bootpay.co.kr@gmail.com' }
28+
s.source = { :git => 'https://github.com/bootpay/ios_swift.git', :tag => s.version.to_s }
29+
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
30+
31+
s.ios.deployment_target = '14.0'
32+
# s.osx.deployment_target = '10.12'
33+
34+
s.source_files = 'Bootpay/Classes/**/*'
35+
36+
37+
s.swift_versions = ['5']
38+
39+
s.pod_target_xcconfig = {
40+
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64'
41+
}
42+
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64' }
43+
44+
# s.resource_bundles = {
45+
# 'Bootpay' => ['Bootpay/Assets/*.png']
46+
# }
47+
48+
# s.public_header_files = 'Pod/Classes/**/*.h'
49+
# s.frameworks = 'UIKit', 'MapKit'
50+
# s.dependency 'AFNetworking', '~> 2.3'
51+
52+
s.dependency 'CryptoSwift'
53+
s.dependency 'ObjectMapper'
54+
s.dependency 'NVActivityIndicatorView'
55+
end

Bootpay/Assets/.gitkeep

Whitespace-only changes.

Bootpay/Classes/.gitkeep

Whitespace-only changes.
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
//
2+
// BootpayAnalytics.swift
3+
// client_bootpay_swift
4+
//
5+
// Created by YoonTaesup on 2017. 10. 27..
6+
// Copyright © 2017년 bootpay.co.kr. All rights reserved.
7+
//
8+
import Foundation
9+
10+
//MARK: Bootpay Rest Api for Analytics
11+
@objc public class BootpayAnalytics: NSObject {
12+
@objc public static func userTrace(id: String, email: String, gender: Int,
13+
birth: String, phone: String, area: String, applicationId: String?) {
14+
if Bootpay.shared.payload?.user?.id == "" { Bootpay.shared.payload?.user?.id = id }
15+
if Bootpay.shared.payload?.user?.email == "" { Bootpay.shared.payload?.user?.email = email }
16+
if Bootpay.shared.payload?.user?.gender == 0 { Bootpay.shared.payload?.user?.gender = gender }
17+
if Bootpay.shared.payload?.user?.birth == "" { Bootpay.shared.payload?.user?.birth = birth }
18+
if Bootpay.shared.payload?.user?.phone == "" { Bootpay.shared.payload?.user?.phone = phone }
19+
if Bootpay.shared.payload?.user?.area == "" { Bootpay.shared.payload?.user?.area = area }
20+
21+
let uri = "https://analytics.bootpay.co.kr/login"
22+
var params: [String: Any]
23+
params = [
24+
"ver": Bootpay.shared.ver,
25+
"application_id": applicationId ?? Bootpay.shared.payload?.applicationId ?? "",
26+
"id": id,
27+
"email": email,
28+
"gender": "\(gender)",
29+
"birth": birth,
30+
"phone": phone,
31+
"area": area
32+
]
33+
34+
let json = Bootpay.stringify(params)
35+
do {
36+
let aesBody = try json.aesEncrypt(key: Bootpay.shared.key, iv: Bootpay.shared.iv)
37+
params = [
38+
"data": aesBody,
39+
"session_key": Bootpay.getSessionKey()
40+
]
41+
post(url: uri, params: params, isLogin: true)
42+
43+
} catch {}
44+
}
45+
46+
@objc public static func userTrace() {
47+
if(Bootpay.shared.payload?.user?.id == "") {
48+
NSLog("Bootpay Analytics Warning: postLogin() not Work!! Please check id is not empty")
49+
return
50+
}
51+
userTrace(id: Bootpay.shared.payload?.user?.id ?? "",
52+
email: Bootpay.shared.payload?.user?.email ?? "",
53+
gender: Bootpay.shared.payload?.user?.gender ?? -1,
54+
birth: Bootpay.shared.payload?.user?.birth ?? "",
55+
phone: Bootpay.shared.payload?.user?.phone ?? "",
56+
area: Bootpay.shared.payload?.user?.area ?? "",
57+
applicationId: Bootpay.shared.application_id ?? Bootpay.shared.payload?.applicationId ?? ""
58+
)
59+
}
60+
61+
@objc public static func pageTrace(_ url: String, applicationId: String? = nil, _ page_type: String? = nil, _ items: [BootpayStatItem]?) {
62+
pageTrace(url, applicationId: applicationId, items: items ?? [], page_type)
63+
}
64+
65+
@objc public static func pageTrace(_ url: String, applicationId: String? = nil, items: [BootpayStatItem], _ page_type: String? = nil) {
66+
let uri = "https://analytics.bootpay.co.kr/call"
67+
68+
let params = [
69+
"ver": Bootpay.shared.ver,
70+
"application_id": applicationId ?? Bootpay.shared.payload?.applicationId ?? "",
71+
"uuid": Bootpay.getUUID(),
72+
"referer": "",
73+
"sk": Bootpay.shared.sk,
74+
"user_id": Bootpay.shared.payload?.user?.id ?? "",
75+
"url": url,
76+
"page_type": page_type ?? "ios",
77+
"items": items.map { $0.toJSON() }
78+
] as [String : Any]
79+
80+
let json = Bootpay.stringify(params)
81+
82+
do {
83+
84+
let aesBody = try json.aesEncrypt(key: Bootpay.shared.key, iv: Bootpay.shared.iv)
85+
let params = [
86+
"data": aesBody,
87+
"session_key": Bootpay.getSessionKey()
88+
]
89+
post(url: uri, params: params, isLogin: false)
90+
91+
} catch {}
92+
}
93+
94+
@objc public static func post(url: String, params: [String: Any], isLogin: Bool) {
95+
let session = URLSession.shared
96+
let request = NSMutableURLRequest(url: NSURL(string: url)! as URL)
97+
request.httpMethod = "POST"
98+
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
99+
do{
100+
let jsonData = try JSONSerialization.data(withJSONObject: params, options: JSONSerialization.WritingOptions())
101+
102+
103+
104+
request.httpBody = jsonData
105+
let task = session.dataTask(with: request as URLRequest as URLRequest, completionHandler: {(data, response, error) in
106+
guard error == nil else { return }
107+
if isLogin == false { return }
108+
109+
guard let data = data else { return }
110+
111+
112+
do {
113+
if let json = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as? [String: Any] {
114+
115+
if let data = json["data"] as? [String : Any], let user_id = data["user_id"] as? String {
116+
Bootpay.shared.payload?.user?.id = user_id
117+
}
118+
}
119+
} catch let error {
120+
print(error.localizedDescription)
121+
}
122+
})
123+
task.resume()
124+
}catch _ {
125+
print ("something error")
126+
}
127+
}
128+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// BootpayBuildConfig.swift
3+
// SwiftUIBootpay (iOS)
4+
//
5+
// Created by Taesup Yoon on 2021/05/10.
6+
//
7+
8+
9+
#if os(macOS)
10+
public typealias BTNavigationController = NSPageController
11+
public typealias BTView = NSView
12+
public typealias BTViewController = NSViewController
13+
#elseif os(iOS)
14+
public typealias BTNavigationController = UINavigationController
15+
public typealias BTView = UIView
16+
public typealias BTViewController = UIViewController
17+
#endif
18+
19+
struct BootpayBuildConfig {
20+
static let DEBUG = false
21+
static let VERSION = "4.4.0"
22+
}

0 commit comments

Comments
 (0)