External hosts wildcard phonegap IOS - xcode

Hi all i'm almost ready to send my app to app store and a question came up!
In few words i call a remote php file via ajax and retrive infos from a database, in which i'll have some external link i would like to show in my app (like productors web sites).
The problem is: to let the user open the external links i have to put a * in my phonegap.plist externalhosts field. i would like to know if this will cause a reject from app store for my app

no you're fine, thats the way it has to be done for native apps as well. I have had apps get accepted that use the same thing. :)

Related

Firefox Extension - Database access

I want to make a Firefox extension that can store and retrieve data from a database. However I've only been finding solutions that would work locally for each user. I'd like every user to have access to the same database.
Is that possible?
It is possible to access remote SQL databases like MySQL and PostgreSQL with node.js modules, but it is more sensible to create REST API front ends to your databases and call them from the extension. Exposing the SQL calls directly in your web extension is not a good idea. It is basically bad security practice and will expose your database to hackers.
You will also need your addon to pass Mozilla's approval process if you are going to distribute publicly and I doubt the reviewers will be pleased to see raw SQL calls in your extension's code.
The more sensible way is to update the database is through a REST API front end.
A simple example on how to create a REST API for a Postgres database can be found at Node.js, Express.js, and PostgreSQL: CRUD REST API example - LogRocket Blog and this playlist show how to create a REST interface in a Firefox extension - Build a Firefox Extension from Scratch that integrates with Node.js - DEV Community
The above database example is quite simple. For real world use you will need a more advanced REST framework for your API which sanitizes the data before inserting it into the databasse. You have more reading to do here.
However if you need to make SQL calls directly from your extension which I still don't advise, you can include some packages from node.js in your web extension, and use browserify which extracts and packages the modules needed into your extension. Your addons though had better be for private or in-house use, not for public distribution.
Some nodejs modules for database access are - https://github.com/mysqljs/mysql, https://node-postgres.com/ and https://www.npmjs.com/package/pg.
Just a little advice. Feel free to ignore it if you have nothing to do with it. Your question sounds quiet generic. You should learn and doing it by yourself first and only ask here when there are specific issues you're stuck with.
By "locally", I think you mean via Web SQL or IndexedDB. They're called local database and their behaviors are totally different from what you're looking for.
I should haven't need to tell you to do this. Just in case. Of course first thing first you need to know how website is working for both front end and back end, not just local stuff, especially how they're communicating between each other. So you should know about HTTP request, Javascript, and AJAX.
What has it to do with Firefox extension?. Not just Firefox, browser extension is just another type of web page that overlaying the opened web page in all kind of browser. In Firefox the opened page is called activeTabs. The only difference from regular web page is you need to signup your account first, manifest.json file as your project root file, and it compile from command line with web-ext tools. In case if you're facing Cross-origin resource sharing (CORS) restriction, follow instructions HERE and allow the URL on server side.

Is it possible to redirect a mobile device user to m.example on Heroku?

I would like to have an app on Heroku, but if an user access www.example using a mobile device he would be redirected to m.example.
In this m.example I would have a website which is designed for mobile devices with a button "view the original website". Clicking there, we would see the www.example website.
Is there any way to do that on Heroku?
Thanks!
Edit: #RunscopeAPITools said Heroku itself is irrelevant to the problem and the important thing is the framework. I am developing with .NET and using MONO on Heroku, as described here .
According to the documentation: "It uses nginx as the web server and runs on Mono 3.2."
Edit2: After RunscopeAPITools, I started to get more infos about how to do that using nginx, I will test this link and post the results as soon as I can
Edit3: tried this approach by uploading a nginx.conf to Heroku. Nothing happened. Looking in Google I read that is it NOT possible to do that with a config file, only directly on my app. Now I am confused. Can I do that or can't I?

WP7: Is it possible to get a referrer from the installation page/link?

This question involves both programming and architectural subjects.
Firstly, sorry if it was asked previously, with other words or in another way. I just haven't found anything that matches with my issue.
Here we go. Supose that you have developed a WP app and uploaded it to Windows Store. Now supose you have a webpage named "any_dynamic_name_that_can_change.php" with a button that redirects you to your Windows Store app's page. And now, FROM THE APP (after you install it on your device), you want to know the page's name from where the Windows Store was accessed.
I've checked WP docummentations and I'm fully aware that WP SDK don't have any features that allow us to implement this behavior. In android SDK, one can make use of Referrer/BroadcastReceiver features to pass arguments through your page and Google Play. I've sussccesfuly made it in my Android's app version.
My question is: is there a solution to implement this "know-from" behavior? I don't care if it involves using third systems or saving arguments somewhere, or even if the solution is a "hard-to-do" task. I'm just looking for it, if it exists...
Any hints, comments and answers will be very welcome!
And sorry if my question wasn't well explained, or if it is too broad!
Unfortunately the Windows Phone Store does not provide this and has no way of providing the information that would be needed to implement this either.
The nearest thing you could do would be to look at the IP address of requests to the pages with the links and the first request from the app. Obviously there are lots of reasons why this wouldn't be a perfect solution but it may be better than nothing.
The only other solution would involve the person viewing the page(s) and the app to provide a unique identifier such as their credentials.
An alternative approach would be to track clicks on the individual pages. It wouldn't be able to tell you conversions once the person gets to the store but it could tell you which pages were the greatest drivers of people to your apps in the store.
There is a not so complex way to do that.
Requirements:
Register protocol handler into your app like myappname:// or similar.
The big flow for tracking installation referrer is:
1 - Redirect the user to your site into device system browser http://mysite.com/start_tracking
2 - in that page add cookie to keep track of source page
3 - then Redirect user to the windows phone market installation page
4 - ** INSTALLATION PROCESS ** (this register the protocol handler myappname://)
5 - On the first launch of your native app you need to open the system browser with http://mysite.com/referrer_2_app location, then sys browser send to your web server cookie information stored in step 2.
6 - Then your /referrer_2_app redirect the browser to myappname://cookievalue
7 - This automatically re-open your native app and .....
8 - You are able to read /cookivalue and close your tracking
Hope that this big picture is enough.
If someone need more details let me know.
Tobia

auto-filling website forms mac apps

I'm pretty new to the Mac SDK, but I can find my way around the basics easily enough. There is one thing I'm stumped on however: I am trying to make an app where it automatically goes into a webpage when it becomes available, e.g. for concert ticket sales and such. I have the app set up to accept the users' id and password, but how to I push that to the website and fill in the log in form?
Load the website into a WebView and use JavaScript to manipulate and submit the form:
- (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)script

Storage Options with Mozilla Addon-SDK

I am a newbie to Addon-SDK. I am making an Addon in which I log some information meant for manually viewing later on. I came across the
Simple-Storage API but as far as I could figure out, it saves the information internally in some format which can only be accessed via function calls i.e. "ss.storage.variable_name".
I was wondering if this information is accessible somehow from windows directory structure i.e. maybe from some file in the profile directory.
And secondly, is there any way to access the SQlite Database, or any third
party API?
(I don't know why but the cfx test for this API gives me errors, so not able
to use this).
You can try with localStorage of HTML5 via Javascript: http://www.w3schools.com/html/html5_webstorage.asp
And then with Store: https://developer.mozilla.org/es/docs/Storage

Resources