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

Cannot build on latest xcode 15 b5 for ios 17 #1735

Closed
2 tasks done
currantdev opened this issue Aug 1, 2023 · 108 comments
Closed
2 tasks done

Cannot build on latest xcode 15 b5 for ios 17 #1735

currantdev opened this issue Aug 1, 2023 · 108 comments
Labels
bug Something isn't working

Comments

@currantdev
Copy link

currantdev commented Aug 1, 2023

  • I have read the Getting Started section
  • I have already searched for the same problem

Environment

Technology Version
Flutter version 3.7.12
Plugin version 6.0.0 b24
Android version
iOS version 17.0
macOS version sonoma public beta 1
Xcode version 15 beta 5

Device information: iphone

Description

Failed to build iOS app
Error (Xcode): type argument 'nw_proxy_config_t' (aka 'struct nw_proxy_config *') is neither an Objective-C object nor a block
type
/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Li
brary/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:116:46

Parse Issue (Xcode): Could not build module 'WebKit'
/build/ios/Release-iphoneos/flutter_inappwebview/flutter_inappwebview.framework/Headers
/flutter_inappwebview-Swift.h:286:8

Encountered error while building for device.

Expected behavior:
run or build ios app

Current behavior:
erro while building

Steps to reproduce

Run on latest xcode version

@currantdev currantdev added the bug Something isn't working label Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

👋 @currantdev

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!

@Takabrycheri
Copy link

Same problem for me

@zzz2016
Copy link

zzz2016 commented Aug 8, 2023

Same problem

3 similar comments
@Helios030
Copy link

Same problem

@Brezy
Copy link

Brezy commented Aug 8, 2023

Same problem

@fumin65
Copy link

fumin65 commented Aug 11, 2023

Same problem

@Takabrycheri
Copy link

Same for Xcode 15 b6 (although quite obvious)

@abdulazeem4
Copy link

Same error here

@dizz
Copy link

dizz commented Aug 13, 2023

same issue here too

@abdulazeem4
Copy link

Did someone find a work around/fix?

@dizz
Copy link

dizz commented Aug 14, 2023

I commented out the dependency and related code for now. Tried to use the 6.x.x release but issue persisted.

@realitymolder
Copy link

Same issue here...

@dizz
Copy link

dizz commented Aug 18, 2023

Received this from Erick Yim (not showing on the thread?!)

WARNING: NOT TESTED
workaround 1): in framework xcodeproj Build Phrases -> Compile Sources,select all sources,delete -DOS_OBJECT_USE_OBJC=0 in Complier Flags

workaround 2): open /Applications/Xcode-beta.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

workaround 2 has me happy for now! 😊

@currantdev
Copy link
Author

I can confirm -> workaround 2 is working

@istiak-sourav
Copy link

Same issue

@realitymolder
Copy link

I can confirm -> workaround 2 is working

Same, thank you very everyone. Hope this issue will be fixed in the next beta.

@istiak-sourav
Copy link

Workaround 2 is working.
Thanks man, you're a life saver <3

@demoYang
Copy link

mark

@ssly1997
Copy link

same issue

@currantdev
Copy link
Author

Remember guys that every new xcode build (like latest beta 8) you have to made this change again.
I recommend workaround 2, because its working each time.
so Line 113 of file /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h

