I am working on a survey engine for the iPhone. We use a declarative xml format that can be downloaded post store install. It's working pretty well but not being able to script is becoming problematic. I have this idea to use a webView to execute javascript code to provide this functionality.
My question is will this run afoul of Apple's rule of not downloading executable script code? They do seem to allow for downloading of JS code that will run in a web view. Would they consider this approach an abuse of this rule?
Thanks
I don't think so. A lot of native applications are actually built this way. They simply open a webview and load a web page, with all the logic done in javascript.
Related
My searches have turned up nothing concrete. My extension uses Google's file picker to allow the user to browse their sheets and choose a desired file to write some data to, which manifest v3 breaks because of some GAPI limitations. Unless I've missed something obvious, there does not seem to be a simple workaround or method for this to migrate to v3 -- it just seems to be disallowed.
I'm not asking if there's a way to do something that they intend to not be possible (even though I doubt such a thing would exist with Google) but I'm optimistically hoping that maybe there is some hacky/annoying workaround that still fits within their rules. If I absolutely have to just allow them to set a sheet URL manually I will...I'm just trying to avoid it.
Any tips or suggestions would be appreciated.
You may have to test it yourself to make sure there are no weird behaviors, but Google has some recommendations regarding this in their migration guide:
In Manifest V3, all of your extension's logic must be included in the extension. You can no longer load and execute a remotely hosted file. A number of alternative approaches are available, depending on your use case and the reason for remote hosting. Here are approaches to consider:
Configuration-driven features and logic
In this approach, your extension loads a remote configuration (for example a JSON file) at runtime and caches the configuration locally. The extension then uses this cached configuration to decide which features to enable.
Externalize logic with a remote service
Consider migrating application logic from the extension to a remote web service that your extension can call. (Essentially a form of message passing.) This provides you the ability to keep code private and change the code on demand while avoiding the extra overhead of resubmitting to the Chrome Web Store.
Bundle third-party libraries
If you are using a popular framework like React or Bootstrap, you can download the minified files, add them to your project and import them locally.
For your case, option #3 seems like the easiest. Looking at the Google Picker API documentation it only uses two relatively small script files, https://apis.google.com/js/api.js and https://accounts.google.com/gsi/client. You could try to bundle these in your Chrome extension and call the methods locally.
I am aware of the Pyppeteer library and Pyppeteer Stealth, but the problem with them is that the website that I am trying to scrape information from detects Pyppeteer Stealth (Python transplant of Puppetteer) and blocks it. The original Puppetteer Stealth used on node JS does work fine on that website, however, I would much rather create this scraper on Python since I am much more familiar with it.
Which other stealthy and up to date headless browser automation tools are available?
All I will need it for is grabbing the HTML content and parsing it through Beautiful Soup. Unfortunately, the requests and requests-html library also do not work on this website.
If you don't care about the automation part of the software that much I would just recommend looking into Scrapy (and Scrapy Splash if you need js to be rendered which is why I assume you want to use Pyppeteer in the first place) combined with the use of some basic tactics to not get caught as a bot such as user-agent rotation and proxy rotation.
This is the tactic I am using too to make a scraper for similarweb.com at the moment.
I have read some posts on S/O and also around the web. We are producing a HTML5 JS based web app that runs on the web. We are packaging it up for Google apps, and also for phonegap.
Can we package this app for windows 8? Of course, I appreciate it won't use the windows 8 features. But, will the app run none the less, as it stands. So that we can place it in the store and build out windows 8 features as we move forward.
I appreciate this is a slightly non-concise question, but I guess the real point is what is our quickest route to take our existing HTML 5, CSS, JS App and deploy it in the store and get it working on this platform.
In general, the answer is yes. The transition is not seamless, but you will be able to use a ton, if not all, of the application artifacts in Win8. A good test is if you can run it in IE10, you can run the app as a Win8 app. Again, this is a very broad brush - things you need to worry about are things like all scripts files need to be local (no CDN), changes to web and security contexts, and the fact that Win8 is a horizontal paradigm whereas most web apps are vertical. But in general, you should be able to make the move. Usual caveat - your mileage will vary.
Yes, although not recommended, you can package your existing app for Win8. You'll need to add a few bits of code though. The minimum would be to embed your app's start/init code within WinJS's first promise callback, like so:
args.setPromise(WinJS.UI.processAll().then(function () {
// your init code
}
You'll also need to create a couple of icons for the start screen and an image for your app's launch screen.
It is possible that you'll run into a few issues, like some security related restrictions, where you'll have to modify your code to use some native WinJS functions. This all depends on you app's implementation.
You can also check Microsoft's guidelines for migrating a web app to win8, here: http://msdn.microsoft.com/en-us/library/windows/apps/hh465143
I am looking for a simple desktop application shell to display an HTML and Javascript application. The web code will be bundled with the app and the app won't need network access. Basically all I need is a window with a webkit view in it I can point to a file on the user's computer.
I thought this would be simple, but I can't find a quick solution to it. What I have looked at so far:
Adobe Air - Fails due to some crazy security choices that break my web framework.
Titanium Desktop - Fails due to some strange page loading sequences that result in dom weirdness.
Chromeless - Looks perfect but discontinued and their download code no longer works.
PhoneGap - No desktop component.
XULRunner - Looks very complex for my needs.
Various others - not cross-platform (I need Windows and Mac), discontinued.
All I want is a simple shell around to display my HTML and run my JS. Please tell me my only solution isn't to use the WebKit view in something like Qt.
Thank you!
See this: http://code.google.com/p/chromiumembedded/
There are also bindings for using this from other languages like Python.
AppJS have served me well in creating desktop shells for html5 apps. I think you should give it a try. It's quite easy to tinker with.
I'm writing mobile apps with the help of Appcelerator's Titanium Mobile.
I need to load javascript code (business logic) from our server and execute it on the device. So this is basically dynamically injecting code into Titanium Mobile app. Additional note: this code needs to call a few Titanium's methods.
Can this be done?
Thanks, Peter
Yes this can be done. You can't put this application in the App store as it's against their Terms of Service to download code remotely and execute it.
There are examples in the Kitchen Sink on downloading a file remotely and saving it. That file can be a .js file, and can be included or referenced when your app loads. It can have JSON, functions, whatever in it.
I'm doing this in an app right now for moving JSON objects around, but should be able to run code too.
http://developer.appcelerator.com/question/105001/httpstackoverflowcomquestions4802859titanium-mobile-execute-code-loaded-from-network#185361