Update iOS application silently (programmatically) - ios

I'm developing application for in-house distribution (so there can't be rejection from Apple).
As I'll distribute my app using Enterprise distribution, I'm missing one of key features of AppStore - Auto/Manual updates. (I know, that I can show popup users to update application)
Also I know, that application can download dynamic framework with code, and also can download bundle with resources.
So my question: How can I download storyboard (compiled to nib) from remote host, and load it into project?
Or is there anyway to make something like Sparkle.framework on OSX, which will update all the bundle of my app?

You can't update it silently and automatically but you can ditribuite with TestFlight or similar services. Crashlytics present an alert to update if a new version is available (and then use itms-services) .
You can even use itms-services yourself and build your own distribution system if you like.

Take a look at Artisan. They allow you to build portions of your app on their web interface and dynamically swap out views and workflow. It is generally used for A/B testing but could be used for your purposes too. This way you could change significant elements of your app without needing people to update anything. You can even setup different views for different groups of people, and again, all after application launch.
It is also free for <10,000 users, which I am assuming would not be an issue for an enterprise application.

Related

New requirements for iOS app - keep them accessible to users/customers

I got an email from Apple that apps now require iOS13 + storyboard for app launch screen for existing apps. (I do not use storyboard for main app functionality)
I have developed a couple swift1/swift2 based for schools a long time ago. (Still works well)
Can I somehow ditch the app store and then provide direct access or download for school pupils?
i.e. is there any way forward to simple keep the apps-as-they-are? Maybe limited download availability?
Or will I have to take plunge back into app-building?
The requirement of a Storyboard launch screen is only when you need to submit an app update. If you are not wanting to update your app any more, then it won’t stop working because of this new requirement.
Regarding distribution outside of the App Store, you could use Adhoc distribution which requires you to know the device ID’s of the devices you want to install it to.

How to auto-update apps managed by MDM?

