[Tip] Dynamic URL Redirection

Here’s a little tip I thought I’d share with you, especially useful for the App Store, where updates can take awhile to be approved.

To be on the safe side, any static link I include in any app is actually a redirect link hosted on my website in case I ever need to change it without releasing an update. The wordpress plugin I use to accomplish this is called Redirection, http://urbangiraffe.com/plugins/redirection/, it’s free.

For example, instead of coding the link to rate my app on the App Store if Apple is the store target, I code this link:

http://swiftscales.com/applefull/

which is a redirect I setup in the plugin, which at the moment points to:

https://itunes.apple.com/app/swiftscales-vocal-trainer/id1079277628

I find this better than using free URL shorteners, because not only can you track the link’s traffic, you can change the target of the URL whenever you need. For example, maybe I’d like my redirect at /applefull/ to use the direct App Store format instead:

itms-apps://itunes.apple.com/app/id1079277628

I promise you, this already came in handy, and my app hasn’t been live but a week. There are certainly other ways to do this, but this method requires virtually no thought/effort which is a plus.

Hope this helps someone!

Great suggestion!

very good tip! grats!

all my links/texts are in a remote database, if i need to change something, i just go to the database and change it, my code detects if the field was changed if it was, gets the new content, no need to update the app also :slight_smile:

but to someone that don’t use databases this is a very good tip :wink:

No problem, I use a database for other data, I just really liked the simple built-in tracking and zero setup of the plugin for URLs. So you store all of your text assets in your db too? Does our app have a polling interval to check for updated strings, or do you just check every app start?

wow, i really though i already answer to you, but i guess i didn’t sorry about that.

i store 99.9% of all assets in a database. i store, all texts, error messages, warnings, normal  menus texts, etc. i usually do multilanguage apps, puting all text in a database simplify my work a lot. all images links also. the only image is on the app it self, is the loading image when app starts for the first time. i will check if device have internet if it have it will download all assets needed for the app run smoth, if not it will warn the user to try again later when he have internet. this only happens for the first time. all the other times, if there isn’t internet it will start in offline content previews downloaded. i will also copy the db structure and all content from the remote server, when first lauch the app, even if the user have internet, it will use always the offline content if possible. only in areas that it needs realtime date i will go to internet.

for checking if database have new info, i’ve a table with all dates of last update of each table on the database, i compare it with the offline version, if there is any change i will download the new info only for the new tables.

Great suggestion!

very good tip! grats!

all my links/texts are in a remote database, if i need to change something, i just go to the database and change it, my code detects if the field was changed if it was, gets the new content, no need to update the app also :slight_smile:

but to someone that don’t use databases this is a very good tip :wink:

No problem, I use a database for other data, I just really liked the simple built-in tracking and zero setup of the plugin for URLs. So you store all of your text assets in your db too? Does our app have a polling interval to check for updated strings, or do you just check every app start?

wow, i really though i already answer to you, but i guess i didn’t sorry about that.

i store 99.9% of all assets in a database. i store, all texts, error messages, warnings, normal  menus texts, etc. i usually do multilanguage apps, puting all text in a database simplify my work a lot. all images links also. the only image is on the app it self, is the loading image when app starts for the first time. i will check if device have internet if it have it will download all assets needed for the app run smoth, if not it will warn the user to try again later when he have internet. this only happens for the first time. all the other times, if there isn’t internet it will start in offline content previews downloaded. i will also copy the db structure and all content from the remote server, when first lauch the app, even if the user have internet, it will use always the offline content if possible. only in areas that it needs realtime date i will go to internet.

for checking if database have new info, i’ve a table with all dates of last update of each table on the database, i compare it with the offline version, if there is any change i will download the new info only for the new tables.