반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- swift6
- @Binding
- subject
- SWIFT
- init
- NavigationLink
- Xcode
- @State
- @EnvironmentObject
- typeorm
- IOS
- dismiss
- operator
- graphql
- RFC1738/1808
- NullObject
- URL(string:)
- init?
- Operators
- nestjs
- nonisolated
- Operater
- SwiftUI
- Bug
- ios14
- vim
- RxCocoa
- RxSwift
- @Environment
- Creating Operators
Archives
- Today
- Total
Tunko Development Diary
iOS17에서 URL(string:) 사용 유의점 본문
아래 링크를 보시면
RFC 1738/1808 → RFC 3986
로 업데이트 되었다고 합니다.
init(string:) | Apple Developer Documentation
RFC (Request for Comments)는 인터넷 연구 및 개발 커뮤니티에서 인터넷 표준과 관련된 문서의 시리즈입니다. 각 RFC는 번호가 부여되며, 특정 주제나 프로토콜에 대한 정보와 규격을 담고 있습니다.
struct TestUrl {
let testURL = "https://tistory.com"
let testURL2 = "https:// tistory.com"
init() {
if #available(iOS 17.0, *) {
var url_iOS17 = URL(string: testURL)
print("iOS17: \(url_iOS17)") // 결과: my%20string
url_iOS17 = URL(string: testURL2, encodingInvalidCharacters: false)
print("iOS17: \(url_iOS17)") // 결과: nil
} else {
let url_iOS16 = URL(string: testURL2)
print("iOS17: \(url_iOS16)") // 결과: nil
}
}
}
기존엔 nil로 나오던 결과가 다르게 인코딩되어 나오게 됩니다.
반응형
'Development > iOS 개발' 카테고리의 다른 글
Swift6 migration 정리 (2) | 2024.10.28 |
---|---|
xcode Build Clean으로도 알 수 없는 에러가 남을때 ☹️ (0) | 2023.01.01 |
[Swift 5] @propertyWrapper 란? (0) | 2022.09.26 |
SwiftUI) NavigationLink 터치 에니메이션 제거 (0) | 2022.09.06 |
[Swift 5.1] .Self 키워드 (0) | 2022.08.27 |
Comments