Copying data from a free iOS version to a full version of my app? - iphone

How could a full version of my iOS app access / copy the database / settings from the free version ?
I'm thinking of providing a free version of my app and I can't see how people then buying the full version could get access to the data from my free version ?

All apps are isolated on iOS. They are installed as different iOS system users. One user do not have permission to access another user's files. In the old times, one common approach to address this problem is to enable iTunes file sharing. And tell users to manually copy the files.
Your better bet is to use the freemium model to sell your app. Make the app free, and unlock extra features via in-app-purchase. This way, your files, documents, settings won't need transferring to the pro version. The app itself becomes pro after unlocking.
Here is the guide from Apple: https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction/Introduction.html (though not very intuitive).
The walkthrough here: http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/ is very helpful.
Last but not least, be aware that in-app-purchase is crackable. So please read: How to detect "IAP crackers"? , Verifying In App Purchase Receipt from Client , and https://stackoverflow.com/questions/4715414/apple-in-app-purchase-verify-receipt , verify in app purchase , In App Purchase Receipt verification within app .
Note that you are supposed to setup a server to validate iap receipts. Though it's doable from within the app, it's not safe. As far as I can remember, you can test in-app-purchase through StoreKit in iOS simulator v5.0, that should be Xcode 4.2. Before that, it can only be tested on a device.
#Dominik Hadl mentioned you can use a server to sync the file. The operation is usually complicated. If you prefer this idea, you can choose to use custom url scheme to launch one app from another to ease the operation. See steps below:
User press "Begin sync" in the free app to upload the file to your server
Server return the ID of the file to the free app
User press "Launch Pro App and Download my file", which leads to a custom url scheme to launch your Pro version (must be installed first), with the file ID
Pro version use the file ID to download that file directly

I think the only way how you can do this is syncing the data with some server, registering the device and the syncing the data back to the full version.
Because all iOS apps are sandboxed, they can't access any other application data (unless you have jailbroken iOS).

Since multiple apps can share the same iCloud container, I'd say that the best practice nowadays is to "simply" store the data in iCloud.
(I'm putting "simply" under quotes, because it is easy to put data in iCloud and take it out; but if you actually want to do syncing, you may need to do more than just "I'll load from iCloud and save to iCloud" in order to provide the best experience to the user.)

Related

How to Upgrade my flutter app without using Playstore or App store?

I have an app created for internal use. I have not published it on the play store, but I have to update it regularly.
Can anyone help...with which library should I use for implementing a self-upgrade system to my app. Any answer would be appreciated.
The answer is - yes,
You can upload your app to the Apple Store and Google Play but Not publish it to the public, instead, you can use internal testing
So only users that you define will be able to see or download your app in the Google Play and Apple Store
Google Play internal test https://support.google.com/googleplay/android-developer/answer/9303479?hl=en
Apple test flight https://developer.apple.com/testflight/
Yep it has some limitations, for example, Apple allows up to 10000 testers but I hope it's ok for your company, but its only way to share app internally without any issues on iOS (android allow you to download apps from anywhere, iOS don't)
The answer is - no, you can't do that - not at least the Flutter* apps. As #Abion47 said, you can publish the new APK and ask users to install it. If you app involves back-end then you can check the (client) mobile app version and display the alert if the version is below minimum version required.
On the iOS side, it is slightly more difficult. For internal use, the organisation needs to sign-up with Apple's enterprise program. You can then distribute the app internally.
*- I've seen certain apps downloads the zip (or whatever) file, and updates themselves without actually going through App update process via AppStore/Playstore. However, it is more of a web part within the particular app which gets updated. The app version as such remains same.

Verifying the purchase (receipt) of another application (Mac App Store)

TL;DR: Is there a way to verify that a user has purchased another app (of mine) from the Mac App Store?
In a brief, I want to completely rebrand one of my applications on the Mac App Store. The current version is very buggy and has a user base of nearly 90% pirates. I want to shut down the old application and completely rebrand it as a new product.
However, I don't want to completely screw over my current, legitimate customer base. I am hoping there is a solution to this. The way I was hoping to go about this was to:
Create a new application – completely rebranded
Make it free
Have an In-App Purchase that unlocks the Pro version
Allow customers of my previous app to "restore their purchase" to unlock the Pro version
The new app will have extensive anti-piracy measures. Furthermore, the current application requires a connection to one of my servers. When I release the rebranded app, I will shut down the current app.
I realize the forcing users to migrate may cause some backlash; however, I am hoping that, by providing the new and improved version 100% free, the backlash will pass.
Look for the old app using NSBundle bundleWithIdentifier
get the receipt of this bundle using appStoreReceiptURL
validate the receipt
unlock functionality
Bare in mind that the terms and conditions of Apple say something along the line of "only appstore IAP should be used to unlock features; don't roll your own license mechanism"

