How to disable Firebase when using Unity builds for window standalone build - windows

We have a mobile game for iOS and Android that works fine, one of our plugins is Firebase plugin (Analytics + Realtime database)
Now we want to export the game also to standalone mode (PC windows), and we want to disable the Firebase plugin completly when building to windows.
Of course we put #if everywhere needed, but still, the dlls are compiled into the project.
Is there an easy way to remove it during the standalone build?

Related

How to add system api classes to your android project for non AOSP builds

I have an android system app that is currently being built with the android build system. The SDK in use is system_current as it uses some system apis.
For external dependency reasons, ease of development, debugging etc, it would be nice to move this app to Android Studio and use Gradle to build.
Converting the sources to build with Gradle is straight forward enough. However, at build time, the system APIs are not found as those are not available in the normal SDK. I thought that by generating the SDK from the AOSP sources I'd get an SDK I could use, but that target output seems to also not have the System APIs available.
How would I change my gradle build to be able to use the System SDK to compile against?
There are two ways depending if you are only trying to use current non-public APIs, or of you've added custom ones yourselves and are trying to access those.
If you're only trying to use current system-level APIs, you can use android.jar from this repository https://github.com/anggrayudi/android-hidden-api
If you have added some new method that isn't part of standard AOSP, then it's a but more work.
The reason that all methods don't show as part of Android SDK is that in AOSP code they are annotated with #hide. This means that when SDK is generated, they are exlcuded.
You'll need to remove that annotation for the methods that you want to use. Then you'l need
Run make update-api to update the public API of the project.
Make the Android SDK from code by following: https://android.googlesource.com/platform/sdk/+/master/docs/howto_build_SDK.txt
Change the Android SDK path in Android Studio to use the custom one you build.
There's also the possibility of accessing methods via reflection on runtime without SDK generation. It's slower and messier to code though.
Not sure I understand exactly what you mean by normal SDK etc.
From https://developer.android.com/studio/build
The key part is to have a
apply plugin: 'com.android.library'
...
android {
...
}
If on the other hand you wanted to build with a desktop JDK but compile against java APIs you could add a dependency on robolectric and you can get a jar you can import into another Android project.
implementation "org.robolectric:android-all:11-robolectric-6757853"
Android Studio isn't really designed to work with System APIs. Even if you make Gradle build your platform app, you will also need to sign it with the same certificate as your AOSP build (so that you could run it). As you noticed, if you decide to use Roboelectric you would also need to modify it yourself to match your current AOSP version (System APIs are not as stable as Public APIs and Roboelectric needs to constantly chase all the changes).
I would suggest to keep using the AOSP build system but optimize our workflow.
Ease of development
Doing a full build/flash for every change in your component must be a pain. But if you are just modifying a single app, you can get away with just building that single component:
~/aosp/ $ m -j -- do a full build first
flash a clean image (with your platform certificate)
~/aosp/path/to/your/app/ $ mma -j -- build your app with all dependencies after you made changes
$ adb root && adb remount && adb sync
Basically, adb sync works great if you don't touch any APIs or parts of Android Framework (which would cause a rebuild of thousands other objects). If you see adb sync updating more than handful of files, you'll likely end up with a bad system and need to do a full flash.
Debugging
While Android Studio is a to-go solution for regular apps, framework and the platform apps go with InteliJ (you can probably use Android Studio, but there won't be much of use of Android plugins on top InteliJ) plus some configuration (see idegen.sh - example).

NSLocalizedRecoverySuggestion=Could not find the requested application

Xamarin.UITest gives an error:
"NSLocalizedRecoverySuggestion=Could not find the requested
application."
I tried with the released app version with the distributable provisioning profile.
Can't we test the release version app using xamarin.uitest?
On iOS, No.
You can not normally use UITest on the iOS release builds as it does not include the UITest agent (it is normally #if/#end out of release configurations).
Test frameworks like UITest/Calabash use a http-based driver that has to be included in the actual app in order to drive it, on the other hand frameworks like Appium use a driver that is external to the application being tested. (Appium directly uses the iOS XCUITest test framework for all iOS testing, Calabash, and UITest, uses a hybrid-approach, XCUITest-based and some custom via the bound HTTP driver)

iOS Unity3D game with Apple Watch companion

guys.
First goes the questions.
I need to combine different Xcode projects for iOS and watchOS. And I need automation for this.
Is it possible to set reference in iOS-Xcode project to watchOS-Xcode project, and setup outer project to build target iOS app with embedded watchOS app, by using targets of inner project? Is it possible to do such a thing with workspaces?
Are there exist some command line tools for managing Xcode project, like adding targets, changing build settings, setup build phases, add resources and so on?
Problem summary.
I'm currently developing video game with Unity3D for iOS and want to make a companion application for watchOS. The problem is that Unity doesn't have any built-in support for watchOS, thus I have to care about integration of watchOS part by myself.
I have Unity project for the game itself and different Xcode project for watchOS part of the game. Now I combine Unity-generated Xcode project with the necessary parts of watchOS project manually: I create WatchKit App target, then import necessary resources from the separate watchOS-project, setup build settings as required - and that do the thing, I get the game with Apple Watch support.
The thing is, that I need to do automation for this process. But I haven't found some useful information on this topic neither here (on stackoverflow), not did on official apple developers' site, not on unityanswers.com, nor in Xcode documentation.
Thanks in advance.

Organizing Android Gradle Project for Inherited Builds

I have a set of apps which are basically white labels of one app. The basic app has a web backend. With ant, when I ran the debug build of a white label app, the library project was compiled as debug with dev_server parameters and when I compiled a release build, the live_server parameters were used. Other parameters (and resources) were overridden by the white label app and it all worked pretty well.
So basically, if I compiled a white label for app 1 and debug build, the app was compiled for <dev_server>/1 as the basic service address and so on.
With gradle, I've tried different strategies but can't get it to work quite as conveniently without setting each parameter in each app's build.gradle.
The basic problem seems to be that a library project with gradle always builds in release so I can really change backend parameters based on what build I'm using.
Any ideas how to set up the project structure to make it work that way?
Instead of library project, try going for the productFlavour concept as mentioned here http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Product-flavors

Developing an OS X Cocoa app to support plugins

I am developing an OS X app in Cocoa that should support plugins (which are bundles of code, images, etc.) The application works, but with Lion things seem to be more complicated. I used to install a framework in ~/Library/Frameworks/ that the plugin could link against. Now it is more difficult to get permission to write to that directory.
Ideally, the framework that the plugin links to would just live within the main app's bundle. Then an installer wouldn't be necessary. I can't figure out how to do this though. In particular, I don't know where to put the framework during the plugin development. Are there any open source projects that support plugins that I can look to for guidance?

Resources