티스토리 뷰
iOS Xcode16 WebKit, nw_proxy_config_t 컴파일 에러 수정방법 feat. chatGPT
applebuddy 2025. 6. 15. 09:13
안녕하세요, 개발자 멍구입니다!
오랜만에 사이드 프로젝트를 만지다가 Xcode 16.4로 업데이트한 이후, 컴파일 에러가 발생했어요. 😢
예전에 Xcode 15를 사용할 때 겪었던 비슷한 에러가 또 발생해서, 이전에 제가 작성했던 블로그 글을 참고해보기로 했습니다.
사이드프로젝트 컴파일 에러 발생
Could not build Objective-C module 'WebKit', No type or protocol named 'nw_proxy_config_t'

지겨워요 Webkit 관련 이슈인데요. tuist 등의 외부 라이브러리 의존성과 연관이 있는 것 같아요. tuist, TCA 기반의 프로젝트에서만 경험했던 컴파일 에러입니다. 근원지는 WKWebsiteDataStore.h 입니다. 왜 아냐면, 이미 이걸 작년에도 경험해봤거든요. ㅠㅠ
WKWebsiteDataStore.h는 WebKit 프레임워크의 헤더 파일로,
WKWebsiteDataStore 클래스의 인터페이스를 정의합니다. 이 클래스는 웹 콘텐츠(웹페이지 등)가 사용하는 데이터 저장소를 관리
하는 역할을 해요. WKWebView와도 연관이 깊은 놈이라고 볼 수 있겠어요.
WebKit 이슈의 근원지, WKWebsiteDataStore.h 수정 시도

iOS Xcode 15.2, module 'WebKit' build 이슈 해결방법
안녕하세요~ iOS앱을 개발하다가 문제가 생겼던 멍구입니다! 🥵오늘은 Xcode 15.2 버전을 통해 앱을 개발하면서 자주 발생했던 'WebKit' module build 이슈 해결방법을 간략하게 소개하려 합니다! 'WebKit'
0urtrees.tistory.com
// WKWebsiteDataStore.h
"__IPHONE_OS_VERSION_MAX_ALLOWED >= 170000" 에서 170000 -> 180000로 변경시도
이 이슈를 Xcode 15.2에서도 경험했던 터라, 그때 작성했던 위 블로그 포스팅을 참고해서 수정해보기 시도를 했으나, 실패했습니다. 골치아파요. 그래서 chatGPT에게 도움을 요청했습니다...!
chatGPT에게 WKWebsiteDataStore.h 수정 요청

