Social Media App with Unity?
We always want to know which technology would be the best to develop our next app with? Since there are a lot of options we always want to get the best deal. And most often there’s no easy answer. If there was, There wouldn’t be so many technologies in the market.
If you are looking for a short version, I’m sorry there’s none. And even at the end of the article the answer would still be , it depends.
But I’ll try my best to reach a point where you can decide which technology should you use for your next app. for simplicity we are going to take social media as our genre.
Now I believe you actually have a lot of questions. So lets answer them and even guide you to some questions that you didn’t think of before. We can narrow down to our target development stack.
Question 1 : Target Platform?
This is year 2020. I’m just going to assume you are want to develop an app for either Android or iOS or both. Lets throw in Web in the fray as well. Which you would eventually want for desktop users as well.
Now here are some easy answers if and only if you are targeting for ONLY iOS you can stop reading this right now. Native iOS is the answer. It doesn’t matter what requirements you have or what bleeding edge feature you are planning. If you are developing for iOS ONLY just pick native iOS for developing your application.
So you might be thinking if you just want to develop for Android the answer would be simple? Aha… Here’s the surprise; the answer is it depends.
If you wish to target both platforms here’s where things get very complicated. We have a new problem. Do we go Cross-Platform or Native ?
Question 2: Cross-Platform or Native?
It’s very hard to answer this question right now. Because we need to answer a few more question before we can address this. Lets make a few smaller questions and get back to this again.
Native development is costly. Because you have to have at least one developer for Android and one for iOS and if you want web add another one. You can do the math. So if you have a very generous fund go for native. Otherwise Cross-Platform is the recommended option.
Native development is time consuming. Also there is a new problem you won’t get android and iOS builds at the same time no matter how skilled developers you hire. You can expect an additional 40–50% buffer for iOS development because of the constraints the platform imposes. If there’s no time constraint you should pick Native otherwise cross-platform is the way to go. Cross-platform applications are generic so they have a lot of ready solutions to a problem. As a result the development time goes down significantly. And removes the parallel development issue. You can expect both builds almost at the same time. I say almost because due to iOS restrictions there would still be some delay on the iOS part but it’d be rather short and could be just one time issue.
Native application will have the smallest size. Period. And if you choose cross-platform applications depending on the technology your size will vary (2–10mb).
Should you care about size? Well again it depends. Android users are kind of always short on memory they like to have smaller download size. It’s a psychological matter. But there’s only much you can do if you wish to jam a lot of heavy features. A simple Facebook application is over 100MB now. Almost all social media application is kind of heavy. So another 2–10mb shouldn’t actually be an issue to worry about. But as I said, It totally depends on you. Good think this is something you don’t usually have to worry for iOS users.
Native apps will always perform better. This is actually noticeable for older hardware's where we had less resources to do things. In 2020 this is barely an issue. The current gen processors are way too powerful for any performance issue to notice. Unless you are targeting users who are still using a 2012 phone. You don’t have anything to worry about.
By now you can answer your own question whether you need native or cross. If you pick native there’s no further need to read forward. In case you want to move with cross we have a whole different set of questions now.
Question 3: Which Cross-Technology should you use?
Lets cut short on this one shall we? I’m discarding Xamarin, Cordova, ionic from get go. I’ll be quick on this one. Xamarin isn’t free. Cordova(Phone gap) very poor performance. And ionic ? well there’s news regarding them getting rejected by iOS store. Please look up for more details else where. Lets get back to you the right direction.
Flutter is the way to go. It’s probably the current best cross-platform technology. Why? It’s actually native application development where you can share the main codebase. Backed by google supported by the opensource community. And it has 5k+ open issues on it’s official repository.
Hey lets not take this negatively. It only shows how many people are interacting with it. But yeah… I wonder if you are really willing to go for a technology in that state. It’d be a very cool tech in about 3 years I think. But are you going to wait 3 years? Or are you going to risk the open issues and pray it doesn’t affect your business model. Well truth be told it’s not that bad. If you are developing a generic app. Say for instance just another social media, This would do just fine. Only if you are trying to make a clone of Instagram or twitter or something of sort. If you were to do something un-conventional such as add Augmented Reality with your app I’d strongly recommend that you tread very carefully. Now we are on the issues region. You can take a look at the open issues and try to walk around it or just move on to the next option we have right now. But if you really insist. Here’s a hopeful implementation story you can read about flutter + unity.
React Native. Is probably the 2nd best cross-platform technology after flutter. Why?
Question 4: I thought you were going to talk about unity?
Ah, Yes. Unity. It’s actually funny that this is actually a thing now. Unity was supposed to be a game development engine. But unity has come a long way. So long that we are actually talking about apps being published made with unity.
Technically games are supposed to be resource hungry. And it has stuff that a normal app wouldn’t almost ever need. Such as AI navigation, Physics simulation, 3D Rendering etc etc. Unity isn’t a tech that makes sense for app development. Unless you can somehow remove unnecessary features which you can now. Actually it’s been a while that we can do that but yeah you can most certainly remove all those features that was bogging the whole idea down.
BUT WHAT IF YOU ACTUALLY NEEDED THOSE?
Yes what if you needed physics simulation or AI navigation or 3D rendering? Could you do that in cross-platform? Even doing such a thing on native would be very very tedious.
- You want to develop a 3D application? Unity is your answer.
- You want to develop an augmented reality app? Unity.
- You want an animation heavy application? Unity.
- Indoor Navigation with 3D Guide? Unity
Look at this 3D Navigation menu.
Do you think you can do something cool like this without unity? Well….. This is actually done with flutter. Hey I never said flutter is bad…
But before you go back to thinking about using flutter again, Let me link you up with this … Open issue
Okay lets get back to reality. Speaking of reality we were talking about Augmented Reality. I don’t think there’s any better alternative to unity for that. Period. So if you are developing an AR app you have very little choices there.
I recommend that you take a look at flutter and react support with unity first. I’ve added some repo link. As these are community driven… support comes from the community as well. Would you like to rely on the free community when something goes wrong your call.
Question 4: Social media with unity?
First things first, Should we really be considering this? This Depends on your requirements. You need to decide that based on what you are trying to deliver. The wisest move would be doing the Native(android/iOS)+Unity Stack. the safest route best of both worlds also the worst of both worlds. And if we are talking about Flutter or React Native, Pray to your lord that 2 cross-platform technologies will have the perfect synergy for your business logic and will avoid all the known issues.
That leaves us with the cheapest and safest choice, Just unity. We can talk about the drawbacks later.
First of all. Unity is probably the most stable cross-platform technology in the market. They don’t just support android or iOS. No sir, They support literally every platform that exists.
When it comes to cross-platform, Unity is unrivaled. Well yeah that’s why it’s bulky too. But now that we can strip out unnecessary modules there’s not much to worry about. But the base unity engine still holds some weight. And empty unity project would create around 6mb if you remove all the bulk. So yeah, Your app will always have 6mb extra no matter what you do with unity. If you can’t live with that this isn’t going to work.
What about performance?
It’s a game engine. It’s supposed to be performant. More or less 75%+ games on the mobile market are probably made with unity. There are apps made with unity as well. I’m sure you are trying to say how much ram or power will it consume? First of all unity would hog some ram which I’m sure nobody would care. It will hog as much ram as a game would. Because now a days phones have at least 2GB ram at the minimum. Where unity applications would consume 50–100mb of ram. Also it totally depends on how the application is optimized. Same goes for power. Games are rendered at 60fps or something of sort. Normal apps aren’t usually moving so there isn’t any need to render frames every second. Hence the power consumption. Well we can simply tell unity not to call those every frame functions that drains the battery so much which we don’t need for normal apps. Didn’t think of that did you?
Yes of course Unity Out of the box is made for Games. So if you want it to act more like an app development platform you need to tweak it’s settings. You can’t expect to be spoon fed for everything. Well at this rate Unity would eventually release an app template that does these configurations for you. Until then you need to configure those yourself.
Is it actually feasible?
Now we are on a FAQ section
- Can you call Rest APIs? Yup
- Google Maps? In a way yeah. But Unity has something way better MapBox. You get all of Google Map + AR support + 3D stuff and more.
- Messaging? Yup
- Audio/Video Call? Yes. Look at this SDK Agora.io
- Push Notification? yup
- Camera? How do you think Augmented reality work?
- Database? Well You can call Rest API I don’t see why this is even a question
- Video Player? How do you think games play video cutscenes?
- Native Features? Yes. Really this is not even an issue.
There must be some drawbacks
Yeah, One big challenge I still face with Unity’s UI is how the keyboard works. Native apps kind of pushes all the UI elements up to support the keyboard. But for Unity you need to do it manually. So it’s additional work. Also as I have mentioned the configuration is also a lot of additional work.
Tell me more about this Native+Unity workflow
Well this is in theory the best course of action for any given requirements. Dr. Albert Einstein has a famous quote
“In theory, theory and practice are the same. In practice, they are not.”
Joints are always bad. The more joints you have the less stable it actually is. It always gets hard to debug when something goes wrong in such a situation. Also if you develop Android and iOS apps separately they will perform differently. By default iOS apps would feel much better than the android apps. Why?
Well one reason is you are probably comparing a 1000$ iPhone with a 200$ Android.
Another reason is Now you are relying on 2–3 different developer stacks. You can’t be sure that both Android and iOS developer are of the same caliber. Their outputs can have a noticeable difference.
Native development has one very unique drawback. Usually Native offers a lot of features. So many features that developers wouldn’t want to go outside of what it offers. For example maybe your app is trying out some new cool UX design. Which is not readily available by Native development. It’d be difficult to make it yourself in case of native. Where as Unity never offered anything of such as a result developers are always ready to accommodate new stuff by themselves. A totally new Layout development would be much faster for an unity developer than any normal Native Developer.
You are just trying to sell Unity app development
What do you expect, I’m a unity developer. And look at the heading of the article why did you even read this far if you didn’t want me to sell unity app development?
And It’s not like I’m the first person to actually consider this. Take a look at this asset published on asset store.
Well this template could answer a lot of the questions you would have had. Not only that, This could be a great base for your social media. But wouldn’t recommend using a template for more than anything for research. Because templates tend to be very restrictive. And it may not fit your business model. Trying to fix a template would eventually prolong the development time. Although it could be a great learning source.
Now it’s about time you deicide whether you should develop your develop your social media on Unity. The answer is as I said, It depends. Each technology has it’s pros and cons. It’s up to you which fits your business model best. From what I understand if you ask me, is it possible to develop a social media on Unity? I’d say definitely. But should you? That’s something you need to decide. I definitely would.