Recent

Author Topic: COCOA fpCEF3  (Read 6414 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
COCOA fpCEF3
« on: March 16, 2018, 11:29:03 am »
Hello guys, I need for my project to have a browser with access to the dom that is multiplatform. I saw the fpCef3 package, I followed the instructions, but it does not work. Has anyone managed to compile and use the DOMAccess example released with the fpCef3 package? Because I can compile but then I do not understand why it does not work. Thank you
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: COCOA fpCEF3
« Reply #1 on: March 16, 2018, 03:49:05 pm »
I need for my project to have a browser with access to the dom that is multiplatform.

Note that on Cocoa, you should be able to access any DOM element in a WebView, which is what TWebBrowser wraps on Cocoa and Qt4.

https://macpgmr.github.io

https://developer.apple.com/documentation/webkit/webview

http://doc.qt.io/qt-4.8/qwebview.html

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: COCOA fpCEF3
« Reply #2 on: March 16, 2018, 03:54:28 pm »
It would be nice to have an example in pascal. However for my project (real-time web whatsapp messaging log) it does not work. Because whatsapp web refuses connections from that type of browser. In fact I have already tried to use


https://macpgmr.github.io/MacXPlatform/lclwebbrowser-src.zip

And that's why I had opted for fpCef3 because chromium should accept it (because it accepts chrome)

Ideas or suggestions?
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: COCOA fpCEF3
« Reply #3 on: March 16, 2018, 04:01:10 pm »
Because whatsapp web refuses connections from that type of browser.

Don't know what you mean by that.

Ideas or suggestions?

Use this?

https://itunes.apple.com/us/app/whatsapp-desktop/id1147396723?mt=12

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: COCOA fpCEF3
« Reply #4 on: March 16, 2018, 04:24:07 pm »
Because whatsapp web refuses connections from that type of browser.

Don't know what you mean by that.


Whatsapp web checks which browser you are connecting to and the one used by the component is not recognized as valid.



Ideas or suggestions?

Use this?

https://itunes.apple.com/us/app/whatsapp-desktop/id1147396723?mt=12
No, I have to use a component that runs on lazarus like fpCef3.
I have to be able to interact with the DOM and extract the information I need.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: COCOA fpCEF3
« Reply #5 on: March 16, 2018, 04:44:40 pm »
Whatsapp web checks which browser you are connecting to and the one used by the component is not recognized as valid.
Maybe whatsapp wouldn't work with fpCEF3 either.
It is probably really picky about in what it runs (security wise).

You could try the original TWebBrowser and setting the useragent.
https://mobiforge.com/research-analysis/webviews-and-user-agent-strings

What symptoms do you see in TWebBrowser? Redirect to main page?
(This is for android but could describe the same problem: https://github.com/delight-im/Android-AdvancedWebView/issues/121)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: COCOA fpCEF3
« Reply #6 on: March 16, 2018, 06:09:10 pm »
Whatsapp web checks which browser you are connecting to and the one used by the component is not recognized as valid.
Maybe whatsapp wouldn't work with fpCEF3 either.
It is probably really picky about in what it runs (security wise).

You could try the original TWebBrowser and setting the useragent.
https://mobiforge.com/research-analysis/webviews-and-user-agent-strings

What symptoms do you see in TWebBrowser? Redirect to main page?
(This is for android but could describe the same problem: https://github.com/delight-im/Android-AdvancedWebView/issues/121)

View image
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: COCOA fpCEF3
« Reply #7 on: March 16, 2018, 06:21:08 pm »
I know the TWebBrowser on Windows just runs IE but in an older emulation (IE 7). That's why Whatsapp on Windows will complain that you need to update. You can run the TWebBrowser in an updates version so it all works. (Search for FEATURE_BROWSER_EMULATION)

I'm not sure if it's something similar on MacOs.

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: COCOA fpCEF3
« Reply #8 on: March 16, 2018, 06:25:15 pm »
Ok, since I do not know the component you tell me, can you just give me a little example that works on windows? I'll try to make it suffice, and I'll have to work with the dom.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: COCOA fpCEF3
« Reply #9 on: March 16, 2018, 06:41:41 pm »
Ok, since I do not know the component you tell me, can you just give me a little example that works on windows? I'll try to make it suffice, and I'll have to work with the dom.
I don't think TWebBrowser works on Windows yet.

I was talking generally about the TWebBrowser in Delphi.

(fpCEF3 uses Chromium so you should be able to get that to work. What instructions did you follow?)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: COCOA fpCEF3
« Reply #10 on: March 16, 2018, 07:10:37 pm »
Ok, since I do not know the component you tell me, can you just give me a little example that works on windows? I'll try to make it suffice, and I'll have to work with the dom.
I don't think TWebBrowser works on Windows yet.

I was talking generally about the TWebBrowser in Delphi.

(fpCEF3 uses Chromium so you should be able to get that to work. What instructions did you follow?)

This: http://wiki.freepascal.org/fpCEF3
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

rvk

  • Hero Member
  • *****
  • Posts: 6111
Re: COCOA fpCEF3
« Reply #11 on: March 16, 2018, 09:41:22 pm »
What is the problem you have with cpCEF3?

(You do need to have the correct CEF3 version. It is really picky about that)

I also just tested the Web-version of Whatsapp and it's working in that.

Note: With the files from the folder release and resources from cef_binary_3.3029.1619.geeeb5d7_windows64.tar.bz2 in your exe directory.
« Last Edit: March 16, 2018, 09:44:25 pm by rvk »

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: COCOA fpCEF3
« Reply #12 on: March 17, 2018, 11:13:22 am »
Actually on 64-bit windows as you say it works. I would just like to understand why on mac64 bit with cocoa and the same version of the cef does not work.
No one who has a mac can try to compile and run the DOMAccess example?
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018