Skip to content

Commit ff32a79

Browse files
authored
Merge pull request #30 from HambugDev/feature/add_appicon
[Chore] 앱 아이콘 추가
2 parents 4acb5fa + 9db71c6 commit ff32a79

File tree

35 files changed

+1018
-278
lines changed

35 files changed

+1018
-278
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
//
2+
// AsyncThumbnailImage.swift
3+
// Common
4+
//
5+
// Created by 강동영 on 1/12/26.
6+
//
7+
8+
import SwiftUI
9+
10+
public struct AsyncThumbnailImage: View {
11+
private let imageURL: String?
12+
private let width: CGFloat?
13+
private let height: CGFloat?
14+
private let cornerRadius: CGFloat
15+
16+
public init(
17+
imageURL: String?,
18+
width: CGFloat? = nil,
19+
height: CGFloat? = nil,
20+
cornerRadius: CGFloat = 8
21+
) {
22+
self.imageURL = imageURL
23+
self.width = width
24+
self.height = height
25+
self.cornerRadius = cornerRadius
26+
}
27+
28+
public var body: some View {
29+
content
30+
.frame(width: width, height: height)
31+
.clipShape(RoundedRectangle(cornerRadius: cornerRadius))
32+
}
33+
34+
@ViewBuilder
35+
private var content: some View {
36+
if let imageURL = imageURL,
37+
!imageURL.isEmpty,
38+
let url = URL(string: imageURL) {
39+
AsyncImage(url: url) { phase in
40+
if case .success(let image) = phase {
41+
image
42+
.resizable()
43+
.aspectRatio(contentMode: .fill)
44+
}
45+
}
46+
}
47+
}
48+
}

