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

Feature/#91 content setting #96

Merged
merged 9 commits into from
Aug 17, 2024
Merged

Feature/#91 content setting #96

merged 9 commits into from
Aug 17, 2024

Conversation

ShapeKim98
Copy link
Contributor

#️⃣연관된 이슈

#91

📝작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

  • 링크 붙여넣기 시 제목 자동 추출
  • 청에 썸네일 url 추가
  • 썸네일 url을 파싱 구현

스크린샷 (선택)

Simulator Screen Recording - iPhone 15 Pro - 2024-08-17 at 03 11 26

💬리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

  • LinkPresentation을 이용한 썸네일 파싱은 썸네일의 url을 제공해주지 않아 버리고, SwiftSoupClient로 대체하였습니다.
  • SwiftSoup을 이용한 og 태그 파싱으로 로직을 바꾸면서, 구글 관련 웹페이지의 og태그를 인식하지 못하는 문제가 발생하였는데, http 요청 헤더의 user agent를 크롬 버전으로 바꾸면서 해결하였습니다. (ios는 기본 사파리로 알고 있는데, 구글에서 사파리만 막아 놓은듯함;;)
...
var request = URLRequest(url: url)
request.setValue(
    "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36",
    forHTTPHeaderField: "User-Agent"
)
...
  • 또한 이제 썸네일을 UIImage가 아닌 URL로 관리하므로, 링크 미리보기의 이미지를 LazyImage로 핸들링 하도록 바꿨습니다.
  • 제목 자동 추출 기능 추가에 따라 제목 글자수 제한을 없앴는데, 서버에선 아직 반영이 안된듯 합니다.
    스크린샷 2024-08-17 03 26 01

close #91

@ShapeKim98 ShapeKim98 added Feat 기능구현 Fix 기능 수정 labels Aug 16, 2024
@ShapeKim98 ShapeKim98 self-assigned this Aug 16, 2024
@ShapeKim98 ShapeKim98 linked an issue Aug 16, 2024 that may be closed by this pull request
2 tasks
Copy link
Member

@stealmh stealmh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다! 고생많으셨어욥

@stealmh stealmh merged commit 77e0204 into develop Aug 17, 2024
1 check passed
@stealmh stealmh deleted the feature/#91-content-setting branch September 3, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 기능구현 Fix 기능 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

링크 추가/수정 기능 수정
2 participants