Skip to content

Commit 10dcc75

Browse files
authored
Merge pull request #292 from thingineeer/chore/v2.4.3-ad-cleanup
[Chore] - v2.4.3 광고 정리 및 코스 발견 최적화
2 parents 06003db + a1276a3 commit 10dcc75

14 files changed

Lines changed: 600 additions & 269 deletions

File tree

Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
AA00001500000001AAAAAAAA /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = AA00001500000002AAAAAAAA /* FirebaseFirestore */; };
7070
AA00001600000001AAAAAAAA /* FirebaseRemoteConfig in Frameworks */ = {isa = PBXBuildFile; productRef = AA00001600000002AAAAAAAA /* FirebaseRemoteConfig */; };
7171
AA00001700000001AAAAAAAA /* GoogleMobileAds in Frameworks */ = {isa = PBXBuildFile; productRef = AA00001700000002AAAAAAAA /* GoogleMobileAds */; };
72-
CC8E66F9F1674D3597AD4E1E /* AppOpenAdManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = F1674D3597AD4E1E22F38764 /* AppOpenAdManager.swift */; };
7372
CE09037D296E9ED900BEA710 /* ScrapCourseResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE09037C296E9ED900BEA710 /* ScrapCourseResponseDto.swift */; };
7473
CE0C23742966D62A00B45063 /* PagedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0C23732966D62A00B45063 /* PagedView.swift */; };
7574
CE0C23772966D64D00B45063 /* PageCVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE0C23762966D64D00B45063 /* PageCVC.swift */; };
@@ -114,6 +113,7 @@
114113
CE58759E29601476005D967E /* LoadingIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE58759D29601476005D967E /* LoadingIndicator.swift */; };
115114
CE5875A029601500005D967E /* Toast.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE58759F29601500005D967E /* Toast.swift */; };
116115
CE5875A2296015A2005D967E /* NetworkLoggerPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE5875A1296015A2005D967E /* NetworkLoggerPlugin.swift */; };
116+
71F207012F3D000000DF721E /* Sequence+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71F207002F3D000000DF721E /* Sequence+.swift */; };
117117
CE5875A4296015D2005D967E /* Encodable+.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE5875A3296015D2005D967E /* Encodable+.swift */; };
118118
CE591EA1296D5EB5000FCBB3 /* PrivateCourseResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE591EA0296D5EB5000FCBB3 /* PrivateCourseResponseDto.swift */; };
119119
CE6655C8295D849F00C64E12 /* StringLiterals.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE6655C7295D849F00C64E12 /* StringLiterals.swift */; };
@@ -302,6 +302,7 @@
302302
CE58759D29601476005D967E /* LoadingIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingIndicator.swift; sourceTree = "<group>"; };
303303
CE58759F29601500005D967E /* Toast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toast.swift; sourceTree = "<group>"; };
304304
CE5875A1296015A2005D967E /* NetworkLoggerPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkLoggerPlugin.swift; sourceTree = "<group>"; };
305+
71F207002F3D000000DF721E /* Sequence+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Sequence+.swift"; sourceTree = "<group>"; };
305306
CE5875A3296015D2005D967E /* Encodable+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Encodable+.swift"; sourceTree = "<group>"; };
306307
CE591EA0296D5EB5000FCBB3 /* PrivateCourseResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivateCourseResponseDto.swift; sourceTree = "<group>"; };
307308
CE6655BE295D82E200C64E12 /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
@@ -373,7 +374,6 @@
373374
DAD5A3D7296C6D9600C8166B /* AdImageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdImageCollectionViewCell.swift; sourceTree = "<group>"; };
374375
DAD5A3D9296C6DA500C8166B /* TitleCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleCollectionViewCell.swift; sourceTree = "<group>"; };
375376
DAD5A3E1296D4C6500C8166B /* PickedMapListResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PickedMapListResponseDto.swift; sourceTree = "<group>"; };
376-
F1674D3597AD4E1E22F38764 /* AppOpenAdManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppOpenAdManager.swift; sourceTree = "<group>"; };
377377
/* End PBXFileReference section */
378378

