I have an iOS app in the AppStore, built with Xcode a while ago, but I am thinking of rewriting it from scratch to iron out some bad decisions and this time use some cross-platform framework such as Appcelerator Titanium or Rhodes to add Android support also.
Is it possible for my current iOS users to seamlessly upgrade to the new version, retaining their userdata (of course a migrator is required in the new app). I think I have to retain some app identifier or other data in the new version.
Or should I create it as totally new app and let the users migrate their data (possibly using the Open in... scheme).
The downside of this is that current users must re-purchase the app, which might drive some of them away.
Is it possible for my current iOS users to seamlessly upgrade to the new version, retaining their userdata (of course a migrator is required in the new app). I think I have to retain some app identifier or other data in the new version.
In principle, it is possible. The fact that you are moving to a different development platform will not affect your ability to access data already stored by the user. In the end, it greatly depends on how you stored that data: if it is through NSUserDefaults, it will be pretty much transparent; if it is in XML/JSON files, you will need to add some XML/JSON parser to you new app (provided Appcelerator Titanium or Rhodes do not already provide one); if it is through sqlite, I know that, e.g., Titanium supports it; if it is through Core Data, maybe you will need to write some kind of converter for the existing data. But, in the end, it is definitely possible.
Or should I create it as totally new app and let the users migrate their data (possibly using the Open in... scheme). The downside of this is that current users must re-purchase the app, which might drive some of them away.
What you should take into account here is how much the new app will differ from the old one. If there is a risk of disappointing your customer base, maybe you can go for a separate version. It is clear that doing so will bother some users that will have paid for the old version. One scheme that has been applied in at least one case I know of is offering the app for free during an initial period. But whether this is sensible or not depends entirely on the prospects of your apps.
Maybe the best approach is striving for a largely improved new version, so that disappointed customers will be the least possible number, and keep the same bundle id for a seamless update.
I would suggest refactoring your current iOS codebase as opposed to rewriting it from scratch. Rewriting from scratch is almost always the wrong decision when you can refactor and clean up code as you go. It will always be harder than you expect, take longer than you expect, and often won't end up providing the benefit you expected it to. Refactoring is cheaper, faster, and safer.
In my opinion you would be doing your users a disservice by rewriting the app using cross-platform framework after they are used to a fully native app written in Objective-C. You would be doing yourself a disservice by throwing away code. Bad code can be fixed, no matter how ugly it is now.
I would suggest writing your Android app using Java and refactor your iOS app once the Android app is finished. You can provide the best experience for both platforms this way. The reason to add Android support first is because you already have a working iOS app in the store, so you're 1/2 way there already without touching a cross-platform framework. Writing the Android app should also allow you to flesh out ideas of how to refactor the iOS app.
As far as upgrading your current users, you need to keep the bundle ID the same in order for users to be able to seamlessly upgrade via the app store. Upgrading their data is also possible, but you need to provide more details on how that data is stored within your current app. If at all possible, the automatic upgrade is preferable to an Open In... scheme that requires the user to manually load their settings.
Related
This may seem like an odd question, but I'm in the middle of creating an iOS app, and was wondering if there is a way to, in the future, roll out changes to the app without requiring all of the users to download an update.
I've noticed that Snapchat can do this with their filters - new filters are added regularly, without me updating the app.
I've read into 'Cloud code', something Parse had that apparently let you accomplish this. Obviously that's no longer an option.
Also, do Apple even allow this? Seeing as they need to approve every app before letting it onto the App Store, it would seem like they would need to approve any changes first too.
I've thought of strange things like storing a function in a database, then getting the app to download that function and run it - naturally if I were to now change the function in the database, it would change on all users devices instantly. Just how ridiculous is that idea? Thanks!
Depends on how much flexibility you want.
For example, Spotify does this for UI mainly - backend-driven UI, as they call it. They send a kind of layout from the server and convert it to a real iOS layout, based of a predefined mapping. You can find pretty more details in the Spotify's presentation.
Slides: http://www.slideshare.net/JohnSundell/backenddriven-native-uis
Video (more details): http://www.downvids.net/backend-driven-native-uis-john-sundell-and-diego-cristina-ca--777281.html
So actions can also be divided in similar pieces and abstractions, received from the server and interpreted - sort of scripting is needed. You can't compile and run arbitrary functions on the fly.
Hope it'll give you some ideas you can think of.
See Apple's app store review guidelines: https://developer.apple.com/app-store/review/guidelines/ section 2.4.5 (iv). Apps are not supposed to download code or resources to add functionality or significantly change the app from what Apple sees during the review process. And executable memory isn't even writable by sandboxed apps, which makes downloading compiled functions fairly useless. But downloading Javascript that complies with the above guidelines seems to be allowed.
Is it possible to create an API inside an iOS app to let 3rd party developers create app add-on that are downloadable for users inside the app?
I could not find any ressources for this topic online.
I think that's going to go against the app store guidelines if your intention is that the 3rd party developers write code, which will be downloaded and executed.
There's something of a grey area between legitimate uses and illegitimate uses of downloaded code:
Legitimate Example 1: Something like Hopscotch where children are creating simple fun shared games. These can be considered user generated content.
Legitimate Example 2: A game which is driven by scripts allows for the run-time downloading of patches to fix bugs in the scripts or even to add new levels. I believe such usages have been rejected occasionally in the past, but are generally accepted these days.
The relevant guideline from the guidelines is (emphasis mine):
2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code, including other iOS, watchOS, Mac OS X, or tvOS apps.
And the all-encompassing:
We will reject apps for any content or behavior that we believe is over the line. What line, you ask? Well, as a Supreme Court Justice once said, "I'll know it when I see it". And we think that you will also know it when you cross it.
If your idea is to create some sort of app-store within your app-store app, then I would abandon it immediately, because that's going to be way over Apple's line.
That said, you haven't given much detail about your app, so I might have made wrong assumptions about where you're thinking of going.
I've an application that I've developed before on xcode, now I want to make a new update for the application, but this time I'm going to build it from scratch using swift.
Now my question on iTunes connect will it accept the new update of the application that I built using swift?
There is no reason why your update should not be accepted. If the only differences, is "it's written in Swift instead of ObjectiveC", this is obviously not the good reason the tell to Apple (and to the end user) for an update, but by rewriting from scratch, you probably will correct some bugs, and add a couple of new features that will be big enough to justify the update.
I'm a complete noob at Swift (and Xcode), as a matter of fact, the only programming language I (somewhat) know is Javascript.
I'm trying to make a Swift SpriteKit game, and I would like to access the number of calories burned in HealthKit.
The idea is that my game will provide more points the more calories you burn using other apps like Endomondo. My app does not actually track anything, I would just like to access other data left by other apps in the Health App.
Is this even possible? (I'm running the latest version of everything, from Mac OS X to Xcode)
Certainly. I don't think there is anything technically preventing you from making calls to the HealthKit APIs in your game. In fact, you're fairly free to mix and match the use of any public frameworks provided on iOS.
One thing to keep in mind is privacy and disclosure of the use of health data. The user will have to explicitly grant your app permission to see data.
HealthKit is a really rich API with lots of ways to access lots of different kinds of data, and you're really only interested in a small part right now, so a quick way to experiment is to create a new Swift SpriteKit game from the new project template in Xcode, do your research on HealthKit, and see if you can just log the number of calories burned since some time point while your app is running. If you can do that, the rest is details (as in, the entire app :-)).
Here are what I think might be some helpful links, good luck on your project!
https://itunes.apple.com/us/book/swift-programming-language/id881256329?mt=11
https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HealthKit_Framework/index.html
You'll also find some good documentation on SpriteKit (references and guides) on the iOS Developer Library site.
The latest game by Gameloft called Order&Chaos starts with a Checking for Update screen, which indicates that they're able to update certain data without updating the entire binary.
I'm quite certain that they're using some kind of scripting language like Lua in their app and updating these scripts to e.g. change certain values (like buying price of items).
What's your experience with side-loading or updating scripts in your iOS application?
I don't mean loading new graphics or other contents, but game logic like my path finding implementation in Lua.
Apple cleary states that this isn't allowed
3.3.2 An Application may not download or install executable code.
Interpreted code may only be used in
an Application if all scripts, code
and interpreters are packaged in the
Application and not downloaded. The
only exception to the foregoing is
scripts and code downloaded and run by
Apple's built-in WebKit framework.
This happens in most of these applications TinyChef, RestaurantStory, HotelStory, etc..
They update content, but not the core program. Just adds new content or modifies the existing using external files and DB updates from a remote server.
Example, what they do is download new graphics and add a new item to their Desserts table of their DB and finally when they show all their Desserts the new one shows up and its ready to be cooked as if it was in the app from the beginning.
I could elaborate more info if you need.
UPDATE
If you are using lua, you could easily add, say new levels to your games, just by downloading a file containing your level data. Im sure that you are familiar with using external files one per level/item/character with a common format you then parse in your app.
You can have your path finding algorithm in another file as i said, and update (download and replace) that unique file whenever you improve it.
I haven't tried this, yet, but wouldn't it be as easy as querying a server, getting back a string, then parsing that into the database?
That might not violate Apples policy, since it wouldn't be executable code, just delimited text.
You could probably do more complicated stuff that way too. It wouldn't be a whole lot different than DropBox downloading files to your phone so you can view them. But instead of a document file, it would be a 3D object.
I think 3.3.2 clausule is to prevent that anyone can download/buy from appStore an engine like Love2D for iPhone, create games/apps in Lua, download it on the iPhone via web and execute with this engine, because it means develop and deploy apps on iPhone using an intermediate SDK instead of the official SDK, and of course, without paying anything to Apple.
Think about it, you can create your own App Store with this system and that is what Apple wants to prevent. but i think Apple doesn't take care of this type of downloads, where you want to update your own apps logic or levels.