Navigation between multiple ios projects in an xcworkspace - ios

We have developed 3 different projects(Three apps)named A,B,C which was created separately,
Now our client wants us to combine them into one app,Is it Possible?
Requirement:
Project A : Manages sales orders for clients.
Project B : Keeps track of the Inventory
Project C : Monitors Customer feedback.
We need a home screen, which has 3 buttons and on clicking the button the corresponding process is invoked same as the individual app is doing right now.
NOTE: All 3 the projects have 5 storyboards & 30-40 class files each. Both are not a libraries.
I have gone through with workspace concept but can't get a clear idea. I created new workspace and added my 3 projects. But Iam not able to Navigate from storyboard 1 to storyboard 2.

You can use ios Deep linking with different tags for each project.
for better understanding please follow this tutorial.
http://blog.originate.com/blog/2014/04/22/deeplinking-in-ios/
Hope it will help!.

I believe the right way is to create an additional Core module (which incapsulates networking, database wrapping etc), which will be imported to A, B, C, and an App module, which is what you want and which imports A, B, C to itself and uses them as needed.
Otherwise it's gonna be quite messy, unclear and poorly supportable.

Related

What is the difference between an "app" project and a "framework" project in Xcode?

I am working on a project with SwiftUI and it originally started with creating a new project as an "App" (Xcode, clicked on file, new, project, click on "App") but was then later asked to put it into a pod as a framework. I did it successfully (Xcode, clicked on file, new project, click on "Framework"), however I am unsure what the differences are and I'm unsure why I would want to do that. To me they look very similar, except that I'm unable to launch my project as a framework in the simulator. Luckily SwiftUI offers the canvas preview window however it is a bit finicky when it comes to certain button interactions, which is why I am wanting to use the simulator.
Two places of confusion:
What is the difference between an app and a framework project?
Why is it more advantageous to have my project as a framework?
An App is a standalone application that can be launched and run. For example, all of the apps that you have on your phone are just that -- apps. You tap on them and they launch and run, presenting a user interface, accepting input, etc.
A framework is something else entirely. It's a collection of code that is bundled together into a package that is used by another framework or by an app. Some frameworks are provided by the system -- for example, SwiftUI is a framework that it sounds like you're using in your app. Other frameworks are provided by 3rd parties. For example, you can find many frameworks via CocoaPods or the Swift Package Manager -- Alamofire is a common example. Also, you can make your own frameworks and use them in your own code as a form of organization and separation of responsibilities.
Why is it more advantageous to have my project as a framework?
It is not -- they are two almost completely different concepts (besides both ultimately being collections of code and resources). If you intend to build an app that is launch-able on someone's device, your only choice is to make an app. If you intend to make a collection of reusable code for use in your or someone else's app, than you would make a framework.
Excellent answer (and upvoted) by #jnpdx. Let me give you a physical example:
(1) Create a project in Xcode that is a framework. Call it "MyAppKit". Inside it create, well, basically anything - a View, UIView, or more likely a function that will be shared by several views. (Let's go with that.)
public func setLoginName(_ login:String) -> String {
return ""Hello, " + login + "!";
}
Pretty simple. Call it, pass in something, and it returns a string saying hello. Please note the public piece. It matters. (And there's much more there. This is a simple example.)
(2) Now we get to your app or apps. Let's say you have two apps that need to use this (again, very simple) code. One is SwiftUI, one is UIKit. (It doesn't matter except for syntax.) Sine my forte is UIKit I'll use that. (And it can be several dozen apps too.)
import MyAppKit
let myLoginMessage = setLoginName("World").
Pretty much, it's "Hello, World!'
Again, this is really a nonsensical example. But it should get you started on what the difference in Xcode is between a Framework project and an App project is.

Is there any possibility to add Sub-project to current Project?

Can anyone suggest me like:
I had done one project by using Objective-C. And I had an requirement to keep one button and If any user tap on that and it needs to open "https://github.com/Block-Equity/stellar-ios-wallet" (Swift) inside my app.
If user want to come back to Parent app from Sub-Project.. He can..
How can I keep 2 separate projects in One project and need to operate two projects while run-time?

Best way to integrate a complex Xcode project into another

I would like to integrate an existing Xcode project A into another project B so the second one could reuse some features.
Project A :
quite complex, manage authenfication + session, a lot of dependencies betweens classes (notably UIViewController)
relies on a dozen of Cocoapods dependencies
the project lives on its own : it's a sale channel/ticket shop that is already deployed on the store as it
constant evolution
Project B :
Project customer side that would love to integrate some parts of the sale channel
Complexity might be very variable (using Cocoapods or not, etc)
Basically we can either deliver and package the e-commerce shop for one of our customer if he does not already have an iOS application, or we have to integrate it in their existing one.
Expectation :
ideally we could pursue the evolution and iteration on the core Project A without having a lot of work to make it available for integration (it would be more cost efficient for us to work on a single project than on the core one and separate SDK/Library made from scratch)
we want to make it easy to integrate for the customer on its own
The approach we have been thinking to are :
build a .a library file. But it does not seem really practical considering the size of the project
dropping the .xcodeproj from A into B (à la ZXing), but it was a pain because of Cocoapods dependencies
Simply adding all the classes from A into B (with a proper packaging into folders first), manage Cocoapods for B (add dependencies from A if Cocopoads already used or set it up), and make all imports easier by editing .pch accordingly.
What would be your suggestion ?
Since you are already using cocoapods I would try to do a private pod(s) with the shared characteristics. That way you can easily track versions across projects and use the same tool to manage all the dependencies.
This approach also would make easier for the customer to integrate as he will see the shared code from the pod as long he has access to the repository but not the complete main project.

Merging two Xcode projects into one

I am really stumped....
I have got two apps and i need to merge them into one.
how do i do this???
I need a home screen, swipe left (go to one app) and (swipe right) go to the other....
both apps are partially similar but have their own complexities about them.... so each app involves a login and uses Parse. (not sure if i should integrate both keys and id's and just use 1 data base or keep them separate as they are).
I need this to be formulated from 1 app that is downloaded from the app store instead of having two apps.
Please help me
Use workspace for doing this. The below links will help you for that.
1) Xcode Workspace
2) Creating a Workspace
I don't have a step by step tutorial for the exact thing you're looking to do because I would need more information on what the two apps are that you want to merge. With that said, the functionality of swiping left and seeing the menu for App A and swiping right and seeing the menu for App B can be achieved by using this source code from GitHub https://github.com/SocialObjects-Software/AMSlideMenu There are two video tutorials there that walk you through how to implement it.

Can i open an Xcode project on a button click from another project without custom URL schema?

I want to integrate two Xcode projects together and they both are full Xcode projects with UI and all. For example lets say i have an App 'A' which has a UIButton and on click it should open App 'B' which has its own UI.
I know we can open an App from another App through Custom URL schema but is there a way i can do this without custom URL schema and via connecting Xcode projects.
I know this a little vague question but i don't a better way to put this.
Thanks,
You're question doesn't make any sense. You're talking about two very different things. Yes, you may import one Xcode project into another Xcode project and setup a dependency between them. However, this in no way affects how the apps work with each other. If you're wanting to embed one app inside another, you have to do it at the view controller/code level. You cannot simply add one project to another and expect the two to intercommunicate. You'll have to move the functionality of one app to another. Apps are sandboxed on the device and can therefore have no communication with each other except for by using custom URL schemes as you've mentioned.

Resources