Per platform dependencies - dart

I need to include a dependency only for the Android version, is it possible? And if so can something similar to #if DEBUG #else be used to add it in some .dart files only for the android version of the app?

Related

How to use old version of Flutter and Dart

I'm a new developer and I'm trying to work with an existing IOS application built with Flutter. Some of the pubspec.yaml files show:
version 1.0.2+1
environment sdk ">=2.3.0 <3.0.0
And then various dependencies of other apps.
If I use the latest version of flutter, the application doesn't build. It needs to be built with flutter v1.0.0. But when I install that specific version, flutter pub get doesn't get the rest of the dependencies.
I'm guessing that I'm doing something wrong, but I don't know what.
Please help!
Thank you,
Thomas

Prohibit downloading Dependencies of CocoaPod

When I link a CocoaPod in a Podfile that includes further Cocopods via dependencies: How can I disable the installation of these dependencies (via the Podfile)?
Background scenario: GCDWebserver includes optional logging with CocoaLumberjack. CocoaLumberjack is nor required and only used if present in the project. Unfortunately the GCDWebserver 3.3 and newer links to CocoaLumberjack as dependency. But I don't want to include it because I'm using another logging framework.
Unfortunately the GCDWebserver 3.3 and newer links to CocoaLumberjack as dependency
This is not the case anymore since version 3.4.1 because it created problems like yours.

Why ios plugins are not included to build?

Just trying to build ios version of app but plugins was not ... included? Android version runs fine and in Plugins list are also listed as installed.
Tried different projects, different configs, different syntaxes of config.xml... nothing works. Any idea?
The latest version of org.apache.cordova.console is cordova-plugin-console.
Similary for org.apache.cordova.device it is cordova-plugin-device and so on.
Check your plugin list by cordova plugin list
Remove iOS platform by cordova platform remove ios, add it again and build it.
It should work. Good luck.

How to upgrade Cordova 1.5.0 to Cordova 3.5.0 in an exsit project which was created 2 years ago?

It's a project that was made two years ago and now I'm working with it. The question is that the version of the Cordova now 3.5.0 but this project was in 1.5.0. Can I run it in X-code 5.1 now? How can I upgrade it. Plz, I need help, for I'm a totally novice with iOS programs.
Next paragraph code error with that 'Cordova/CDVViewController.h' file not found
#ifdef CORDOVA_FRAMEWORK
#import <Cordova/CDVViewController.h>
#else
#import "CDVViewController.h"
#endif
AFAIK there is no easy way to upgrade from old versions of Cordova. You can try follow this guide: http://docs.phonegap.com/en/3.5.0/guide_platforms_ios_upgrade.md.html#Upgrading%20iOS but you will have to upgrade step by step (i.e. from 1.5.0 to 1.6.0 to 1.7.0 ...). But even when you do that, if you use some old plugins or API calls in your code you will have to rewrite them according to the new version's API.
I had a project using Cordova version 2.1 and I needed to upgrade it to 3.1 and in the end I was better off creating new project in 3.1 and then update plugins or completely rewrite them.
So to sum up, it all depends on complexity of your projects (how many platforms you support, if you communicate with native code, use plugins..). You can try following the update guide or just create a new project in 3.5. If your project is trivial, I suggest creating new 3.5 application and then copy old html, css, js... files to appropriate places in the new project according to 3.5's documentation.

Using preprocessor directives in BlackBerry JDE plugin for eclipse?

How to use preprocessor directives in BlackBerry JDE plugin for eclipse?
Within the eclipse config file (%ECLIPSE_HOME%\configuration\config.ini) make sure the following line exists.
osgi.framework.extensions=net.rim.eide.preprocessing.hook
With the current BlackBerry plugin (1.0.0.67) config line is added for you. I'm not sure about older versions of the plugin.
Also, checkout this Stack Overflow question for more information on the BlackBerry preprocessor.
Preprocessor directives supported by the RIM compiler

Resources