Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix contact access message, Add cocoapods init #187

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ xcuserdata/
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace
Expand Down Expand Up @@ -111,7 +111,7 @@ playground.xcworkspace
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace
Expand Down
107 changes: 69 additions & 38 deletions Bodabi/Bodabi.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

101 changes: 101 additions & 0 deletions Bodabi/Bodabi.xcodeproj/xcshareddata/xcschemes/Bodabi.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4998126921F9D7B4000DB7B2"
BuildableName = "Bodabi.app"
BlueprintName = "Bodabi"
ReferencedContainer = "container:Bodabi.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "49C86BFE221E7C3700D63455"
BuildableName = "BodabiTests.xctest"
BlueprintName = "BodabiTests"
ReferencedContainer = "container:Bodabi.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4998126921F9D7B4000DB7B2"
BuildableName = "Bodabi.app"
BlueprintName = "Bodabi"
ReferencedContainer = "container:Bodabi.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4998126921F9D7B4000DB7B2"
BuildableName = "Bodabi.app"
BlueprintName = "Bodabi"
ReferencedContainer = "container:Bodabi.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "4998126921F9D7B4000DB7B2"
BuildableName = "Bodabi.app"
BlueprintName = "Bodabi"
ReferencedContainer = "container:Bodabi.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
10 changes: 10 additions & 0 deletions Bodabi/Bodabi.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
10 changes: 7 additions & 3 deletions Bodabi/Bodabi/Models/DefaultHolidayType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ enum DefaultHolidayType: CaseIterable {
case enterance
case graduation
case babyBorn
case etcAnniversary

var holidayImage: UIImage? {
var holidayImage: UIImage {
switch self {
case .wedding: return #imageLiteral(resourceName: "wedding")
case .birthday: return #imageLiteral(resourceName: "birthday")
Expand Down Expand Up @@ -49,6 +50,7 @@ enum DefaultHolidayType: CaseIterable {
case .enterance: return "입학"
case .graduation: return "졸업"
case .babyBorn: return "출산"
default: return "기타 기념일"
}
}

Expand All @@ -61,15 +63,17 @@ enum DefaultHolidayType: CaseIterable {
case .enterance: return #colorLiteral(red: 0.8807150722, green: 0.3545673192, blue: 0.4221659899, alpha: 1)
case .graduation: return #colorLiteral(red: 0.8719369769, green: 0.6207509637, blue: 0.6524723172, alpha: 1)
case .babyBorn: return #colorLiteral(red: 0.5707006454, green: 0.6276458502, blue: 0.7518854737, alpha: 1)
default: return #colorLiteral(red: 0.961987555, green: 0.7720394135, blue: 0.4948675036, alpha: 1)
}
}

static func parse(with holiday: String) -> DefaultHolidayType? {
static func parse(with holiday: String?) -> DefaultHolidayType {
guard let holiday = holiday else { return DefaultHolidayType.etcAnniversary }
for type in DefaultHolidayType.allCases {
if holiday.contains(search: type.title) {
return type
}
}
return nil
return DefaultHolidayType.etcAnniversary
}
}
19 changes: 3 additions & 16 deletions Bodabi/Bodabi/Services/InputService/InputManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ struct InputManager {
}

static func write(context: NSManagedObjectContext, entryRoute: EntryRoute, data: InputData) {
// FIXME: - Data dummy image
let imageOfHoliday: [(holiday: String, image: UIImage)] = [
(holiday: "생일", image: #imageLiteral(resourceName: "birthday")),
(holiday: "출산", image: #imageLiteral(resourceName: "babyborn")),
(holiday: "결혼", image: #imageLiteral(resourceName: "wedding")),
(holiday: "장례", image: #imageLiteral(resourceName: "funeral"))
]

switch entryRoute {
case .addHolidayAtHome:
let holiday: Holiday = Holiday(context: context)
Expand All @@ -48,14 +40,9 @@ struct InputManager {
holiday.date = data.date
holiday.createdDate = Date()

imageOfHoliday.forEach {
if holiday.title?.contains($0.holiday) ?? true {
guard let image = $0.image
.resize(scale: 0.1)?.jpegData(compressionQuality: 1.0) else { return }
holiday.image = image
return
}
}
holiday.image = DefaultHolidayType.parse(with: holiday.title).holidayImage
.resize(scale: 0.1)?.jpegData(compressionQuality: 1.0)

case .addUpcomingEventAtHome:
let event: Event = Event(context: context)
let friend = getFriend(context: context, data: data)
Expand Down
6 changes: 4 additions & 2 deletions Bodabi/Bodabi/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>4</string>
<string>6</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fb</string>
Expand All @@ -36,7 +36,9 @@
<key>NSCameraUsageDescription</key>
<string>경조사 대표 이미지를 촬영할 수 있습니다.</string>
<key>NSContactsUsageDescription</key>
<string>사용자의 연락처에 접근하여 보다비에 친구를 추가할 수 있습니다. 선물을 주고 받은 친구를 손쉽게 추가해보세요.</string>
<string>사용자의 연락처를 받아서 빠르게 경조사 내역을 추가합니다. 또한 연락처를 통해 같은 이름의 친구를 식별할 수 있습니다.
연락처 정보는 외부에 공개되지 않으며 개인공간에만 저장됩니다. 권한 설정은 설정탭을 통하여 나중에 다시 설정할 수 있습니다.
(설정&gt;개인정보처리방침 확인 가능)</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>경조사 대표 이미지를 바꿀 수 있습니다.</string>
<key>UILaunchStoryboardName</key>
Expand Down
70 changes: 0 additions & 70 deletions Bodabi/Bodabi/Views/Calendar/CalendarDayViewCell.swift

This file was deleted.

59 changes: 0 additions & 59 deletions Bodabi/Bodabi/Views/Calendar/CalendarDayViewCell.xib

This file was deleted.

Loading