-
Notifications
You must be signed in to change notification settings - Fork 1
[FEAT] 구글 애즈 적용 (#162) #171
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
Conversation
yurim830
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
최고다ㅜㅜ 고생하셨습니다!! 감사해요 ✨
| return adLoaders.first { $1 === adLoader }?.key | ||
| } | ||
|
|
||
| func cleanup(_ adType: GoogleAdsType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐿️ cleanup -> cleanUp 대문자 수정 가능할까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
통칭상 한 phrase로 많이 쓰는 것 같아서 애매하다고 느꼈어요!!
그냥 cleanAdType으로 변경해두겠습니다~~
| func preloadNativeAd(_ adType: GoogleAdsType) { | ||
| guard cachedAd[adType] == nil && !loadingAds.contains(adType) else { return } | ||
|
|
||
| self.loadNativeAd(adType) { [weak self] ad, error in | ||
| if let ad = ad { | ||
| self?.cachedAd[adType] = ad | ||
| } else { | ||
| self?.handleAdLoadError(error) | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐿️🐿️ GoogleAdsManager 내부에서만 쓰이는 메소드같은데 맞나요? private 키 붙여줘도 좋을 것 같습니다!
|
@yurim830 바보같이 리뷰 적용한 거 푸시를 안 하고 머지했네용.. 다음 브랜치 #172에서 반영해두겠습니다 ㅠㅠ |
🐿️ Pull Requests
🪵 작업 브랜치
🥔 작업 내용
구글 애즈를 적용했습니다
🚨 참고 사항
Shared.xcconfig 변경되었습니다! 슬랙에 첨부해둘게요
광고 타입(GoogleAdsType)은 Spotlist에 적용되는 .imageOnly (이미지만) 와 Profile에 적용되는 .both (이미지, 영상 모두)이 있습니다.
각각 동시 로딩 및 관리가 가능하도록 GoogleAdsManager에서 관련 프로퍼티들을 GoogleAdsType을 key로 가지는 딕셔너리로 제작했습니다.
광고가 로드되지 않은 경우 스켈레톤 뷰를 띄웁니다. (추후 완성되면 적용 예정)
광고는 타입별로 하나씩만 미리 캐싱해두고 있습니다.
이 때문에 한 번 광고를 본 직후 다음 광고를 보려 하면 (시뮬 영상 후반의 홈-프로필 빠르게 왔다갔다) 로드가 안 된 경우가 나오는데, 정말 빠르게 이동해야 나오는 케이스라 드물 것이라 판단하였고, 광고가 로드되지 않는 게 사용성에 큰 저하를 끼치지 않는다고 생각해서 다음과 같이 구현했습니다. 여러 개 캐싱 시 해당 문제가 덜 발생하겠지만, 광고를 여러 개 캐싱 시 메모리 문제가 있을 수 있으며, 캐싱 후 사용 안 할 광고에 메모리 낭비를 하고 싶지 않았습니다! 또한 한 번에 하나만 보여주는 앱 특성상 굳이 여러 개 캐싱할 필요는 없다고 판단했습니다.
📸 스크린샷
💥 To be sure
🌰 Resolve issue