379379
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
@@ -1056,7 +1056,6 @@
10561056
CE6655C9295D84DD00C64E12 /* UserDefaultKeyList.swift */,
10571057
CE29D583296416D800F47542 /* caculateStatusBarHeight.swift */,
10581058
23EE06C82AC1DED100CB3FF8 /* GesturePublisher.swift */,
1059-
F1674D3597AD4E1E22F38764 /* AppOpenAdManager.swift */,
10601059
);
10611060
path = Utils;
10621061
sourceTree = "<group>";
@@ -1168,6 +1167,7 @@
11681167
children = (
11691168
CE665609295D924A00C64E12 /* Result+.swift */,
11701169
CE5875A3296015D2005D967E /* Encodable+.swift */,
1170+
71F207002F3D000000DF721E /* Sequence+.swift */,
11711171
);
11721172
path = "Foundation+";
11731173
sourceTree = "<group>";
@@ -1446,14 +1446,14 @@
14461446
A3BC2F2B2962C3D500198261 /* GoalRewardInfoVC.swift in Sources */,
14471447
CE665606295D91C500C64E12 /* makeVibrate.swift in Sources */,
14481448
CE66560A295D924A00C64E12 /* Result+.swift in Sources */,
1449+
71F207012F3D000000DF721E /* Sequence+.swift in Sources */,
14491450
DA20D847296697A600F1581F /* MyCourseSelectVC.swift in Sources */,
14501451
CE10065529680F7000FD31FB /* DepartureSearchingResponseDto.swift in Sources */,
14511452
CE9291292965E01D0010959C /* RNTimeFormatter.swift in Sources */,
14521453
CE0C23792966D6AF00B45063 /* ViewPager.swift in Sources */,
14531454
CE6B63D02967230D003F900F /* PrivateCourseListView.swift in Sources */,
14541455
71288ED32B26ED2500D6C921 /* UserUploadedLabelCell.swift in Sources */,
14551456
CE58759E29601476005D967E /* LoadingIndicator.swift in Sources */,
1456-
CC8E66F9F1674D3597AD4E1E /* AppOpenAdManager.swift in Sources */,
14571457
CE5875A2296015A2005D967E /* NetworkLoggerPlugin.swift in Sources */,
14581458
CEEC6B3C2961C51A00D00E1E /* CourseStorageVC.swift in Sources */,
14591459
71F206912F38A00000DF721E /* WatchSessionService.swift in Sources */,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// Sequence+.swift
3+
// Runnect-iOS
4+
//
5+
// Created by 이명진 on 2026/02/19.
6+
//
7+
8+
import Foundation
9+
10+
extension Sequence {
11+
/// 주어진 keyPath 기준으로 중복을 제거하여 순서를 유지한 배열을 반환합니다.
12+
func uniqued<T: Hashable>(by keyPath: KeyPath<Element, T>) -> [Element] {
13+
var seen = Set<T>()
14+
return filter { seen.insert($0[keyPath: keyPath]).inserted }
15+
}
16+
}

Runnect-iOS/Runnect-iOS/Global/Supports/AppDelegate.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4545
#endif
4646
KakaoSDK.initSDK(appKey: Config.kakaoNativeAppKey)
4747

48-
GADMobileAds.sharedInstance().start { _ in
49-
AppOpenAdManager.shared.preloadAd()
50-
}
48+
GADMobileAds.sharedInstance().start(completionHandler: nil)
5149

5250
// WatchConnectivity 세션 시작
5351
WatchSessionService.shared.startSession()

Runnect-iOS/Runnect-iOS/Global/Supports/SceneDelegate.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
9999

100100
func sceneDidBecomeActive(_ scene: UIScene) {
101101
requestTrackingAuthorizationIfNeeded()
102-
AppOpenAdManager.shared.showAdIfAvailable()
103102
}
104103

105104
func sceneWillResignActive(_ scene: UIScene) {
@@ -108,7 +107,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
108107
}
109108

110109
func sceneWillEnterForeground(_ scene: UIScene) {
111-
AppOpenAdManager.shared.preloadAd()
112110
}
113111

