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

Installed with CocoaPods in Xcode 15 beta 6 can not build module 'WebKit' #430

Open
Tmac90301 opened this issue Aug 11, 2023 · 9 comments
Open

Comments

@Tmac90301
Copy link

When installed this pod with CocoaPods in Xcode 15 beta 6, can not pass build with error " Could not build module 'WebKit' ".

While drag files into project directly works well.

It seems like the WebKit new APIs for iOS 17 cannot be correctly linked.

#if ((TARGET_OS_OSX && __MAC_OS_X_VERSION_MAX_ALLOWED >= 140000) \
    || ((TARGET_OS_IOS || TARGET_OS_MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000) \
    || (TARGET_OS_WATCH && __WATCH_OS_VERSION_MAX_ALLOWED >= 100000) \
    || (TARGET_OS_TV && __TV_OS_VERSION_MAX_ALLOWED >= 170000))
/*! @abstract Gets or sets the proxy configurations to be used to override networking in all WKWebViews that use this WKWebsiteDataStore.
 @discussion Changing the proxy configurations might interupt current networking operations in any WKWebView that use this WKWebsiteDataStore,
 so it is encouraged to finish setting the proxy configurations before starting any page loads.
*/
@property (nullable, nonatomic, copy) NSArray<nw_proxy_config_t> *proxyConfigurations NS_REFINED_FOR_SWIFT API_AVAILABLE(macos(14.0), ios(17.0));
#endif

The type nw_proxy_config_t declared in Network.framework cannot be found correctly in WebKit header file WKWebsiteDataStore.h

I have tried add dependency of Network.framework for pod target in Build Phase, but still not working.

Is there anyone meets the same error and solved this?

@dizz
Copy link

dizz commented Aug 13, 2023

Have the same issue here 🙁

1 similar comment
@LeonardoYanJun
Copy link

Have the same issue here 🙁

@morris322
Copy link

morris322 commented Aug 23, 2023

Update iOS version to greater than 5 in podspec and pod install again can fix this issue.
Ex: s.platforms = { :ios => "11.0", :osx => "" }

@yyks999
Copy link

yyks999 commented Aug 25, 2023

Try this

open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h, change __IPHONE_OS_VERSION_MAX_ALLOWED to 180000

@sigmassimo
Copy link

to @yyks999, this file does not exists(on my Mac). And I´ve got the current error that I can't download cocoa pods: "ERROR: Failed to build gem native extension." I´ve got the macOS Release Candidate, I had to uninstall cocoa pods and now I can not download it anymore.

Could anyone help me?

@KhamHti
Copy link

KhamHti commented Oct 2, 2023

Try this

open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h, change __IPHONE_OS_VERSION_MAX_ALLOWED to 180000

how can I edit that file with? I tried with Xcode but I can't edit it.

@cHAuHaN-AppyHigh
Copy link

cHAuHaN-AppyHigh commented Oct 5, 2023

@KhamHti sudo nano /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h

Use arrow keys to navigate and change the value of __IPHONE_OS_VERSION_MAX_ALLOWED to 180000 and hit Ctrl + O -> hit Enter/Return -> hit Ctrl + X -> hit Enter/Return

@cederache
Copy link

cederache commented Oct 18, 2023

@KhamHti sudo nano /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h

Use arrow keys to navigate and change the value of __IPHONE_OS_VERSION_MAX_ALLOWED to 180000 and hit Ctrl + O -> hit Enter/Return -> hit Ctrl + X -> hit Enter/Return

[EDIT]
I managed to do it directly in the finder.
I had to duplicate the file, modify it, then drag it in the Headers folder and enter my admin password

[ORIGINAL ANSWER]
I tried it but it seems that I do not have the permission to modify this file :
[ Cannot open file for writing: Operation not permitted ]

I tried to add write access to file without success with a sudo chmod u+w

@misuqian
Copy link

misuqian commented Dec 13, 2023

改成源代码集成,而不是CocoaPods。或者把podspec里面的依赖版本提高一下。
Change to source code integration, not CocoaPods. Or improve the podspec inside the dependent version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants