Code Monkey home page Code Monkey logo

topee's People

Contributors

dependabot[bot] avatar ikavast avatar kroleg avatar maio avatar pavelstudeny avatar petrmacal avatar tiff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

topee's Issues

Incompatible Swift version 5.1.3 ?

Tried 2.2.0 for Swift 5.1.2, but it failed on 5.1.3

*** Downloading topee.framework binary at "swift 5.1.2"
***  Skipped installing topee.framework binary due to the error:
	"Incompatible Swift version - framework was built with 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9) and the local version is 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)."

    Falling back to building from the source
*** Skipped building topee due to the error:
Dependency "topee" has no shared framework schemes

Demo works form XCODE only

Hi! I'm sorry if I misunderstood something.
I can run the demo extension from XCODE with appex target.
I try to start it with Demo target (Xcode builds and ran Demo.app), then I open Safari (12 or 13), go to preferences and enable the extension. Safari adds the extension icon and immediately removes it. Is it possible to run topee extension not form XCODE with appex target?
Thanks. Sorry again if it is not an issue.

Framework was built with 4.2.1 Error Skipped

"Incompatible Swift version - framework was built with 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) and the local version is 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)."

Using Carthage Version: 0.34.0

Webview is not initializing

I’ve started Demo Extension successfully. All Tests passed. Trying to integrate Topee framework to our blank extension, and we have a trouble - looks like background scripts do not inject successfully. The Webview has started, but on page about blank. No parameters get passed to web view… Do you have any idea what are we doing wrong?

`carthage update` failing

I'm trying to follow the README instructions for using topee, and not getting very far. I haven't used Carthage before, but I think this should be working:

$ cat Cartfile
github https://github.com/avast/topee ~> 0.0.0

$ carthage update
Parse error: expected string after dependency type in line: github https://github.com/avast/topee ~> 0.0.0

[...add quotation marks...]

cat Cartfile
github "https://github.com/avast/topee" ~> 0.0.0

$ carthage update
*** Cloning topee
*** Checking out topee at "v0.0.7"
*** xcodebuild output can be found in /var/folders/m5/9r6jj7g57z5gkl_7441qzk440000gn/T/carthage-xcodebuild.LVjL6c.log
*** Downloading topee.framework binary at "Builds Topee using Xcode10"
***  Skipped installing topee.framework binary due to the error:
	"Incompatible Swift version - framework was built with 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1) and the local version is 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1)."

    Falling back to building from the source
*** Skipped building topee due to the error:
Dependency "topee" has no shared framework schemes

If you believe this to be an error, please file an issue with the maintainers at https://github.com/avast/topee/issues/new

[...do some googling...]

$ carthage update --no-use-binaries
*** Fetching topee
*** Checking out topee at "v0.0.7"
*** xcodebuild output can be found in /var/folders/m5/9r6jj7g57z5gkl_7441qzk440000gn/T/carthage-xcodebuild.z7BVLE.log
*** Skipped building topee due to the error:
Dependency "topee" has no shared framework schemes

If you believe this to be an error, please file an issue with the maintainers at https://github.com/avast/topee/issues/new

I have tried this in both a "Safari Extension App" new project and plain Cocoa app new project, with the same results.

I'm not sure what to try next (except forking and building on your demo app).

Adding Topee framework is not working

Hey I just came across this project since I want to get an already existing chrome extension to safari. I followed the instructions but unfortunately adding the Topee framework does not work.
Either I get an error in the SafariExtensionHandler.swift that Topee is not a module or some errors due to multiple target command.
I have Xcode 11.2.1 maybe something changed in the setup and how to link frameworks? The screenshots in the readmes do look a bit different compared to my version of Xcode.

Carthage Swift Version Incompatibility

I'm getting this error when trying to install it, it's clearly an issue with my Swift version, but being completely new to xcode, would you be able to help me get around it? Is there a way to run this with incompatible versions, do I need to install a previous xcode version to have the right swift to use this framework?

Thank you

Skipped installing topee.framework binary due to the error:
"Incompatible Swift version - framework was built with 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) and the local version is 5.3 (swiftlang-1200.0.28.1 clang-1200.0.30.1)."

Falling back to building from the source

*** Skipped building topee due to the error:
Dependency "topee" has no shared framework schemes

If you believe this to be an error, please file an issue with the maintainers at https://github.com/avast/topee/issues/new

Can't bootstrap due to incompatible Swift versions

Hi

I'm getting an incompatible Swift version with the latest version of XCode.

carthage bootstrap                  
*** Checking out topee at "v1.5.1"
*** xcodebuild output can be found in /var/folders/tc/p5gt0fqs2jv8qtr80m3xl8rh0000gn/T/carthage-xcodebuild.zozKmp.log
*** Downloading topee.framework binary at "chrome.tabs.update improvement"
***  Skipped installing topee.framework binary due to the error:
	"Incompatible Swift version - framework was built with 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) and the local version is 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)."

    Falling back to building from the source
*** Skipped building topee due to the error:
Dependency "topee" has no shared framework schemes

If you believe this to be an error, please file an issue with the maintainers at https://github.com/avast/topee/issues/new

If I pass --no-use-binaries I get

carthage bootstrap --no-use-binaries
*** Checking out topee at "v1.5.1"
*** xcodebuild output can be found in /var/folders/tc/p5gt0fqs2jv8qtr80m3xl8rh0000gn/T/carthage-xcodebuild.xRA3he.log
*** Skipped building topee due to the error:
Dependency "topee" has no shared framework schemes

Compute a proper user agent at runtime

Currently we are hard-coding the user agent string because we were unsuccessful at determining the Safari and the WebKit versions at runtime. It would be great if we could figure out a way of retrieving these values at runtime.

Unable to get content and background to communicate

I'm going to details what I did, as there are a few problems I encountered...

  1. Create a new Safari App Extension project. (Calling it "MySAE".) Use Swift.

  2. Run the default code in Safari. (Visiting webkit.org so that it activates.) Everything looks fine. (Except for a log line with "Unable to load Info.plist exceptions (eGPUOverrides)". I did some research and it seems to not matter.)

  3. Create a Cartfile per the README; call carthage update. Seems successful.

  4. Add Topee.framework to the extension's "Linked Frameworks and Libraries".

  5. Try to run again. SIGABRT with this log:

    dyld: Library not loaded: @rpath/Topee.framework/Versions/A/Topee
      Referenced from: /Users/adam/Library/Developer/Xcode/DerivedData/MySAE-hcmmxabcnthfdsgpzehstqofyumr/Build/Products/Debug/MySAE.app/Contents/PlugIns/MySAE Extension.appex/Contents/MacOS/MySAE Extension
      Reason: image not found
    
  6. Do some googling. Add Topee.framework to the app's (not extension's) "Embedded Binaries", which also adds it to the "Linked Frameworks and Libraries". Run again. Works.

  7. Add topee-content.js as a resource (Build Phases / Copy Bundle Resources), and set it as the first script under SFSafariContentScript in the extension's Info.plist.

  8. Change SafariExtensionHandler subclass to TopeeSafariExtensionHandler. (And add import Topee.)

  9. Add TopeeSafariBackgroundScript to plist, with empty array.

  10. Run again. Seems to work, but this message appears: "MySAE Extension[9201:55667] Backgrounds scripts are taking too long to load. Check files for possible errors". (This message is why I created a fresh project and documented it.)

  11. Create an empty background.js; add it as a resource; add it to TopeeSafariBackgroundScript.

  12. Run. Same result. (The "taking too long" message is there for all following tests as well.)

  13. Add a console.log call to background.js. Run. Log message does not appear in Xcode console.

  14. Add entitlement for com.apple.security.network.client to the extension. (This is present in the topee demo.) Run. Log message does appear in Xcode console.

  15. Add the ping/pong code from the demo into the content and background scripts. So they look like this:

    script.js:

    console.log('ADDING LISTENER');
    chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
      console.log('got', JSON.stringify(message), 'from the background');
      if (message.type === 'ping') {
        sendResponse('content pong #' + message.value);
        return;
      }
    });
    
    console.log('SENDING MESSAGE');
    chrome.runtime.sendMessage({
      type: 'ping',
      value: 1
    }, console.log.bind(console, 'first'));
    

    background.js:

    console.log('ADDING LISTENER TO BACKGROUND');
    var bgPingCount = 0;
    chrome.runtime.onMessage.addListener(function (message, sender, sendResponse) {
      console.log('GOT MESSAGE', message);
      if (message.type.indexOf('ping') != -1) {
        sendResponse("background pong #" + message.value);
    
        setTimeout(function () {
          chrome.tabs.sendMessage(sender.tab.id, {
            type: 'ping',
            value: ++bgPingCount
          }, {
            frameId: sender.frameId
          }, function (response) {
            console.log(response);
          })
        }, 200);
      }
    });
    
  16. Run. In the browser console, the "ADDING LISTENER" and "SENDING MESSAGE" logs appear, but not the "got" log. In the Xcode console, the "ADDING LISTENER TO BACKGROUND" log appears, but not "GOT MESSAGE". Setting breakpoints in the browser tells the same story: no response is received from the extension background.

That's as far as I got. I can't get the content and background scripts talking, so there's not much else I can do. I hope someone has some insight.

If you just skimmed the above list, there are a few problem places: steps 6, 10, 14, 16.

chrome.tabs.create returns a wrong tab to callback

  1. I call chrome.tabs.create({ url: 'some url', active: true }, (tab) => {// some code here})
  2. tab in callback is the tab which was active before create method calling.
    Expected result
    tab has to be just created tab.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.