1

I have an iOS app on App Store, now i want to upload another release(version 3 actually). I have some new features for the new version but not all the features will be available for the previous version's user.That will be defined by their previous version.

For say, i have features like A,B,C and D. Version 1 user will get A and C where version 2 user will get B,C and D.

These features are basically core data related. I mean some new column added in the core data.

Please let me know is that doable, if so then how.

thanks :)

Batman4Ever
  • 189
  • 2
  • 11

2 Answers2

2

You can use below code to get current version of your app.

NSDictionary *infoDictionary = [[NSBundle mainBundle]infoDictionary];

NSString *build = infoDictionary[(NSString*)kCFBundleVersionKey];
NSString *bundleName = infoDictionary[(NSString *)kCFBundleNameKey];

or you can directly use this https://github.com/Stunner/App-Update-Tracker Open Source as well.

Thanks.

Stunner
  • 12,025
  • 12
  • 86
  • 145
IOS Dev
  • 134
  • 5
  • thanks for your reply, need some time to accept. i am going to checkout the git source that you have refereed. – Batman4Ever Sep 02 '14 at 05:58
  • Hi I am the author of the open source project that was recommended in this answer. I have written a post on it here: http://h4ckish.com/2014/12/23/how-use-appupdatetracker-to-determine-installupdate-behavior-in-your-ios-app/ – Stunner Dec 24 '14 at 23:09
0

I don't this is what you are looking or not but you need to do Core Data Migration for adding version to existing xcdatamodel..

http://blog.10to1.be/cocoa/2011/11/28/core-data-versioning/

Example or explanation of Core Data Migration with multiple passes?

Adding New Version to existing core data model as shown in above links..

While using cored data in the app. When modifying the attributes to existing data model you need to do add version i.e Core Data Migration..Else it will crash while downloading added version at appStore after approved.

Hope it helps you..!

Community
  • 1
  • 1
Vidhyanand
  • 5,369
  • 4
  • 26
  • 59
  • thanks yes i know about core data versioning and i've already done that. i am looking for a solution to give that extra benefits depending on the earlier version. – Batman4Ever Sep 02 '14 at 06:13
  • You can use Harpy to intimate the user of old version. That new version is available and you can make them to update to new version using Harpy.. – Vidhyanand Sep 02 '14 at 06:23
  • You can get Harpy files at https://github.com/KVidhyanand/iRate-Harpy also refer this link for Harpy https://github.com/ArtSabintsev/Harpy – Vidhyanand Sep 02 '14 at 06:35