Please note that I looked through all of the Visual Studio documentation for an optimum solution but I couldn't find any info :-)
I am going to develop my new game and this time I want to use C++ and Visual Studio. The game will run on iOS and Android and desktop. I work on a Mac Book Pro and run Windows and OS X on my computer simultaneously (with the help of VMWare Workstation).
The game will run on OpenGL ES with the help of some other frameworks (SFML). I'm trying to gather information on how to setup my solution and how should I use platforms specific APIs.
I assume I have to use OpenGL ES Application (Android, iOS) for the game itself and Shared Library (Android, iOS) for the game engine code.
Now comes the question, where should I put platform specific implementations including but not limited to:
In-App Billing for Android
In-App Purchases for iOS
Chartboost/AdColony SDK for Android and iOS
Some iOS-Only features implemented in Obj-C code
Basically I need to find a way to setup my projects in Visual Studio. I think I need to set up like this:
Game Engine Project (Shared Library): This will hold the game engine code that'll be shared on all platforms (let's assume only iOS and Android for the sake of simplicity).
Shared Interfaces Project (Shared Library): This will hold the shared interfaces for the platform specific API calls, like in-app purchases, etc. This project will only include the interfaces, not the actual implementations.
Android Project (OpenGLES Application): An Android native project to run the game on Android devices. This project will hold the Android implementations for the interfaces defined in the shared project.
iOS Project (OpenGLES Application): Similar to the previous one, only for iOS.
I don't know if the solution architecture is correct. If it is, how should I implement the iOS specific features. I know I need to use XCode for this. Do I have to create an XCode project on Mac and develop the iOS feature there using the Shared Library projects?
I'm really confused :-)
Related
Hey I am learning Kotlin Multiplatform mobile. I starting learning from the doc. I successfully run the module in android and ios platform, without any problem. Now I want to implement this in real project. I successfully created the module inside my pre-existing android directory. According to this Make your cross-platform application work on iOS we can only use module inside the android directory. I work as android developer and my other team have ios developer. So the problem is we have different system for android and ios. So how can I share this module to the Ios team. Please guide me how to achieve this. I read somewhere ios need XCFramework. But I am not sure, how can I achieved this. Can someone guide me step wise? Thanks
In general, Kotlin Multiplatform Mobile provides you with an ability to build frameworks for iOS. It can be delivered in several ways:
Simple ModuleName.framework file ready to be imported into your teammate's app,
CocoaPods integration, providing your teammate with the ability to rebuild this framework from sources and to use third-party libraries from Kotlin code,
Universal (fat) framework and XCFramework. These two are designed to provide the framework user with the ability to build the result app for different CPU architectures. This would be helpful when publishing the app.
If your aim is to just show the iOS team an example of Kotlin Multiplatform Mobile power, I think it would be enough to declare the framework, build it by executing the appropriate gradle task and share the result file.
If they would also like to put some code into the iOS-specific part of your module, adding the CocoaPods integration will be a good idea.
Can you publish an app made with android studio to iOS platforms? Is there a compiler that lets you compile your Android Studio app to and iOS platform working app?
It is not practical to run Android apps on iOS or the other way round.
Each operating system of each platform has different native components. The native Android or iOS app development requires using different programming languages, design interface, navigation, integration process.
The Android system uses the instruction set of the Java virtual machine called ByteCode. iOS, on the other hand, implements the compiled code.
Running Android apps on iOS is not possible because of the following factors:
Different lifecycle of apps in the system.
Different lifecycle of app screens within the app itself.
Different approaches regarding data access.
It is misleading to be told to use some kind of service or program to transfer your app to another platform with just a few clicks. Online tools like an Android to iOS converter do not work.
The only exception is the case if your app has been developed cross-platform from the beginning. There are some web-based libraries and frameworks which can help you develop hybrid apps. You can also have a look at flutter & xamarin but the app must be all done in that framework.
As far as I know, there is no something that can do that. Android is very different from IOS. If you want, there are a lot of tools that you can develop with them apps for both Android and IOS, with one codebase.
Some of these tools:
React Native
Flutter
Xamarin
PhoneGap
Apache Cordova
But if you will use one of these tools, instead of Android Studio for Android and XCode - It will not have the same performance as if it was written with Android Studio and XCode.
The reason for that is because the platform-specific tool (Android Studio / XCode) can talk directly with the Operating System, while the cross-platform tool (React Native / Fultter etc.), cannot talk directly with the Operating System.
Hope I helped you!
You can do this with Flutter.
https://flutter.dev/
They are different from writing standard android apps, and use Dart rather than Kotlin/Java.
It does have a good tight integration with Android Studio however.
I have a dll based on .NET 2.0 with full source code access.
So I can build it in VS2010.
I need to port this to Android/iOS/MacOS.
As a result I expect some equivalent of dll for each platform.
So another programmer can link (doesn't matter how) this equivalent to his own project at one of that targeted platform.
For example I ran MonoDevelop on Mac and don't see how I can build my .NET project and to receive such equivalent of dll.
So I need help to find solution and understand what to do to receive requierd result.
There are CLI implementations, primarily Mono, that work on both iOS and droid. The simplest tools here are MonoTouch and Mono for Android, both available from Xamarin. With these tools, you can build and test your dll targetting the relevant frameworks. Another programmer, again using the MonoTouch or Mono for Android tools, can reference those dlls, and build their application, with all the tools necessary to package and deploy (side-loading or via, say, the device's store) an application using that library. This deployment will typically also include all the runtime/framework pieces needed by the application.
MonoTouch makes use of the MonoDevelop IDE, so will be familiar to you as a MonoDevelop user. Mono for Android can do that (i.e. be hosted inside MonoDevelop), but can also be used inside Visual Studio.
Running .NET code requires a .NET runtime to be installed. Neither Android nor iOS devices come with such a runtime preinstalled.
In theory, you could install the Mono Runtime (a open-source .NET alternative) on an Android device or a jailbroken iPhone/iPad. However, as I understand it, you're looking for a way to create a library to give developers, so this isn't a good solution.
However, what could work is creating a library with MonoTouch. MonoTouch compiles your .NET code to a binary that iOS devices can use - regardless if they're jailbroken or not, without needing a runtime installed.
If you follow best practices, you might port your library successfully, such as
http://sharpsnmplib.codeplex.com/discussions/390251
However, it purely depends on the characteristics of your library, which you does not mention yet.
Can we able to start an Android project in "Titanium Studio". I am using the free version of this software. If Titanium Studio is good for Android development what are the main points. How to run the application.
Yes, you can start an Android project in the free version of Titanium Studio. You can also start an iOS project.
When you develop in Titanium, your code is in JavaScript and you use special Titanium functions and objects to access the Android or iOS device. Some advantages are that if you know JavaScript you can code for Android and iOS without having to learn Java or objective-C and most of your code will be reusable if you want to later deploy your app on iOS. Some disadvantages are that there are bugs in Titanium that make some functions behave differently in Android and iOS. Also, if smart phones were to add a new device function you won't be able to access it until Titanium added that function. You give up some control for easier multiplatform deployment.
Titanium's Quick Start guide will show you what you need to do to setup your computer for Android and iOS development: http://docs.appcelerator.com/titanium/2.0/#!/guide/Quick_Start
I found a related answer here: How do cross-platform mobile app development frameworks work?
but I was thinking more about c++ cross-platform SDKs work (e.g. Corona, Marmalade, EdgeLib, etc.). They provide the ability to export binaries for iOS and Android while allowing the developer to use C++ code. My assumption is listed below, but please correct it if I am wrong anywhere:
User writes code in C++.
SDK has an interface layer with C++ functions called in user code requesting mobile OS specific functionality. This interface layer is built from code required to implement that SDK function call in the specific mobile OS(written in Java for Android and Obj-C for iOS).
Part I am most confused about because I don't have much mobile dev experience points: Do iOS and Android both have C++ cross compilers that can compile the general logic code written in C++ in the user's app?
MoSync is an example of a C++ based cross platform mobile toolkit - this one starts by using the open source GCC compiler to compile your app's C++ code into an assembly-like format. A custom tool by MoSync (called the 'PipeTool') then combines this assembly format with their pre-compiled libraries into various target formats, including java bytecode (for Android) or Objective-C source (for iOS). More detail about this process here.
The final compilation on the target platform (Android or iOS) is left to you, using the native IDE (Xcode for iOS and Eclipse IDE with Android SDK for Android). So to create an iOS application you'll still need to be a member of the Apple iOS developer program (US$99 per year) for example, whereas the Eclipse IDE and Android SDK are free.
Your example of Corona SDK is not fully relevant since Corona builds into the native binary format using their custom build servers in the cloud - what goes on there is not fully documented as its a closed source toolkit. You pay a subscription fee per year to Corona to be able to build apps. I'm not sure about the other ones you mentioned (Marmalade, EdgeLib, etc.) but would assume they are similar to MoSync.
Check out codenameone.com - they use Java but eventually compile into C++ for iOS and Java for Android.
The difference is their environment includes all the graphics and they create the controls themselves so you get an actual native application with just one codebase.