Installing an Ad Hoc app for testing without synchronizing iTunes

I have an iPhone app that I'm distributing to testers. I followed these instructions:
https://developer.apple.com/library/ios/#documentation/ToolsLanguages/Conceptual/YourFirstAppStoreSubmission/TestYourApponManyDevicesandiOSVersions/TestYourApponManyDevicesandiOSVersions.html
And they work except for one of my testers, who does not use iTunes to synchronize his apps. He has many apps already on his phone and doesn't want to synch to iTunes because it sounds like it will delete them. So...Is there any other way to get a testing app onto an iPhone besides synchronizing with iTunes?
Simply distribute it using OTA ("Over The Air" distribution).
When you Archive your application using Xcode (menu Product -> Archive, I hope that's what you do already to keep debugging symbols so that you can symbolicate crash logs when testers send some back to you!), once you click on "Distribute", select the "OTA Distribution" option and follow the steps.
Don't forget to check the "Distribute for Enterprise" checkbox in the appropriate step and fill the requested informations (Product Name, URL of the IPA when you will upload it on your server, etc).
Once your .ipa and the associated .plist is created, upload them both on a web server, and make a link to "itms-services://?action=download-manifest&url=<the_url_to_your_plist_file_here>".
When the users will open this link from their iPhone, it will prompt to install the application on their device directly, without the need to plug their device to any computer.
There are many tutorials on the net about this, simply google about iPhone OTA distribution.
I strongly recommend TestFlight. It's free and it's easy and they manage all that server side work.
Since your user is afraid of the iTunes Sync Process (for good reason), why not recommending him to use the iPhone Configuration Ultility.
That tool does not do a complete sync but only transmits the app you specified to.
It is free, easy to use and very reliable. Well, sometimes it has its hickups on Windoze systems but that seems to be a normal experience for users of that OS.

Auto-updated iOS application for enterprise distribution

Is it possible to make an iOS application for enterprise distribution that updates itself transparently? Saying 'updates' I mean completely updating its logic.
A possible usage of this approach is a self-service kiosk (iPad) that is maintained remotelly.
It's not possible to update application binaries directly, but I see some possibilities:
Application that have a single UIWebView and the logic is implemented in HTML5. But we can't use most of hardware specific features that can be used in native applications.
Some multi-platform framework (possibly HTML5-based) that allows to use native application features and that is compiled or interpreted dynamically.
Jailbreak?
What are really working approaches of these?
Consider getting a mobile device management service. Those are pricey.
OR:
First, enable over-the-air distribution. It will take $300/year enterprise agreement with Apple. Set up a website with the app's IPA archive and descriptive PLIST.
Then code a call-home HTTP request on app startup. You may pull/parse the same PLIST that describes the latest version; it has a bundle version in it. Compare that to the version of the currently running bundle.
When a new version is detected, the app shuts down, opens the browser on the download page. In a softer manner, just notifies the user that an upgrade is available.
I've never tried linking directly to the app's download package, but give it a try. In a perfect world, Safari would open up and ask "Do you want do download MyApp?" right away. In a not so perfect world, the user would have to click a link and then agree to download.
I think what you are looking for these days is the "Apple Deployment Program".
You volume purchase iPads which get sent to people, but that you can manage remotely - which also means management including remote updates of applications.
The only thing I'm not sure of is if you can launch an app remotely, so that you could update and re-launch an application.
Here's a guide to enrolling devices for remote management:
https://www.apple.com/business/docs/DEP_Guide.pdf
An old but good summary of the program:
http://www.speirs.org/blog/2014/2/27/understanding-apples-new-deployment-programs
Also watch the WWDC video on Managing Apple Devices for the Enterprise:
https://developer.apple.com/videos/wwdc/2015/?id=301

In App Purchase: download extra data OR should information be contained in basic application

I am developing iPhone/iPad application with in-app-purchase. In-app-purchase requires extra data(~300KB .txt file).
Should data be downloaded after the purchase is done? I assume that it is necessary to set up my own server to retrieve the data(it can't be downloaded from some apple server for example)
OR should data be contained in basic application? Will apple approve this?
Either way is permissible as far as App Store approval is concerned. Use whichever works better for you.
(And yes, as of the current iOS release Apple will not host any extra data to be downloaded with an in-app purchase; you'll have to host it yourself.)