WKWebsiteDataStore.h에서 nw_proxy_config_t 타입을 인식 못함 → No type or protocol named 'nw_proxy_config_t' 에러 발생
Could not build Objective-C module 'WebKit', No type or protocol named 'nw_proxy_config_t' 관련 컴파일에러가 발생해서 컴파일 에러 내용과 함께 해당 에러가 발생하는 WKWebsiteDataStore.h 파일을 수정해달라고 chatGPT에게 요청했습니다.
그렇게 우리의 chatGPT는 nw_proxy_config_t를 인식하지 못하니, 이걸 NSArray로 바꾸라고 해서 그렇게 수정했습니다. 파일 내용 vi 편집기로 일괄 수정!
그렇게 수정 후 tuist clean > tuist fetch > tuist generate > build 시도...!
그렇게 프로젝트 빌드가 되네요... 🥲
이 방법은 Xcode를 업데이트 하거나, 변경하면 다시 별도 처리가 필요한 단편적인 방법이라, 정해는 아닙니다. 그래도 당장 사이드프로젝트 빌드 및 개발 진행을 할 수 있었습니다. ㅠㅠ tuist, TCA 등의 외부라이브러리 의존이 많다보니 이런 저런 예기치 못한 문제들이 더 발생하는 것 같아요. 이 또한 좋은 경험이라 생각하며... 이만 포스팅 마치겠습니다.
이 이슈 관련 더 좋은 해결방안이 있다면 공유 부탁드려요. 수정된 WKWebsiteDataStore.h 코드 내용 공유와 함께 포스팅 마칠게요. 감사합니다.
수정한 WKWebsiteDataStore.h 파일 코드
/*
* Copyright (C) 2014-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS 'AS IS'
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <WebKit/WKFoundation.h>
#import <WebKit/WKWebsiteDataRecord.h>
#if __has_include(<Network/proxy_config.h>)
#import <Network/Network.h>
#endif
NS_ASSUME_NONNULL_BEGIN
@class WKHTTPCookieStore;
WK_SWIFT_UI_ACTOR
WK_EXTERN API_AVAILABLE(macos(10.11), ios(9.0))
@interface WKWebsiteDataStore : NSObject <NSSecureCoding>
+ (WKWebsiteDataStore *)defaultDataStore;
+ (WKWebsiteDataStore *)nonPersistentDataStore;
- (instancetype)new NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
@property (nonatomic, readonly, getter=isPersistent) BOOL persistent;
+ (NSSet<NSString *> *)allWebsiteDataTypes;
- (void)fetchDataRecordsOfTypes:(NSSet<NSString *> *)dataTypes completionHandler:(WK_SWIFT_UI_ACTOR void (^)(NSArray<WKWebsiteDataRecord *> *))completionHandler WK_SWIFT_ASYNC_NAME(dataRecords(ofTypes:));
- (void)removeDataOfTypes:(NSSet<NSString *> *)dataTypes forDataRecords:(NSArray<WKWebsiteDataRecord *> *)dataRecords completionHandler:(WK_SWIFT_UI_ACTOR void (^)(void))completionHandler;
- (void)removeDataOfTypes:(NSSet<NSString *> *)dataTypes modifiedSince:(NSDate *)date completionHandler:(WK_SWIFT_UI_ACTOR void (^)(void))completionHandler;
@property (nonatomic, readonly) WKHTTPCookieStore *httpCookieStore API_AVAILABLE(macos(10.13), ios(11.0));
@property (nonatomic, readonly, nullable) NSUUID *identifier API_AVAILABLE(macos(14.0), ios(17.0));
+ (WKWebsiteDataStore *)dataStoreForIdentifier:(NSUUID *)identifier API_AVAILABLE(macos(14.0), ios(17.0));
+ (void)removeDataStoreForIdentifier:(NSUUID *)identifier completionHandler:(WK_SWIFT_UI_ACTOR void(^)(NSError * _Nullable))completionHandler API_AVAILABLE(macos(14.0), ios(17.0));
+ (void)fetchAllDataStoreIdentifiers:(WK_SWIFT_UI_ACTOR void(^)(NSArray<NSUUID *> *))completionHandler WK_SWIFT_ASYNC_NAME(getter:allDataStoreIdentifiers()) API_AVAILABLE(macos(14.0), ios(17.0));
#if ((TARGET_OS_OSX && __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000) \
|| ((TARGET_OS_IOS || TARGET_OS_MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000) \
|| (TARGET_OS_WATCH && __WATCH_OS_VERSION_MAX_ALLOWED >= 100000) \
|| (TARGET_OS_TV && __TV_OS_VERSION_MAX_ALLOWED >= 170000) \
|| (defined(TARGET_OS_VISION) && TARGET_OS_VISION))
@property (nullable, nonatomic, copy) NSArray *proxyConfigurations NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(14.0), ios(17.0));
#endif
@end
NS_ASSUME_NONNULL_END
'iOS 개발 > iOS 개발 팁' 카테고리의 다른 글
| iOS26 개발, 시뮬레이터 테스트 위한 Xcode26 설치 방법 (0) | 2025.09.26 |
|---|---|
| App Store Connect 애플 개발자 계정 비밀번호 변경하는 방법 (0) | 2025.09.06 |
| iOS 중복 이벤트 방지 방법, Timer와 closure로 throttle event 구현방법 (0) | 2025.05.23 |
| iOS 개발 팁, Timer로 간단하게 Debounce 구현하는 방법 (0) | 2025.05.22 |
| iOS Task 비동기 활용, custom throttle event 구현방법 (Combine 미사용) (0) | 2025.05.20 |
- Total
- Today
- Yesterday
- swift 기초
- 개발자문서
- 백준알고리즘
- swift concurrency
- 알고리즘문제
- 자연어처리
- uikit
- swift알고리즘
- 알고리즘
- ios
- createML
- Swift 알고리즘
- 프로그래머스
- 프로그래머스swift
- swift
- 프로토콜
- swift string
- 컬렉션
- swift문제
- 김프매매
- swift 문자열
- Collection
- 백준swift
- Protocol
- CoreML
- swift reduce
- 스위프트
- SwiftUI
- 부스트코스
- swift언어
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |