본문 바로가기

전체 글530

[iOS] iOS Webview에서 텍스트 복사하는법 https://dc2348.tistory.com/16 [공유하기] 모바일 웹 URL 복사 기능 구현하기 오늘은 공유하기 기능 중 URL 직접 복사 기능을 설명해보려고합니다. URL 복사 기능 구현하기 1. Android 또는 iOS 13.4 이상 // 클립보드로 링크 복사 navigator.clipboard.writeText('https://dc2348.tistory.com/') .then( dc2348.tistory.com Webview에서 clipboard로 텍스트를 copy 시키기 위해선 2가지 방법이 있다. 1. iOS 13.4 이상 버전 navigator.clipboard.writeText("복사할 텍스트") iOS 13.4 이상 버전에선 Clipboard API를 활용하면 굉장히 쉽게 구현이 .. 2023. 7. 15.
[iOS] beginBackgroundTask beginBackgroundTask(expirationHandler:) | Apple Developer Documentation Marks the start of a task that should continue if the app enters the background. developer.apple.com beginBackgroundTask 앱이 Background로 진입한 이후에도 지속되어야할 작업들을 표시하는 함수 expirationHandler: 남은 백그라운드 지속 시간이 0이 되어서 종료되기 직전에 남은 작업을 처리할 수 있게 해주는 block iOS앱은 백그라운드로 넘어가고 수초 이내에 Suspended 상태로 넘어가서 이전에 실행하던 코드들을 전부 중단시키는데, Suspended 상태로의 .. 2023. 6. 24.
[iOS] Pod 폴더 충돌 해결 How to deal with conflicts in Pod folders A quick and easy technique to fix conflicts with changes to your projects CocoaPods medium.com 보통 Pod가 관련해서 merge할 시에 Conflict이 발생하는 파일은 아래 3가지다. Podfile.lock Pods/Manifest.lock Pods/Pods.xcodeproj 우선 Podfile과 Podfile.lock에서 version 정보들을 관리를 하고 있기 때문에 안심하고 Pods/ 폴더를 지워도 된다. (Pods.xcodeproj 파일의 컨플릭을 해결하기 위해서이고, 직접 수정하는 것은 매우 힘든 일이다.) 그 다음엔 Podfile.lock을 연.. 2023. 2. 5.
[iOS] Podfile.lock https://ios-development.tistory.com/m/346 [iOS - swift] cocoapods 개념, podfile.lock, gemfile.lock, bundle exec pod Cocoapods이란 일반적으로 오픈소스를 관리하는 방법에는 아래 방법 존재, 두 가지 단점을 극복한 오픈소스 관리하는 cocoapods - 압축 파일로 소스를 받아서 직접 프로젝트에 넣는 방법 - 버전 업데 ios-development.tistory.com CocoaPods Guides CocoaPods is fully open-sourced, so it depends on community contributions to get better. If you're looking to start workin.. 2023. 2. 5.