Community/Package.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ let package = Package(
2828
name: Config.name,
2929
targets: Config.allCases.map(\.name)
3030
),
31+
.library(
32+
name: "CommunityDomain",
33+
targets: ["CommunityDomain"]
34+
),
3135
],
3236
dependencies: [
3337
.package(name: "DI", path: "../DI"),

Community/Sources/DI/CommunityDIContainer.swift

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,6 @@ struct CommunityWriteAssembly: Assembly {
3434
struct CommunityAssembly: Assembly {
3535

3636
func assemble(container: GenericDIContainer) {
37-
// NetworkService registration (only for mock mode)
38-
// In normal mode, NetworkService comes from parent container
39-
// if isMock {
40-
// container.register(NetworkServiceInterface.self) { _ in
41-
// let config = URLSessionConfiguration.ephemeral
42-
// config.protocolClasses = [CommunityURLProtocol.self]
43-
// setupURLProtocol()
44-
// return NetworkServiceImpl(configuration: config)
45-
// }
46-
// }
47-
4837
// APIClient registration
4938
container.register(CommunityAPIClientInterface.self) { resolver in
5039
// if self.isMock {

Community/Sources/Presentation/Assets.xcassets/community_comment.imageset/Contents.json renamed to Community/Sources/Presentation/Assets.xcassets/community_comment_fill.imageset/Contents.json

File renamed without changes.

Community/Sources/Presentation/Assets.xcassets/community_comment.imageset/community_comment.png renamed to Community/Sources/Presentation/Assets.xcassets/community_comment_fill.imageset/community_comment.png

File renamed without changes.

Community/Sources/Presentation/Community/CommunityView.swift

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ fileprivate struct CommunityPostListCard: View {
353353
.pretendard(.caption(.base))
354354
.foregroundColor(Color.textG600)
355355

356-
Image(.communityComment)
356+
Image(.communityCommentFill)
357357
.resizable()
358358
.frame(width: 12, height: 12)
359359

@@ -419,7 +419,7 @@ fileprivate struct CommunityPostFeedCard: View {
419419
.pretendard(.caption(.base))
420420
.foregroundColor(Color.textG600)
421421

422-
Image(.communityComment)
422+
Image(.communityCommentFill)
423423
.resizable()
424424
.frame(width: 12, height: 12)
425425

@@ -443,42 +443,4 @@ fileprivate struct CommunityPostFeedCard: View {
443443
}
444444
}
445445

446-
struct AsyncThumbnailImage: View {
447-
private let imageURL: String?
448-
private let width: CGFloat?
449-
private let height: CGFloat?
450-
private let cornerRadius: CGFloat
451-
452-
init(
453-
imageURL: String?,
454-
width: CGFloat? = nil,
455-
height: CGFloat? = nil,
456-
cornerRadius: CGFloat = 8
457-
) {
458-
self.imageURL = imageURL
459-
self.width = width
460-
self.height = height
461-
self.cornerRadius = cornerRadius
462-
}
463-
464-
var body: some View {
465-
content
466-
.frame(width: width, height: height)
467-
.clipShape(RoundedRectangle(cornerRadius: cornerRadius))
468-
}
469-
470-
@ViewBuilder
471-
private var content: some View {
472-
if let imageURL = imageURL,
473-
!imageURL.isEmpty,
474-
let url = URL(string: imageURL) {
475-
AsyncImage(url: url) { phase in
476-
if case .success(let image) = phase {
477-
image
478-
.resizable()
479-
.aspectRatio(contentMode: .fill)
480-
}
481-
}
482-
}
483-
}
484-
}
446+

Community/Sources/Presentation/Detail/CommunityDetail.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ public struct CommunityDetailView: View {
312312
}
313313

314314
HStack(spacing: 4) {
315-
Image(.communityComment)
315+
Image(.communityCommentFill)
316316
.resizable()
317317
.frame(width: 20, height: 20)
318318

Hambug.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,8 @@
502502
ENABLE_PREVIEWS = YES;
503503
GENERATE_INFOPLIST_FILE = YES;
504504
INFOPLIST_FILE = Hambug/Info.plist;
505+
INFOPLIST_KEY_CFBundleDisplayName = "햄버그";
506+
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
505507
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
506508
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
507509
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
@@ -543,6 +545,8 @@
543545
ENABLE_PREVIEWS = YES;
544546
GENERATE_INFOPLIST_FILE = YES;
545547
INFOPLIST_FILE = Hambug/Info.plist;
548+
INFOPLIST_KEY_CFBundleDisplayName = "햄버그";
549+
INFOPLIST_KEY_ITSAppUsesNonExemptEncryption = NO;
546550
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
547551
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
548552
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;

Hambug/ContentView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ struct ContentView: View {
5454

5555
NavigationStack {
5656
MyPageView(
57-
viewModel: mypageDIContainer.makeMyPageViewModel()
57+
viewModel: mypageDIContainer.makeMyPageViewModel(),
58+
activitesFactory: mypageDIContainer
5859
)
5960
}
6061
.tag(2)

Hambug/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,10 @@
11
{
22
"images" : [
33
{
4+
"filename" : "app_icon-1024x1024 2.png",
45
"idiom" : "universal",
56
"platform" : "ios",
67
"size" : "1024x1024"
7-
},
8-
{
9-
"appearances" : [
10-
{
11-
"appearance" : "luminosity",
12-
"value" : "dark"
13-
}
14-
],
15-
"idiom" : "universal",
16-
"platform" : "ios",
17-
"size" : "1024x1024"
18-
},
19-
{
20-
"appearances" : [
21-
{
22-
"appearance" : "luminosity",
23-
"value" : "tinted"
24-
}
25-
],
26-
"idiom" : "universal",
27-
"platform" : "ios",
28-
"size" : "1024x1024"
29-
},
30-
{
31-
"idiom" : "mac",
32-
"scale" : "1x",
33-
"size" : "16x16"
34-
},
35-
{
36-
"idiom" : "mac",
37-
"scale" : "2x",
38-
"size" : "16x16"
39-
},
40-
{
41-
"idiom" : "mac",
42-
"scale" : "1x",
43-
"size" : "32x32"
44-
},
45-
{
46-
"idiom" : "mac",
47-
"scale" : "2x",
48-
"size" : "32x32"
49-
},
50-
{
51-
"idiom" : "mac",
52-
"scale" : "1x",
53-
"size" : "128x128"
54-
},
55-
{
56-
"idiom" : "mac",
57-
"scale" : "2x",
58-
"size" : "128x128"
59-
},
60-
{
61-
"idiom" : "mac",
62-
"scale" : "1x",
63-
"size" : "256x256"
64-
},
65-
{
66-
"idiom" : "mac",
67-
"scale" : "2x",
68-
"size" : "256x256"
69-
},
70-
{
71-
"idiom" : "mac",
72-
"scale" : "1x",
73-
"size" : "512x512"
74-
},
75-
{
76-
"idiom" : "mac",
77-
"scale" : "2x",
78-
"size" : "512x512"
798
}
809
],
8110
"info" : {

0 commit comments

Comments
 (0)