Closed kjxbyz closed 1 year ago
👋 @kjxbyz
NOTE: This comment is auto-generated.
Are you sure you have already searched for the same problem?
Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!
If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.
In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE]
or ios WKWebView [MY ERROR HERE]
keywords.
Following these steps can save you, me, and other people a lot of time, thanks!
Might be related to https://github.com/pichillilorenzo/flutter_inappwebview/issues/1735 but I can't do the workaround: https://github.com/pichillilorenzo/flutter_inappwebview/issues/1735#issuecomment-1683434110
Hi,
I have the same problem but on a real device (iPhone 12 Pro with iOS 17).
Might be related to #1735 but I can't do the workaround: #1735 (comment)
It's not the same error and it's not fixed the problem for us 😢
Might be related to #1735 but I can't do the workaround: #1735 (comment)
It's not the same error and it's not fixed the problem for us 😢
Bro, you are most likely doing something wrong. Right now I did what is written in this comment https://github.com/pichillilorenzo/flutter_inappwebview/issues/1735#issuecomment-1699023475, tested it on iOS 17, everything works fine through Xcode 15 (release version).
I wrote a small script to make this temporary fix. This script works fine in the Codemagic Pre-build script phase.
#!/bin/bash
echo "Temporary fix for 'WKWebsiteDataStore.h'"
file_path="/Applications/Xcode-15.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Cryptexes/OS/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h"
if [ ! -e "$file_path" ]; then
echo "File not found: $file_path"
exit 1
fi
chmod u+w "$file_path"
if [ $? -eq 0 ]; then
echo "File permissions changed successfully"
else
echo "Error: Changing file permissions failed"
exit 1
fi
sed -i '' 's/__IPHONE_OS_VERSION_MAX_ALLOWED >= 170000/__IPHONE_OS_VERSION_MAX_ALLOWED >= 180000/g' "$file_path"
if [ $? -eq 0 ]; then
echo "Replacement completed successfully"
else
echo "Error: Replacement encountered an error"
exit 1
fi
chmod u-w "$file_path"
I add this line s.ios.deployment_target = '8.0'
solved the problem
I wrote a small script to make this temporary fix. This script works fine in the Codemagic Pre-build script phase.
#!/bin/bash echo "Temporary fix for 'WKWebsiteDataStore.h'" file_path="/Applications/Xcode-15.0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Cryptexes/OS/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h" if [ ! -e "$file_path" ]; then echo "File not found: $file_path" exit 1 fi chmod u+w "$file_path" if [ $? -eq 0 ]; then echo "File permissions changed successfully" else echo "Error: Changing file permissions failed" exit 1 fi sed -i '' 's/__IPHONE_OS_VERSION_MAX_ALLOWED >= 170000/__IPHONE_OS_VERSION_MAX_ALLOWED >= 180000/g' "$file_path" if [ $? -eq 0 ]; then echo "Replacement completed successfully" else echo "Error: Replacement encountered an error" exit 1 fi chmod u-w "$file_path"
These fixes are great, but this isn't a clean solution, when you have to modify a dependency code on your own in a pre-build step, not to mention about playing around with file ownership..
I have the same problem
@RMatushkin You're solution is good for the build but it's not working for local debug. When I'm trying to "flutter run ios", I have this error :
Error (Xcode): type argument 'nw_proxy_config_t' (aka 'struct nw_proxy_config *') is neither an Objective-C object nor a block type /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:119:46
Parse Issue (Xcode): Could not build module 'WebKit' /Users/xavier/IdeaProjects/app_mobile/build/ios/Debug-iphonesimulator/flutter_inappwebview/flutter_inappwebview.framework/Headers/flutter_inappwebview-Swift.h:893:8
Parse Issue (Xcode): Could not build module 'WebKit' /Users/xavier/IdeaProjects/app_mobile/build/ios/Debug-iphonesimulator/flutter_inappwebview/flutter_inappwebview.framework/Headers/flutter_inappwebview-Swift.h:285:8
Could not build the application for the simulator. Error launching application on iPad Pro (12.9-inch) (6th generation).
@RMatushkin You're solution is good for the build but it's not working for local debug. When I'm trying to "flutter run ios", I have this error :
Error (Xcode): type argument 'nw_proxy_config_t' (aka 'struct nw_proxy_config *') is neither an Objective-C object nor a block type /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:119:46 Parse Issue (Xcode): Could not build module 'WebKit' /Users/xavier/IdeaProjects/app_mobile/build/ios/Debug-iphonesimulator/flutter_inappwebview/flutter_inappwebview.framework/Headers/flutter_inappwebview-Swift.h:893:8 Parse Issue (Xcode): Could not build module 'WebKit' /Users/xavier/IdeaProjects/app_mobile/build/ios/Debug-iphonesimulator/flutter_inappwebview/flutter_inappwebview.framework/Headers/flutter_inappwebview-Swift.h:285:8 Could not build the application for the simulator. Error launching application on iPad Pro (12.9-inch) (6th generation).
Don't see a problem with it, you can create .sh script locally, and execute it with 'sudo' to have permission for editing. But if you use iOS simulator, you have to edit the same file but in iPhoneSimulator.platform folder because the script I wrote it edits just the file for physical devices.
I'm so stupid ! You're right ! It's working now 🤩 Thx !!
Any changes ?
Any changes ?
Fixed in #1790
Any Solution I am Stuck 😢 ?
flutter_inappwebview:
git:
url: https://github.com/nesquikm/flutter_inappwebview
ref: heads/v5.7.2+3_fix_xcode_17
Or just start using https://pub.dev/packages/webview_flutter instead of referencing some branches on a dependency that hasn't been updated in 9 months (not counting pre-release versions) :)
flutter_inappwebview: git: url: https://github.com/nesquikm/flutter_inappwebview ref: heads/v5.7.2+3_fix_xcode_17
@kjxbyz I am Already Using the v5.7.2+3 Version. Any Other Solution?
@roshansrashtasoft pubspec.yaml
dependencies:
flutter:
sdk: flutter
flutter_inappwebview:
git:
url: https://github.com/nesquikm/flutter_inappwebview
ref: heads/v5.7.2+3_fix_xcode_17
flutter_localizations:
sdk: flutter
intl: ^0.18.1
@roshansrashtasoft
pubspec.yaml
dependencies: flutter: sdk: flutter flutter_inappwebview: git: url: https://github.com/nesquikm/flutter_inappwebview ref: heads/v5.7.2+3_fix_xcode_17 flutter_localizations: sdk: flutter intl: ^0.18.1
I attempted to add that solution to the pubspec.yaml
file, but I encountered the same error.
Are there any alternative solutions available?
Please provide a minimal reproducible example.
@roshansrashtasoft
pubspec.yaml
dependencies: flutter: sdk: flutter flutter_inappwebview: git: url: https://github.com/nesquikm/flutter_inappwebview ref: heads/v5.7.2+3_fix_xcode_17 flutter_localizations: sdk: flutter intl: ^0.18.1
Thank you, I use this solution, solved the problem
any expectations about the new release @pichillilorenzo?
Released new version 5.8.0
and 6.0.0-beta.25
with the fix!
I have the same problem. But now it work well just upgrade flutter and use command:
flutter pub upgrade
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.
Environment
Device information:
Description
Expected behavior:
Current behavior:
Steps to reproduce
Images
Stacktrace/Logcat