I'm building an in-house app that is distributed via the AirWatch app catalog. The app always runs with Guided Access enabled and all devices running it are managed by AirWatch. My questions are regarding auto-update:
Is there a way that AirWatch can force the update immediately or as soon as the device comes back online, without asking for the user's input? If so, how does the app being open affect this behavior? How does guided access being enabled affect this behavior?
Is there a link from AirWatch, perhaps an itms-services:// link, that the app can call to install the new version if a web service had indicated that it's no longer the latest version? If so, how does Guided Access being enabled affect this behavior?
Is there any other good model for remotely updating the app that will spread the update as quickly as possible and under the above conditions? The solution can be using MDM or a custom web service or both combined.
Thanks a lot for your help!!
If your devices are running iOS7 and you have your app Deployment settings set to "Auto" (as opposed to "On-Demand") the device will automatically take the update once it processes the APNs notification to do so. If the device is locked/offline it will typically check for outstanding APNs messages within a minute or so of being unlocked or coming back online.
What I don't know is since your app is in guided access mode if you're receiving a pop-up to install the new version. I've seen previously where if the app that requires an update is open iOS will prompt. What we have done to battle this is embed a check in the app that phones home to see if the app is current. If the app is NOT current the user can't do anything until they update their app.
Regarding a direct-link to the App Catalog to update the app that might get tricky with guided access enabled. Before you even try to tackle that issue understand that the app catalog webclip URL contains the UDID of the device as of AW7.1 (I think). Since the UDID is no longer programmatically accessible code-side AirWatch allows you to push the UDID upon app installation in the Deployment/Application Configuration section. You can embed {DeviceUid} into the key share on the device which will make it accessible for that applciation, hence allowing you to create the appropriate App Store URL within your app.
Good luck
honestly I didn't work with AirWatch. But I don't think that Apple provides a way for automatic update of ad-hoc or enterprise apps.
Well, I can describe a solution for an enterprise app I developed last year. Hope it will help you somehow.
First of all, I made it as a part of our secure website. (a little test flight)
Here's how app update works
When the app launches it sends special request to a server asking if
it is outdated and a new app version is available. (+ servers sends
url for new version installation (with itms-services://))
Then
if update is required, app fires alert with description of new
version, if user taps update, the app opens Safari where the user
is able to install a new version.
We made to different kinds of alert, optional (minor version change) and compulsory(major version change). With later variant user is unable to get rid of alert view, so he has to update the app.
You can update your internal app through the AirWatch Console and applications versioning.
I never used it but I imagine that at the end of the new version process, there is a way to push the updated app to the related devices. If the Push Mode is set to Auto, the user won't have to do anything and the app should be updated. If it is On Demand, the use will have to initiate the process from the App Catalog. From for the latest option, you have the solution to send a notification to the user.
It is also possible to retire or inactivate older versions to only keep the newest one.
If you have access to AirWatch Online Documentation, I recommend you the page Using Add Version for Applications. If you don't, contact your administrator and ask for all the pages located in Mobile Application Management -> Internal Applications and the page Using Add Version for Applications.
You should try it with a single device though ;)

iOS App Store updates - Patching?

When submitting an update to an app to the app store (via iTunes Connect?), is the update necessarily a whole binary? Can an update come in the form of a patch? If a second version of an app shares a lot of assets and logic from the previous version, does all that logic/resources get reinstalled wholly regardless?
There are no patches. It's installed as an entire read-only bundle. The old bundle is replaced with the new bundle.
Application data is retained (ie. documents folder, NSUserDefaults).
As everyone said before me Apple does not supply a way to hot-patch native apps, moreover it has a clear restriction - "No remote code injection".
The only thing I can add is that hybrid apps which use a javascript platform allow you to remotely replace the JS file, so you can actually change functionality remotely.(without having to release a new version) other solutions I have seen are in the gray area and allow you to run Lua Script remotely to change app functionality.
We # Rollout.io have a different approach, we allow you to hot-patch production apps without code injection on native applications, you can read more on how the tech works here
Rollout is meant to help mobile developers solve production quality issues, hot-patching production apps, debugging production env, adding/removing analytics, etc.
Disclosure: I'm from the Rollout.io team.
iOS 6 now supports delta app updates. This is awesome, and makes Real Racing 3 (a 1.1GB app) update in about 30 seconds instead of 20 minutes!
https://developer.apple.com/library/ios/#qa/qa1779/_index.html
Q: How can I reduce the downloaded size of my app update for users
that already have the previous version installed?
A: Starting with iOS 6, the app store will automatically produce an
update package for all new versions of apps submitted to the store.
This package is optimized for updating an app from one version to
another, and contains files that have changed between the prior
version of an app and the new version of the app, excluding files that
have not changed.
When used optimally, an update package is significantly smaller to
download than the full package of the app and the update will install
more quickly. Also, in many cases, this mechanism allows updates to
large apps to be downloadable over cellular networks where app
downloads are subject to a size limit.
In addition to new content, the update package contains instructions
on how to transform the prior version of the app into the new version
of the app. New files will be added, modified files will be replaced
with their updated counterpart, and deleted files will be removed as
part of this transformation. As far as the developer and user are
concerned, this process is entirely transparent and the resulting
updated app will be indistinguishable from a full download of the
corresponding updated version of their app.
Further instructions for developers available at the link above.

App with iAd and App without ad should in different projects?

here is my question, i made an app and put on appstore, but i wish to charge the version without any iAd for 69p ...and the version WITH iad built in for free...
so, should I make two separte projects for each version?
and how do i make the free version with iAd should a pop up alert recommend user to go to appstore buy the ad free version?
is it just a normal UIAlertView with delegate method to call the App Store or open it as UIWeb in browser? how do i implement that?
any suggestions ?thank you very much
You can use compiler flags to wrap around your code so that you can have one source, and create multiple targets from the same project and build multiple apps (with different app identifiers and everything).
However, this causes you do have to manage two different apps in the app store (entering the same meta data twice), and deal with the review process on two different apps.
Also, people might skip over your paid version, whereas they would have installed your free version, and upgraded later.
I recommend that you have one source, one project, one target, and one app in the app store and use in app purchases (IAP) to turn off advertisements.

Updating an ad-hoc installed iOS app

Hopefully a easy(-ish) one, but I'm just wondering if it's possible to update an ad-hoc over-the-air installed iOS app (deployed using the standard $99 developer license), hence ensuring that any data stored within the app's document sandbox is still available.
Additionally if iOS 4.x file protection is used (i.e.: the NSFileProtectionComplete encrypt attribute is set on the files, etc.) will an updated app still be able to read the files?
Whilst there are some existing questions that touch on this (such as Updating enterprise iOS apps while retaining some files of the current app bundle), these don't answer this specific query and (potentially) pre-date the newer style of ad-hoc distribution.
You can definitely update an ad hoc over-the-air-installed iOS app and retain the current app data -- it appears to work identically to normal update installation.
Because it works the same way as a normal update, file protection should work the same as well, though I don't have first-hand experience.

Resources