114112
func sceneDidEnterBackground(_ scene: UIScene) {

Runnect-iOS/Runnect-iOS/Global/Utils/AppOpenAdManager.swift

Lines changed: 0 additions & 101 deletions
This file was deleted.

Runnect-iOS/Runnect-iOS/Global/Utils/UserDefaultKeyList.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,12 @@ struct UserDefaultKeyList {
1616
@UserDefaultWrapper<Int>(key: "appLaunchCount") public static var appLaunchCount
1717
@UserDefaultWrapper<String>(key: "lastKnownAppVersion") public static var lastKnownAppVersion
1818
}
19+
20+
struct Update {
21+
@UserDefaultWrapper<String>(key: "optionalUpdateDismissedVersion") public static var optionalUpdateDismissedVersion
22+
}
23+
24+
struct Dev {
25+
@UserDefaultWrapper<Bool>(key: "isDeveloperMode") public static var isDeveloperMode
26+
}
1927
}

Runnect-iOS/Runnect-iOS/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<key>CFBundlePackageType</key>
2929
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
3030
<key>CFBundleShortVersionString</key>
31-
<string>2.4.2</string>
31+
<string>2.4.3</string>
3232
<key>CFBundleURLTypes</key>
3333
<array>
3434
<dict>

Runnect-iOS/Runnect-iOS/Network/Foundation/Config.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,12 @@ struct Config {
5454
return "ldgt4i6s7l"
5555
}
5656

57-
static var adMobBannerAdUnitId: String {
58-
return AdConfig.bannerAdUnitId
59-
}
60-
6157
static var adMobNativeAdUnitId: String {
6258
return AdConfig.nativeAdUnitId
6359
}
6460

65-
static var adMobAppOpenAdUnitId: String {
66-
return AdConfig.appOpenAdUnitId
61+
static var adMobCarouselNativeAdUnitId: String {
62+
return AdConfig.carouselNativeAdUnitId
6763
}
6864

6965
static var accessToken: String {
@@ -91,4 +87,8 @@ struct Config {
9187
static var appleDeveloperName: String {
9288
return "이명진"
9389
}
90+
91+
static var developerPassword: String {
92+
return "970821"
93+
}
9494
}

Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ final class CourseDetailVC: UIViewController {
3636
private var isMyCourse: Bool?
3737

3838
private var scrapCount: Int = 0
39+
private var hasLoadedDetail = false
3940

4041
// MARK: - UI Components
4142

@@ -153,7 +154,9 @@ final class CourseDetailVC: UIViewController {
153154

154155
override func viewWillAppear(_ animated: Bool) {
155156
self.hideTabBar(wantsToHide: true)
156-
getUploadedCourseDetail()
157+
if !hasLoadedDetail {
158+
getUploadedCourseDetail()
159+
}
157160
}
158161
}
159162

@@ -256,6 +259,7 @@ extension CourseDetailVC {
256259
}
257260

258261
func setData(model: UploadedCourseDetailResponseDto) {
262+
self.hasLoadedDetail = true
259263
self.uploadedCourseDetailModel = model
260264
self.userId = model.user.id
261265
self.publicCourseId = model.publicCourse.id
@@ -589,8 +593,10 @@ extension CourseDetailVC {
589593
print("리절트", result)
590594
let status = result.statusCode
591595
if 200..<300 ~= status {
592-
delegate?.didRemoveCourse(publicCourseId: courseId)
593-
print("코스 \(courseId) 번 삭제 성공")
596+
if let publicCourseId = self.publicCourseId {
597+
self.delegate?.didRemoveCourse(publicCourseId: publicCourseId)
598+
}
599+
print("코스 삭제 성공 (publicCourseId: \(self.publicCourseId ?? -1))")
594600
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
595601
self.navigationController?.popViewController(animated: true)
596602
}
@@ -631,6 +637,7 @@ extension CourseDetailVC {
631637

632638
switch item {
633639
case "수정하기":
640+
self.hasLoadedDetail = false
634641
let courseEditVC = CourseEditVC()
635642
courseEditVC.loadData(model: uploadedCourseDetailModel)
636643
courseEditVC.publicCourseId = self.publicCourseId

0 commit comments

Comments
 (0)