Change from:
|| ((TARGET_OS_IOS || TARGET_OS_MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000) \
to:
|| ((TARGET_OS_IOS || TARGET_OS_MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000) \

@snipd-mikel
Copy link

I tried to do Workaround 2 but couldn't edit the file: It said that the file couldn't be written. I have tried with sudo as well but no luck. Has anyone experienced the same issue?

@ssly1997
Copy link

ssly1997 commented Sep 1, 2023

I tried to do Workaround 2 but couldn't edit the file: It said that the file couldn't be written. I have tried with sudo as well but no luck. Has anyone experienced the same issue?

Using a text editor instead of Xcode

@snipd-mikel
Copy link

I have tried both vscode and vim and no luck. Which one did you use?

@ssly1997
Copy link

ssly1997 commented Sep 1, 2023

I have tried both vscode and vim and no luck. Which one did you use?

Default TextEditor

@snipd-mikel
Copy link

I have tried both vscode and vim and no luck. Which one did you use?

Default TextEditor

Thanks that helped! I was getting crazy! What a mess updating to iOS17 😅

@techwithsam
Copy link

180000

I have tried both vscode and vim and no luck. Which one did you use?

Default TextEditor

Thanks that helped! I was getting crazy! What a mess updating to iOS17 😅

How did you save the file after editing it on Textedit because what's i'm get is i don't have permission to save file even after explicitly giving permission to read and write.

@realitymolder
Copy link

180000

I have tried both vscode and vim and no luck. Which one did you use?

Default TextEditor

Thanks that helped! I was getting crazy! What a mess updating to iOS17 😅

How did you save the file after editing it on Textedit because what's i'm get is i don't have permission to save file even after explicitly giving permission to read and write.

you should change the premission for this file but sometimes that is not enough. If that is the case use vim to edit this textfile and use sudo before the vim
so you will have:
sudo vim fileName
this way it will work 10000%

@techwithsam
Copy link

180000

I have tried both vscode and vim and no luck. Which one did you use?

Default TextEditor

Thanks that helped! I was getting crazy! What a mess updating to iOS17 😅

How did you save the file after editing it on Textedit because what's i'm get is i don't have permission to save file even after explicitly giving permission to read and write.

you should change the premission for this file but sometimes that is not enough. If that is the case use vim to edit this textfile and use sudo before the vim so you will have: sudo vim fileName this way it will work 10000%

So i need to download vim on my laptop? Because i don't have vim installed on my system

@realitymolder
Copy link

180000

I have tried both vscode and vim and no luck. Which one did you use?

Default TextEditor

Thanks that helped! I was getting crazy! What a mess updating to iOS17 😅

How did you save the file after editing it on Textedit because what's i'm get is i don't have permission to save file even after explicitly giving permission to read and write.

you should change the premission for this file but sometimes that is not enough. If that is the case use vim to edit this textfile and use sudo before the vim so you will have: sudo vim fileName this way it will work 10000%

So i need to download vim on my laptop? Because i don't have vim installed on my system

If you are on mac you have vim built-in

@AntonioCardenas
Copy link

Remember guys that every new xcode build (like latest beta 8) you have to made this change again. I recommend workaround 2, because its working each time. so Line 113 of file /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h

Change from: || ((TARGET_OS_IOS || TARGET_OS_MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000) \ to: || ((TARGET_OS_IOS || TARGET_OS_MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000) \

This work around works for my project also I made a stack overflow post fell free to add any workarounds .

https://stackoverflow.com/questions/77189557/type-argument-nw-proxy-config-t-is-neither-an-objective-c-object-nor-a-block-t?noredirect=1#comment136079027_77189557

@christoph-fer
Copy link

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.

Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

This worked for me as well! Thanks a ton! :)

For the ones this doesn't work try deleting your podfile.lock and run cd ios pod install

@SileoWorkSpace
Copy link

After upgrade cocoa pods getting below mentioned error

Automatically signing iOS for device deployment using specified development team in Xcode project: 5HDLT2798K
Xcode build done. 18.6s
(lldb) 2023-09-29 13:34:03.993105+0530 Runner[4066:283159] Warning: Unable to create restoration in progress marker file

  • thread Screenshots/Images #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    frame #0: 0x0000000000000000
    error: memory read failed for 0x0
    Target 0: (Runner) stopped.
    Error launching application on iPhone (2).

@fauzannoorazhar
Copy link

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.
Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

This worked for me as well! Thanks a ton! :)

For the ones this doesn't work try deleting your podfile.lock and run cd ios pod install

Im still cannot archive and build on Emulator iPhone 15, any update or detail to fix?

@CodeSadhu
Copy link

CodeSadhu commented Sep 29, 2023

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.

Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

Dude. I've been scratching my brain over this error ever since I upgraded to Sonoma stable. I had almost started regretting the decision to upgrade till I found this. Thanks a million!
Although, I had to delete my previous podfile.lock for this to work
I would like to know why this is happening, btw. I'm not an iOS developer.

@Manguelo
Copy link

Is there any update as to when a fix for this will be live?

@fauzannoorazhar
Copy link

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.
Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

This worked for me as well! Thanks a ton! :)

For the ones this doesn't work try deleting your podfile.lock and run cd ios pod install

Thanks, now is solved.

Flutter 3.7.9 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 62bd79521d (6 months ago) • 2023-03-30 10:59:36 -0700
Engine • revision ec975089ac
Tools • Dart 2.19.6 • DevTools 2.20.1

Pod Version : 1.13.0

Xcode 15.0
Build version 15A240d

@applevinc
Copy link

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.

Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

Please share a fix if the project has build configurations

@kahdichienja
Copy link

I tried to do Workaround 2 but couldn't edit the file: It said that the file couldn't be written. I have tried with sudo as well but no luck. Has anyone experienced the same issue?

Using a text editor instead of Xcode

use terimal with nano, ensure-> sudo nano /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h

then you machine will prompt you to add previlages, do that then relaunch the terminal, redu the command -> sudo nano /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h

This time it should work

@egor-slatvinskiy-idf
Copy link

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.
Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

Please share a fix if the project has build configurations

the same

@GramGra07
Copy link

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.
Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

Please share a fix if the project has build configurations

this worked for me

@Navdeep-hunch
Copy link

Use the latest version of flutter_inappwebview. ie. flutter_inappwebview: ^5.8.0.
They have fixed the issue in the latest version

@pichillilorenzo
Copy link
Owner

Released new version 5.8.0 and 6.0.0-beta.25 with the fix!

@reysagar
Copy link

reysagar commented Oct 4, 2023

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

this works for me.

Getting this error after adding the above code on the podfile, any idea how to resolve it?

Lexical or Preprocessor Issue (Xcode): 'Flutter/Flutter.h' file not found
/Users/evo/.pub-cache/hosted/pub.dev/sqflite-2.2.4+1/ios/Classes/SqfliteImport.h:10:8

@reysagar
Copy link

reysagar commented Oct 4, 2023

post_integrate do |installer|
compiler_flags_key = 'COMPILER_FLAGS'
project_path = 'Pods/Pods.xcodeproj'

project = Xcodeproj::Project.open(project_path)
project.targets.each do |target|
  target.build_phases.each do |build_phase|
    if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
      build_phase.files.each do |file|
        if !file.settings.nil? && file.settings.key?(compiler_flags_key)
          compiler_flags = file.settings[compiler_flags_key]
          file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
        end
      end
    end
  end
end
project.save()
end

post_install do |installer|
installer.pods_project.targets.each do |target|
  flutter_additional_ios_build_settings(target)
  target.build_configurations.each do |config|
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
  end
end
end

This worked for me, just add a combination of the above code on the podfile.

Flutter 3.13.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e1e47221e8 (6 weeks ago) • 2023-08-22 21:43:18 -0700
Engine • revision b20183e040
Tools • Dart 3.1.0 • DevTools 2.25.0
Cocopods 1.13.0

@wdtheprovider
Copy link

Use the latest version of flutter_inappwebview. ie. flutter_inappwebview: ^5.8.0. They have fixed the issue in the latest version

This helped me

@tripura4u
Copy link

Please dont close this topic.

Team,

I am facing the same issue. Tried all the solutions, does not work

changed in Podfile - does not work
Editing the file - I am not able to save (tried with vim, nano, vscode xcode)
Is there anything else that can be done

@hammasali
Copy link

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.
Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

Please share a fix if the project has build configurations

I am facing this error
Screenshot 2023-10-10 at 1 09 11 PM

@erickyim
Copy link

Please dont close this topic.

Team,

I am facing the same issue. Tried all the solutions, does not work

changed in Podfile - does not work Editing the file - I am not able to save (tried with vim, nano, vscode xcode) Is there anything else that can be done

You need root permission, try sudo vim, or vscode (will prompt root permission when u save system files).

@zierka
Copy link

zierka commented Oct 10, 2023

Released new version 5.8.0 and 6.0.0-beta.25 with the fix!

This should fix this issue. Make sure to do a pod install in the ios folder after doing the pub get. If you get an error, do pod repo update first.

@hammasali
Copy link

Screenshot 2023-09-26 at 12 17 55
@currantdev Any Solution I am Stuck 😢 ?

Maybe you can try the following solution.
Append the following code to the end of the Podfile file (located in ios/Podfile) and run the "pod install" command.

post_integrate do |installer|
  compiler_flags_key = 'COMPILER_FLAGS'
  project_path = 'Pods/Pods.xcodeproj'

  project = Xcodeproj::Project.open(project_path)
  project.targets.each do |target|
    target.build_phases.each do |build_phase|
      if build_phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase)
        build_phase.files.each do |file|
          if !file.settings.nil? && file.settings.key?(compiler_flags_key)
            compiler_flags = file.settings[compiler_flags_key]
            file.settings[compiler_flags_key] = compiler_flags.gsub(/-DOS_OBJECT_USE_OBJC=0\s*/, '')
          end
        end
      end
    end
  end
  project.save()
