iOS phonegap app built mainly on AJAX calls - ios

I am thinking about architecture of my new iOS app. I don't know how much of the parts of the app build as native parts of the app and how much dynamically loaded via AJAX calls.
For example admin area. I can create all the admin area as native part and load only data via AJAX. But If I want to add another form field later I will have to publish update of the application. I can avoid this by loading all the admin area via AJAX calls (not only data but also HTML structure). It would be very flexible. But it would increase amount of transferred data and I don't know if this is acceptable for Apple.
Is this structure of highly AJAX called app okey for Apple?
Thanks.

I think you don't need worry because my app has same structure than you, it loads some data via AJAX and I had no problems on App Store.

You actually can build an app like so, but this would result in a higher download for your users later on.
I agree that building an app in that way might be a solution to stop going past Apple for every update.
Kind regards,

Related

Is there any way to migrate data from CloudKit?

I'd like to build a simple iOS only app that's going to be social. I don't yet have a way to monetize this app, so I'd like to keep this project as cheap as possible. Since it's iOS only, I figured I would use CloudKit because of its very generous free tier. However, if I ever decided to make this a cross platform app, would I be able to migrate my user data somewhere else?
I think you can use CloudKit with Android because of the CloudKit JS implementation. The real problem is, that I think that also the android user needs an iCloud Account do something with that.
So maybe the better way is to use google firebase.
https://firebase.google.com
As of December 2019, there is no simple way to migrate data from CloudKit. The data stored in each user's private data base is not accessible by the developer.
There is always the option to do this inside of the app for each individual user. If the data is not too large and complicated it should be easily done.
But make sure to inform the user and give them a choice to move or don't move the data. Let both services run for some time parallel before removing the cloudkit option for old users completely. Obviously moving data using the app can cause certain issues if the move doesn't go as planned.

Anonymous contact form iOS app

I currently work at a school and have an idea to create an app that allows students to contact a grown up (for example, the principle) anonymously through an app. The app would quite simply consist of a contact form. I am trying to find out the best, and easiest way to achieve this without setting up servers with a separate API. Does anyone have a suggestion on how to achieve it? Is there any way to set up an e-mail form with a pre set recipient and a built in sender-account? Please guide me in the right direction.
You would need to implement an SMTP client. You can use open source code like skpsmtpmessage
It's likely that their example app could be your solution.
Your biggest problem will be the deployment. You definitely need to pay an $99/y developer account and add all the students device ID's to your account (with a maximum of 100 devices/y) or register all of them as beta tester (I don't know the limitations).
Probably this isn't doable so easily, as it seems you don't have iOS developing experience so far. Maybe you can find something on the app store that works with self hosted databases. But you definitely need to host some kind of webApp/API.
You may want to give Appygram a try to handle the back-end if you are able to set up the contact form itself. While it's a separate hosted API, at least you don't have to build/manage it.
Appygram is a free web service that would allow you to configure all the details such as which adults could be contacted, their point(s) of contact (i.e. email address), and it would process and send all the submissions for you. All your app needs to do is send a form post request.
A nice thing about having this information outside of the iOS app itself is that you can change the contact details on the fly without requiring an update to the iOS app itself. Whether you use Appygram (which, since I contribute to it, I am slightly biased toward!) or something similar, I would say that since this is for students, I would recommend a solution that would allow you to update your configuration without requiring app updates.
Finally, I'd second what Julian said. The challenge here could be with deployment. One possible alternative would be to make this a mobile-friendly web page accessible only via student login or on the school network (or both). Would probably be easier development-wise and wouldn't require installs nor the hurdles that Julian described with device registration, etc. And, Appygram would still work with this setup as well.
Good luck!

Is it possible for dynamic branding of the application

