-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from boostcampwm-2022/refactor_hideP8Key
[전체] Auth Key Plist에 넣기
- Loading branch information
Showing
5 changed files
with
47 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>AuthKey</key> | ||
<string>-----BEGIN PRIVATE KEY----- | ||
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgBu59KBTVAYoS7A9A | ||
SDr09NemKkFxu44brOzjfeo7YaGgCgYIKoZIzj0DAQehRANCAAS8nCVjRqbbQkU6 | ||
w3jDMFAzLKYlZzWYN/QOS/hANnIOic1GMPKC2N98Fz4EDO52iWLsyl5pq7O3Wh2O | ||
79TSHEtE | ||
-----END PRIVATE KEY-----</string> | ||
</dict> | ||
</plist> |
20 changes: 20 additions & 0 deletions
20
SpaceCapsule/SpaceCapsule/Extensions/SpaceCapsule+Bundle.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// SpaceCapsule+Bundle.swift | ||
// SpaceCapsule | ||
// | ||
// Created by young june Park on 2022/12/24. | ||
// | ||
|
||
import Foundation | ||
|
||
extension Bundle { | ||
var authKey: String? { | ||
guard let file = path(forResource: "AuthKey", ofType: "plist"), | ||
let resource = try? NSDictionary(contentsOf: NSURL(fileURLWithPath: file) as URL, error: ()), | ||
let key = resource["AuthKey"] as? String else { | ||
return nil | ||
} | ||
|
||
return key | ||
} | ||
} |
This file contains 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
This file contains 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