I have a federated (currently Android + web) plugin. Not my first one, I have a few others to my name :-), still this is the only one that gives problems. How can we force v2 embedding?
Yes, it's using the new API. Yes, MainActivity of the example implements FlutterActivity, nothing else. Yes, the example manifest has the flutterEmbedding metadata. Yes, it also uses ${applicationName} for the application name. Yes, it also has the appropriate launch and normal themes. Yes, the plugin main class implements FlutterPlugin and overrides onAttachedToEngine() and onDetachedFromEngine(). It actually does everything all other plugins do, still the toolchain warns and uses v1 embedding (either from its own example or when referencing the plugin from another app). What actually makes to toolchain decide whether it uses v1 or v2? The flutterEmbedding would be an obvious first answer but it still doesn't work in this case.
And this leads to another, related question. What to do if we have an internal plugin, one inside an app, not to be maintained separately or published for others to use. Such plugins don't need and have an example at all. How can we force v2 in that case? There's no example manifest then...
Addendum: an interesting experiment. If I remove the flutterEmbedding metadata from the manifest, the example won't compile with an error stating that this item is missing -- fair enough. If I place it back, I get no error but I get the warning instead that it uses v1.
Related
My code show this error. I didn't use "flutter_secure_storage" dependency but it shows this error. But the app is working well, What is the reason for this and how to fix this also if didn't fix this, the effect of this error?
flutter_secure_storage is a plugin which uses platform specific APIs to interact with the device.
This warning suggests that it is using a deprecated Java API on the Android device. You can't really fix it unless you know Java and are willing to contribute to the plugin. At the same time, you can safely-ish ignore it for now: even deprecated APIs usually last a long time, and it won't affect any functioning until the underlying API is actually removed.
The best thing to do is regularly check for updates to the package, which might fix this warning.
As the error suggests, the package flutter_secure_storage use the file specified in the error, which in turn use or implements a deprecated API.
You might not use that plugin, but you are using some other plugin that use it.
You are not affected by it now because it is just a warning/information.
You could get affected by it when the depreciation goes to be removed instead. But by that time the package will have been updated. So all you have to do is update the package at a later time when said deprecation has been solved.
I am using this code: https://github.com/pradeepramakrishna/Lightning-Experience/tree/master/aura-components to compile on my org.
I have got one components as eventLib.lib and interactive.js in eventLib folder. I have put this folder in c:MyDevOrg\force-app\main\default\aura folder in the local machine and tried to deploy in the org using VSCode but it didn't work.
I tried creating folder in the Files tab and added the interactive.js in the folder but that is also not seeming to work with the Aura components.
How can I deploy this lib into the org as it is being used in some Aura components.
We don't know what you're trying to achieve. You asked a very technical question to which the answer is "you're probably doing it wrong". Instead try to write what business functionality you are trying to achieve and you might get better answers.
You shouldn't have to import ui:eventLib. It's supposed to be part of core Salesforce's Aura components framework. But.
You've referenced a repo that wasn't updated in a while, no promises this still compiles / is best way to do X.
This repo seems to rely on open source Aura framework which is well... dead in the water.
You might be able to reuse something from this repo in your app using SF's built-in tags - but whole ui: library has been deprecated. Announced in Winter'20 = almost 2 years ago, finally dead in May 2021.
I don't think eventLib was ever exposed, might be something needed just in open source version which complicates the matter more. The answer would be to not work with the really "decompiled" tags but with their higher abstracted versions like ui:inputDate.
So, back to my question. What exactly are you trying to achieve.
You want to build something on pure SF platform (use pure Aura/LWC).
Want to have an app written in Angular, React etc, pure JS, connecting to SF data via API? (build it, upload as static resourcethen import using lightning:container)
want to prettify an existing Java/PHP/.NET app, make it look more Lightning-ish and embed it as iframe? (look into https://www.lightningdesignsystem.com/ and connected apps + "canvas")
want to expose piece of SF as reusable element that can be embedded in another website but could even be an Outlook plugin? (search for "lightning out")
want to look at modern equivalent of that old open source Aura repo and decide what to do next? Check https://lwc.dev/ out.
I am building an iOS app where I want to be able to start my app in a demo mode with mocked connections. I use a static library for the mocking. However I don't want this library to be linked in my release build for the app store. I am looking for a solution to this problem.
The best solution I could imagine would be if I can define a compiler macro like this:
#define TEST_ENVIRONMENT 1
and if this macro is 1, the library would be linked. But I don't know how to setup the linking for this. Is there anything similar that would work?
I know I could create a new configuration in Xcode and manually add the -l option for the library for this configuration but this means that it can easily happen that one edits a build setting and forgets to edit the test configuration as well, or vise versa.
Best regards,
Michael
This is my situation: We have a third party feature in our Eclipse environment. The feature contains several plugins. The plugin contains a bunch of classes. One of the classes contains a bug.
We have been able to find a solution to the bug, so we have a working version of the class with the bug.
Unfortunately this plugin is covered by a 55 page long EULA (by IBM) so I think it's pretty safe to assume that decompiling the jar, exchanging class files, recompiling and distribute is legally out of the question. I'm no legal expert, but I'd guess we cannot tamper with the jar files in any way.
So this means I have a single class file that I want to be loaded instead of a class in a plugin, is this at all possible?
This page suggests using fragments, but this requires modifying the manifest in the plugin.
This question has the same problem as me, but in that case there is access to the source code and he is able to build a plugin.
This blogpost shows how use feature patches, but they require that I'm able to build my own plugin, which I cant since I have just the one class.
I would not try using a fragment. In my experience, the cleanest thing to do would be to use a feature patch. I have successfully used feature patches to do exactly what you are looking to do. It's not simple, but it is robust. You need to do the following.
create a plugin that encapsulates your single class file
create a feature patch that includes your new plugin and that patches the feature that you are targeting.
export your feature patch and create the p2 metadata (to create an update site).
Install into your Eclipse using the install manager
Rejoice!
(optional) Feature patches by default only target a single version of the target feature. So, if the target feature bumps up its version number, the feature patch will silently no longer be applied. However, it is possible to relax the version constraints on the feature patch. This process is described in detail here: http://aniefer.blogspot.com/2009/06/patching-features-part-2.html
More information:
http://aniefer.blogspot.com/2009/06/patching-features-with-p2.html
http://aniefer.blogspot.com/2009/06/patching-features-part-2.html
The benefit of using a feature patch over a fragment is that anyone can install the patch and get the patch working, but things are more difficult with a fragment in that end users must muck with manifests.
So this means I have a single class file that I want to be loaded instead of a class in a plugin, is this at all possible?
Your first sentence is the answer. You can use a fragment, but that requires modifying the manifest in the plugin. Otherwise, Eclipse would have no idea which class to load.
My suggestion is that you write IBM with all of this information, including the patch. IBM should be able to release a maintenance fix which would solve your problem.
In the mean time, you could pursue the fragment option, which would require you to unpack the jar, add your fragment, modify the manifest, and repackage the jar. Whether or not this is legal is beyond my ability to determine.
I have an NSLog alternative that outputs the class it's called from as well as the line number and method (selector) called PLog in a class called PLogging. It's the exact same as the DLog taken from here with the exception of the name change. The advantage of DLog as it is written is that when compiled under Release mode, the log call is changed to a comment, negating the performance impact you would otherwise be subject to. I want to be able to use this and keep it within the framework, but be able to call it from the projects I add the framework to. But still have the log calls compiled to comments when in Release mode. Is this possible?
I would suggest a white list approach: add a preprocessor definition to your debug configurations which enables DLog/Plog to log to the console. In every other case it turns to comments.
Please have a look at this blog post which seems to point a finger at your problem. Of course, assuming that you don't want to change the way you are achieving your functionality: macros. I'm quoting abit: "An example of the basic problem is you want to link to a library that has both a Debug and a Release version. So in your application you want your Debug version to link to the Debug version of the library, and you want your Release version to link the Release version of the library."
I would rather tend to use targets for that, the trouble does look uncomfortable.
Third-party frameworks aren't allowed by the App Store. I assume you've got a static library or source files that you add to your apps with a cross-project reference?
If you've set your library project up with a debug flag set for your Debug configuration and unset for your Release configuration, then all you have to do is use the same configuration names for your app project, and the library will be built with the same configuration.