I have the application that will connect to different servers. Each server is like different client and I want my app to look different (as far as I can) depending on which server it is connected to. I thought that I can have a ZIP that on handshake will be returned from destination server and use details from it e.g. Images, settings etc.
Is it possible, if so what is the limit?
Edit
I'm thinking about the images for logo etc. and some color lists that I can then use with fallback to defaults.
You can make all resources (images, string files, NIBs, storyboard...) be downloaded from the client server.
Also, there are several project developed exactly for dynamic design using CSS-like mechanisms:
http://www.pixate.com
http://www.freestyle.org
https://github.com/robertwijas/UISS
https://github.com/tombenner/nui
There are some project to run Javascript as well. This may allow you customise some business logic.
http://www.bignerdranch.com/blog/javascriptcore-example/
https://github.com/kishikawakatsumi/JavaScriptBridge
So, yes. It's possible, but you'll find some limitation, like the root view controller, the app delegate, etc.. You'll have to be creative.
I've never done something similar, so I can help any further then this.
It's possible for almost all elements of the application except:
Application name
Application icons
Application splash
screens
Those 3 items are bundled into application and can't be changed in runtime.
Rest of the items have so called appearance selectors that can be used to implement dynamic branding.
It is definitely possible, as I have worked on an App like this myself. We did it basically the same way you described. On startup the user selects a server to connect to and we download a zip file that contains all the assets for that client. After the download, the UI is loaded with the custom images. You can customize any UI element the system lets you, which is pretty much everything, except for minor details like the system StatusBar. You're gonna need some helper classes that make your life easier and support methods like, for example, [UIButton themedButtonWithImage:].
Well, it's possible — in one extreme, you could have an app which consists entirely of a UIWebView (plus some mechanism for selecting which server the app is talking to) that gets almost all it's content from the server.
There are performance considerations if you do (internet connection reliability, cost, and speed), and Apple may object to certain things being done on any app distributed through the app store, but assuming you follow their guidelines or distribute outside the store, the only limits that I know of are the app icon, the startup screen, and the app identifier, which have to be included in the bundle.

update iOS app remotely without review process

What are the thing we can add it to remote server that on further after app is on app store if there is any changes in app it does not require to follow the whole submission and review process ?
Please give your suggestion to make app maximum updatable without review process.
You can download data, which would include new graphical elements.
The guidelines say, "Apps that download code in any way or form will be rejected". However, apps that use HTML and Javascript for some of their logic are typically able to replace those.
Perhaps you would get better answers by starting with a list of the things you'd like to be able to change and see if there are ways to accomplish them.

Storing data locally or just using ajax on mobile devices? - appcelerator

Currently I'm building a few mobile apps (currently on iOS but later on Android)that retrieve information via ajax calls (returning JSON) from a Ruby on Rails application. This obviously applies to other applications as well that are using another source to return the JSON data.
The main question is WHEN to store the data and when to just use ajax calls to retrieve it. Currently, my apps do not store a single thing locally and instead require ajax calls for all data. I think for this example we can use the Twitter mobile app, which is one a lot of people are familiar with and has a lot of functionality that I'm wondering how they do it (more logically than technically).
Questions:
1) When you log in the first thing you see is a list of all of the items in your stream. That list is available offline. Does that mean that when you originally signed in, Twitter already went and pulled all of your last X (100?) stream items into a local database and then future views just pull it from there?
2) If you then put your phone on airplane mode (or just shut off mobile data) and click one of those tweets, it opens up the tweet page with all of that data. So now, it looks like they aren't pulling that information in via individually each time you visit a tweet page (which is what my app currently does and takes some time to load that data in and create the views). Does it make sense that they are probably just using the same information that they pulled in when creating your stream items?
3) Users. Is it better practice to (when viewing a users "profile" page for example) store a users data locally and then refresh on future visits, or just do pull in all of the data via ajax each time? In theory each requires an ajax call...
I think those are my main questions for now. If anyone has any thoughts on any of those things (or any other insights into mobile storage) that would be great! If anyone needs screenshots of anything I referenced please let me know and I'd be happy to get those for you.
Currently using:
Titanium Appcelerator for iOS
Ruby on Rails for Backend and remote storage
Ok firstly there is a difference between local storage and device cache.
Mobile phones cache a lot of data so that it doesn't have to be requested each time using up your data plans. Its the same idea when you open a page on safari, go to home screen and go back into safari its still there. This wasn't saved locally its just been cached by IOS.
When you should use local storage is when the data never changes, using twitter as an example like you have, on first start up it downloads your current activity, if one of those contains a link then it will generate a new request, if you have turned off cellular data and still been able to click a link, this is not because twitter has stored it locally but because IOS has cached it temporarily to avoid downloading multiple times. twitter may very well store some of you activity locally, but at least from what I've seen it stores a maximum limit of them starting with most recent, it downloads the rest frequently.
generally speaking if the data is based on the web its fine to use ajax calls, that is what most do, local storage is when the data is only created / viewed on the device (like an app for taking down notes). If you wish to provide local storage so that someone can view there activity offline, great but this is a feature not a requirement.
Most people would only start thinking about this if users frequently request the same data over and over and its not going to change often, then you would need to develop a last modified system, where you send an ajax call to see is there anything new, if not read from local. If the data is dynamic and subject to change often, stick with the ajax calls

Resources