It's a bit of a specific scenario, and I seem to be missing a single detail I just can't get right.
Here's the deal:
I have an iOS app to which I've added a flutter module. All works well, integration's fine. Great.
I now have a specific need to embed a native view inside the flutter view. So, logically, I follow this: https://docs.flutter.dev/development/platform-integration/platform-views?tab=ios-platform-views-swift-tab .
I got everything, the UIKitView on the dart side, the factory and the platform view on the native side.
The only thing left is to actually register the factory and all should be well.
This is where I get stuck, I can't get the registrar because it requires a plugin name!
Docs say:
self.registrar(forPlugin: "<plugin-name>")!.register(
factory,
withId: "<platform-view-type>")
But, <plugin-name> is not defined anywhere. Tried the module's name, tried the main class in it, tried Flutter, tried App, tried FlutterPluginRegistrant, tried AppFramework... all desperate attempts, but I'm out of ideas.
Any help / hint would be greatly appreciated.
Related
I have a working Electron app which I wrote about two years ago. I'm not an employee of a company, but just some guy that wrote an app that a few people use to make the world a better place. Anyway, I need to make some changes to the app but my computer crashed a while back so I downloaded my old code from Github onto my new computer and started to get to work. But immediately I found the app wouldn't work in the new 17.0.0 version of electron because the REMOTE module in Electron was deprecated and then removed in previous versions. I tried to follow the instructions here... https://www.npmjs.com/package/#electron/remote?activeTab=readme to replace REMOTE with the new #electron/remote module. I've had several problems, my most recent is:
JavaScript Error: Uncaught Exception: TypeError BrowserWindow is not a constuctor at app.createWindows (C:...\main.js:89:17).
I use the remote functionality (properties?) over 50 times in my app, including .dialogue, .getGlobal, .getCurrentWindow, and .BrowserWindow.getAllWindows
I'm not including my code here because I'm not really looking for a a coding solution (unless that's the easy/best/only thing I should do and you can give me a solution from the information I've written) but more general advice on what direction I should go to solve this problem. I'm a good programmer in a language that is not Electron, or JavaScript, or NodeJS! So, with the right instruction I can get by, but please be easy on me. (For example I get lost in the instructions for #electron/remote around the API Reference section.) Thanks for any help you can provide.
Mike
Some big changes have been made to Electron over the past couple of years, especially with the use of remote. I would hate to say it but it looks like you are in for a bit of work to get it operational again.
You will want to look at ipcMain, ipcRender and contextBridge.
The inclusion of webPreferences: {preload: ""} in your new BrowserWindow() method plus the use of the above Electron methods will place you in a good starting position for safe, quick, thread seperated code.
See Context Isolation and Inter-Process Communication for more info.
PS: If you need a quick bit of code to get you going / give you an idea then let me know.
I need to add my custom view to input call view. I have got jail broken device with iOS 9.3.2. I've installed Theos to my MacBook. I've installed mobile substrate to iOS. And now I don't know what I need to do.
I found that I have to modify InCallService.app. But I cannot find needed class for tweak.
Also I don't understand how can I write logs. I tried to use NSLog(#"aaa") and %log(#"aaa") but I cannot find file with logs.
Thank you.
If you want to add something to the app, modifying the .app isn't the easiest way. If you have MobileSubstrate installed you can hook a method from the Phone application and using basic iOS paradigms like MVC you can find the views you need to modify and go from there. If you need the header files you can either dump them yourself with class-dump-z or see if these are still valid.
Logging data is also quite easy with Ryan Petrich's deviceconsole
Just run the command deviceconsole --process < YOUR HOOKED PROCESSES' NAME > in your console after installing deviceconsole onto your Mac, and anything in your code using %log(); will show up in the console.
I'm using the native Facebook Titanium module and I have the following issue.
In my app, you can login to FB from two different windows.
In the first one, I instatiated the module and added to the module a 'login' listener.
In the second window I did the same, I instantiated the module and added a 'login' listener.
Problem is the following: the second addEventListener doesn't overwrite the first (it looks like the second Facebook 'require' is simply a pointer to the module instantiated in the first window).
So, it happens the following: when I try to authorize the user and I enter the login listener, it turns out I'm always calling the first one, not the second (the second never gets called).
I tried to remove the first eventListener with no luck. Moreover, they 'live' in distant windows and it seems there's no way to remove this listener correctly.
Any help is appreciated,
Iannis
I hope this will clarify what you are seeing:
It's standard CommonJS behaviour that modules are cached and the second and following require() will get you a reference to the first instance.
Like the name says addEventListener adds an event listener and does not replace one added earlier.
You should get the login event twice, once for each event listener you add. I can't tell why it doesn't do that for you without further insight in your code.
I'm having a web reference which is being used by both a Xamarin IOS application, Xamaring Android application, and a Windows Store application.
And this all worked very well, until I updated Xamarin.
Now, there is a field that But it works fine for the Android and Windows applications.
I have tried to update the web reference multiple times, with no luck. I have also tried to debug the web service locally, to see if it returns the same , which it does.
When I receive it in my Windows Store app., it looks like this:
And in my IOS app., it looks like this:
It is always the StructureId that is never set, for some reason. And it was not like that before I updated Xamarin.
Anyone who knows what I am doing wrong, or have stumbled onto the same kind of problem ?
That looks like the linker removed unused members. Defaults have not changed (it's not related to your update) but you should check that your application is being built with Link SDK (and not Link all).
If you want a smaller executable and set Link all to achieve this then you'll need to add [Preserve] attributes on the structure you're serializing (e.g. used in web services).
I was able to make it work. I am not sure if it cached anything, or what, but it helped to add some "noise" on the webservice call.
I just added DateTime.Now.Ticks to my webservice URL in Reference.cs, so it would always be a new URL call:
this.Url = "http://somewebsitename.com/ReportService/ReportService.asmx?v=" + DateTime.Now.Ticks;
Using DELPHI XE4/XE5.
Using an ActionList and Tbutton that is linked to the aciton: ActionShowShareSheet, the picture above is my result. I can not find a lot of troubleshooting around or many examples regarding the topic. I am trying to share an image with informational text - nothing to fancy - either by email or whichever the desired social sharing service is preferred by the user.
Yes, I have looked at the example provided by Delphi, and even attempted copying and pasting the same controls/components from that example.
edit ---
Okay, so I tested in in the iPad as well, it appears to show the popver modal but no items are shown to share with. So I am now facing two problems:
1. ShowActionShareSheet does not display properly with an iPhone device/simulator
2. I have nothing to share with, or I can't. I have signed into Facebook as a test via the iOS device settings and it still does not work properly.
Help ! Thanks
~ Simple solution. Just doesn't work in the simulator.