end

Please share a fix if the project has build configurations

I am facing this error Screenshot 2023-10-10 at 1 09 11 PM

I fixed this by checking ENABLE_USER_SCRIPT_SANDBOXING to No in the project's build settings. It works perfectly,

webkit-commit-queue pushed a commit to whsieh/WebKit that referenced this issue Oct 16, 2023
…0` is set

https://bugs.webkit.org/show_bug.cgi?id=263156
rdar://114438852

Reviewed by Richard Robinson.

Before iOS 17 / macOS Sonoma, it was possible to pull in WebKit headers (directly, or through Swift
modules) when compiling without ObjC-backed OS objects, by specifying `-DOS_OBJECT_USE_OBJC=0` as a
build setting. Some popular libraries and plugins such as the `flutter_inappwebview` plugin (see
also: <pichillilorenzo/flutter_inappwebview#1735>) use this.

However, after we introduced the following public API in iOS 17:

```
@Property (nullable, nonatomic, copy) NSArray<nw_proxy_config_t> *proxyConfigurations;
```

...this became impossible, since `nw_proxy_config_t` would be type-defined to an opaque struct
pointer in `Network.framework`, which is invalid as a type template argument in an `NSArray`. To fix
this, we adopt the same technique used in `Network/NSURLSession+Network.h` and simply expose a
generically-typed `NSArray` in the case where `OS_OBJECT_USE_OBJC` is off.

* Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.h:

Canonical link: https://commits.webkit.org/269371@main
@olintosynergy
Copy link

olintosynergy commented Nov 22, 2023

Remember guys that every new xcode build (like latest beta 8) you have to made this change again. I recommend workaround 2, because its working each time. so Line 113 of file /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h

Change from: || ((TARGET_OS_IOS || TARGET_OS_MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170000) \ to: || ((TARGET_OS_IOS || TARGET_OS_MACCATALYST) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000) \

For me is Good!! Tks!

@erickyim
Copy link

erickyim commented Nov 22, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests