create a light version of a completed app by using target - ios

I already finished an app, this is a big app that contained multiple parts. Now I want to create a very light version of this app.
Of course I can create a new project and just copy the codes from the the original version to the new one.
But I think, if there is a bug in the original version, then I should debug it in the both version, which is not that cool.
Is there any way, maybe using a new target in the original app project, that I can use the same module of the original app in the light version?
I mean, if I use a new target in my old project, I can send it to App store as a completely different app.

Related

Reusing core data model when updating app - from scratch

My question is fairly simple though I couslnt find anything specifically answering it till yet.
I have an obj-c app that I'm updating fairly often. I would like to create a new swift app with the same bundle id to replace the older one as an update. I have like 8 core data model versions within my old app that I would love to migrate to the new swift-from-scratch-app, so my users wont lose their data. Is it even possible??
Thank u
If you're using the exact same bundle ID (this is key), then from the perspective of iOS, it is considered exactly the same app. Consider your users having version 1.x of your app installed on their devices and you release 2.x using your new Swift project. Your user, nor iOS, will be able to tell this is a brand new app written in Swift.
The gotcha here is that unless you use the exact same model names, CoreData won't be able to be initialized with existing data and you'll be forced to write a custom migration for this.
My suggestion to you is to copy the xcdatamodel file from your old project and change the language of the code it generates once copied into the new project.
Then regenerate your entities in Swift and continue working like nothing ever happened.

iOS - Supporting Multiple Apps With Same Version And Content But Different App Name And Bundle ID

We developed an app for our client and it is now available in the app store. Lets call it the MAIN APP here.
Now the client wants a separate version of that app, without changing anything but just the name of the MAIN APP. Let's call it the ALT APP here.
The MAIN APP has two Xcode projects, one is the older one, the other is the latest, which is the one what I am working on with new features.
I uploaded the first version of the ALT APP before by changing the app name and bundle ID of the older project of the MAIN APP. So you can think of it that the older project of the MAIN APP is now the project of the ALT APP
Now I need to update the features of the ALT APP to the same as the MAIN APP.
One way to do this is to copy paste the source files of the MAIN APP and overwrite it to the source files of the ALT APP but I think this takes time.
The other way I thought of is to just change the app name and bundle ID of the latest project of the MAIN APP, upload the ALT APP and then later on change it back when I need to upload the MAIN APP
But I am afraid that if I kept on changing the bundle ID there will be build problems(although I haven't encountered any yet).
Is there any better way to do this? Thanks in advance!
Make One Project.
Go to Project setting -> Build Setting
Change
Current Project Version
As you want.
Duplicate your 'base' target as you want
Go to Target -> General -> Version
and Write $(CURRENT_PROJECT_VERSION)
Change bundle identifier.
Go to Target -> Info and find 'Bundle name' and change it. That will be your app name.
I wish you can solve your problem.
This sounds a lot like you need to look into branching in your source code repository. Git in particular is suited to pulling individual commits between branches. Thus allowing you to select changes to copy. Providing you are careful about what you are committing.
Ultimately it sounds like your project is going to end up being an old code based with patches and a new code base with new features. Perhaps your client is not clear enough about what they want. Keeping two version of an app current in the app store would be a headache. Far better to retire one and move with the new.

XCode 7 Swift Projects not being indexed

I'm seeing a problem with the latest released version of XCode 7, where if I create a brand new Swift project, and build it, the full index is not being created. This means things like Superclasses, Callers, and Callees in the Assistant Editor are not being populated. If I create a brand new Objective-C project, all of this information is generated correctly. If I download older projects from Github, for example, even if they are in Swift, the information is generated. It just seems like projects that are more recently created (say, in the last 6-8 months), are not indexing properly. This includes projects downloaded from Github, for example, and not just projects I have created. I have re-installed Xcode, which didn't help. I did try out the newest Beta version, and that seems to work, but I can't submit apps using that version, so would like to figure out what is going wrong with the released version of XCode.
I haven't seen any reports of anyone having a similar problem. I deleted all XCode plugins, but that also didn't help. It seems like normally the indexing process happens after the build process finishes. In the cases where I don't get an index generated, I don't see the "Indexing.." message show up in the XCode toolbar.
Any thoughts? Thanks!

iOS app behaviour after installing new version from app store

I have an iOS app installed in iPhone from app store, now if I have an updated version 1.1 for the same app at app store and I'm getting some sort of informative alert from the older version 1.0 (New version is available...).
If I click on alertview's ok button, it redirects me to the new app link in browser. I download my new version then.
Please provide answers of following questions :
Will it replace old version?
Will it replace sqlite and image folder on the document path? (Both version is having same named sqlite file, say abc.sqlite1.0 and same folder name, say imagesToBeCopied)
Will it append the sqlite entitie rows with new rows for same entity?
How can I install version 1.0 again from app store? Is it possible to get it anyhow?
Please provide your valuable answers on it, which can help me out to reach to some solution.
Thanks.
1.Will it replace old version?
Yes, the app bundle will be replaced by the new one
2.Will it replace sqlite and image folder on the document path? (Both version is having same named sqlite file, say abc.sqlite1.0 and same folder name, say imagesToBeCopied)
No, the documents directory is not affected by the update process. If you have procedures in your code that update the documents directory, they will still run, but without any changes it would be no different to a normal launch of your app - e.g. if you check for and copy if needed, something from the bundle to the documents directory, this will only happen if the target file doesn't already exist.
3.Will it append the sqlite entitie rows with new rows for same entity?
This is not related to the update process. If you want to modify the data as part of the update, you will write this specifically in first launch code for your new version.
4.How can I install version 1.0 again from app store? Is it possible to get it anyhow?
No, the updated version replaces the old one on the app store.
To the best of my knowledge...
Yes, the new version of the app will replace the old version.
Yes it will replace your sqlite file, assuming your paths did not change across versions. If you want to handle this sort of case it is your responsibility to include logic in the newer version of the app to check for the existence of the sqlite file and overwrite or modify it accordingly.
No, all modifications to the sqlite file need to be done manually by the new version (see #2).
As of now, not possible to do this through the app store. Only one version of any app can be placed for "sale" at a time. You would have to do this through other means (testflightapp.com for instance [for adhocs for devs]).

App Store release using wrong Core Data Version

My released version appears to be using a old model version of Core Data, xxxDB 101j instead of xxxDB as defined in the VersionInfo.plist (package contents of xxx.xcarchive submitted to the app store). This has not been an issue on development devices or releases to TestFlight.
It is using the last listed version in VersionInfo.plist, not the version defined in the NSManagedObjectModel_CurrentVersionName property. Interestingly all the versions have a .mom file including xxxDB but xxxDB also has an .omo file as well.
Has anyone bumped into this issue and found a work around?
The workaround is to add a new version model, make that the current version, clean, archive and submit. At this point in time, the NSManagedObjectModel_CurrentVersionName property is not used when your app is submitted to the app store. It uses the last listed model in the VersionInfo.plist.
The behavior in the testing/adhoc environment is different to go live

Resources