Merging Projects - xcode

I want to create books for the iPad.
I also want to be to write an app that will give access to those books
and allow me to add more books, without having to re-download the entire app.
My idea is to have a Main project that shows all the available books.
then a separate project for each book which will be downloaded individually (like a sub-project).
Is this possible?
If so, how will I be able to merge the main project with the "sub-project"?
if not, how will I be able to achieve this?
I saw something similar on an app called "Interactive Touch Books for Kids"
I'm using xcode 4.3 and cocos2d.

As far as Xcode projects is concerned, these apps will all be separate Xcode projects. The only thing you can (and should) share is common code, for example the cocos2d library. You do that by creating a static library target for the commonly used code.
As for your main app, keep in mind that you can not instruct the App Store to download another app on your behalf. The user experience will have to be that once the user clicks on a book to download it, he is taken to the App Store app where he can download the book.
In case I mis-understood you and you want all of the books in the same app, you need to implement In-App Purchases to either unlock or download additional content. Regardless of how you setup your Xcode project for that app, users will always have to download an update for your app if you add a new book or make modifications to an existing one. Unless you implement content downloads. But that has nothing to do with the project setup in Xcode.

Related

Is it possible to structure a Xamarin multiplatform app project for different customers?

right now I am maintaining a Xamarin Multiplatform app that only had to satisfy the needs of one customer.
My Visual Studio Solution consists of a Core project with ViewModels and resources as well as an iOS and an Android project with the UIs and platform specific code.
I now have to release the same app for a different customer with only slight changes.
So I was wondering, is there any possibility to have another iOS and android application that 'extends' my other projects, so that I can just override the parts that need changes?
I'm asking because I saw web applications that satisfy just exactly that issues by just including another project and than overriding different services for example.
Yes there are a lot of ways to do that. Here are just two that came to the top of my head.
Method 1: Multiple Build configs (Intermediate level)
One way is to create multiple build configurations, and select what code is to be run depending on which build you are running.
Basically to do this, and assuming you are using a Mac, and that all the data your UI uses comes from your ViewModels in your Core project. Then
in you Core project settings, go to Configurations and select Release and Click on Copy, and then type in the client name.
Then go to Compiler, Select the client configuration, Add a Define Symbol as shown and press OK
Then in your ViewModel, add your Company specific code using the symbol you defined for the client. Depending on your build configuration, Visual Studio tells you which code will be build using darker colors
Then go to Solution properties->Configurations->General->Add three for each customer/client (once for Android (any CPU), one for iPhone and one for iPhone Simulator).
So it should look like this - Client1, Client1|iPhone, Client1|iPhoneSimulator, Client2,
Client2|iPhone, Client2|iPhoneSimulator. Make sure that "Create
configurations for all solution items" is not checked.
Then, go to the Configuration Mappings tab, select Client1 & Client2 and make sure the right projects are going to be built depending on the Platform selected. And make sure the right Configuration of each Project is appropriate (Debug vs Release). In our case, only the Viewmodels needed client specific code, so the rest of the projects build correctly. . Press Ok et puis voila!
Method 2: Azure Devops (Expert level)
If you want to do automate the entire process from commit to publish, Scott MacDougall, a developer, presented at a Toronto Xamarin Meetup shared exactly how you can resolve this problem using Azure Devops to manage over 10 apps that were to be released to different iOS & Android accounts. He would just makes the change once, and then once the ticket/issue/item/task was approved by QA, it would go right into each store. It is a lot more complicated and I would have to study it more to explain it to you.
If these changes also include some logic, then I would also go with creating multiple Build configurations and using if directives.
Then in your code you can have something like:
private void ExecuteApiCall()
{
#if COMPANY1
//do something
#elif COMPANY2
//do something else
#else
//do else
}
If it only requires some UI changes, you can also think about having multiple themes and then just assigning one to specific customer:
https://medium.com/#milan.gohil/adding-themes-to-your-xamarin-forms-app-3da3032cc3a1

What happens if I edit a framework code in Xcode that was added using pods?

I added a framework to my project in Xcode written in Swift. There was some issue in the framework so I tried to modify and a dialog came out giving me the option to lock or unlock, so I choose Unlock and proceed.
Would it harm the owner? Would these changes continue with my project until my app is in the App Store? Please let me know if there is an issue with that and help with a solution.
Simply I need all framework files but I don't need all functions. In addition, I need to add functions to fit to my project.
It is not recommended to modify a third party pod's code, as it will be overwritten with the next pod update.
There are multiple solutions you can try:
implement the framework manually and modifying it there (keep in mind that you are losing the capability of quick updating)
modify it as an extension of the framework if possible, i. e. store your changes in a separate file and paste it everytime an update occurs (not recommended as it is not too convenient)
fork the project and make changes on that separate fork
create a pull request to the project that includes the modifications (if you think they are helpful for others as well)

How to Rename App name on TestFlight?

Is it possible to rename an iOS app on TestFlight? The only way I see that's possible is to remove the app (and all its associated builds) and add a new one.
This is an old question, but this requirement came up today for one of our apps and thought to leave the solution for anybody who wants it.
You just need to change the Application Name in your app and upload a new build and the new name will reflect in TestFlight.
Recently I had a requirement on this. I have changed the AppName in App Information section.
Wonder if Test-flight would allows to rename the uploaded API as they have to maintain incremental build versions.
Researched a lot on this, yet Test-flight have not documented it anywhere!

Bundled content in an app store app

I am trying to get my app submitted to the mac app store and I am having a bit of a design problem. Our app is an authoring tool and comes bundled with many projects created with the tool. Before the time of the app store, we would ship our app as an .img file which contianed a project directory and our app. Since I am only going to be submitting the .app file to the app store
with my app I am wondering where I should but the projects directory.
Initially I tried to put the projects directory inside of the bundle but this will not work because it is possible for the user to make changes to projects which might add new files to the project directory and this would make the sandboxing unhappy and mark the app as invalid.
What is the correct place to store such resources? I assume they should go inside the container? If so, what would be an elagent way to deploy this projects directory? Since we do not have installers in Apple land what would be the best place to deploy this projects directory? Do I just need to check on app launch if the projects are present and if not copy them from the bundle? This seems wrong.
Do I just need to check on app launch of the projects are present and if not copy them from the bundle?
Actually, this sounds right to me. As you said, the user cannot change/add any files in the app bundle. If you have resources there that the user needs to interact with, I would copy them to the ~/Library/Application Support/MyApp/ folder when they are needed. The user can then interact with the files from that location. (When sandboxed they go into a different but related location.)
I don't really know what your app does, but it would also seem like a possibly useful feature to "reset" the project files/folders back to a starting state. So copying the files in this way would allow for that kind of behavior as well.

How to make installer set up of Cocoa project?

I have make one application Cocoa using XCode. Now I want to make setup file of project. So other user can install this project directly in his system.
In short, the polite way is to build your app with the Release Configuration, put it into a Disk image with Disk Utility or zip it up, then put it on a server and have people download it.
If you want a longer and more detailed answer, read Apple's Software Distribution Guide.

Resources