I'm fairly new to macOS development. I decided to create a CoreMedia DAL plugin to try to create a virtual camera and learn more about the Objective C ecosystem.
There are two components to the application:
The bundle plugin that gets installed into the /Library/CoreMediaIO/Plug-Ins/DAL/ directory and emulates a hardware device
A simple server that serves video frames from an actual hardware device to the plugin. The idea is that this server will apply filtering/compositing to the frame data before forwarding it onto the virtual camera.
I have successfully created a virtual device that just serves a static image. But to communicate from the plugin → server to get the dynamics frames, I'm using Mach ports (I know they're deprecated).
The server is running an NSMachBootstrapServer instance which has registered a service "com.vcamera.server". The plugin is referencing this service as it runs with the following code.
NSPort * port = [NSMachBootstrapServer sharedInstance] portForName:#"com.vcamera.server";
Problem
When I start an application that uses the virtual camera plugin (e.g. OBS in my case), the plugin prints that it successfully finds the registered server Mach port (the server port is not nil) but it cannot actually send data to it. The NSPortMessage instance sendBeforeDate fails with a timeout. For the life of me, I can't figure out why the Mach IPC doesn't transfer data when it processes that a service has registered on the port.
What I've tried
To isolate the issue, I created two distinct client and server applications that are NOT plugins by compiling directly with GCC. I was able to reproduce the timeout from the client to the server when I did not codesign the binaries, but once I did a simple codesign using my Apple developer account the two binaries were able to communicate.
But what's strange is that the OBS application that loads the virtual camera plugin is clearly codesigned but the connection from the plugin to the server does not complete successfully. Also, I read online that any application that loads virtual camera plugins needs to have the "Disable Library Validation" entitlement, but I confirmed that it was available in the application property list with this command.
codesign -d --entitlements :- /Applications/OBS.app
A few questions:
Is there anything obvious that's sticking out that I'm doing wrong?
Am I fundamentally misunderstanding the permissioning that's necessary to do Mach IPC?
Do bundle plugins need to be signed somehow or does the application (OBS in this case) itself need to have its code signature changed to match my developer ID?
I'd really appreciate any assistance that you can give! More than happy to give more information.
Related
I am working on some projects with Hyperledger Fabric, currently using the IBM VS Code Extension. The chaincode is written in Go, as is the client application which provides a RESTful API, using the Go Fabric SDK. However, I am having trouble connecting the client application to the chaincode. Most of the tutorials and examples I have seen use Node.js as the client and it seems the Node SDK needs less configuration.
As far as I understand it, the steps should be similar to the following but more detailed information seems to be a little bit lacking when it comes to the Golang Fabric SDK.
The client application needs the following information to be able to communicate with the blockchain network:
The enroll ID and secret of the application identity (used to generate a cert and private key), or the certificate and private key directly
The connection profile
The smart contract name
The name of the channel the smart contract was instantiated on
Use the certificate and private key of the application identity, along with CA endpoint information inside your connection profile
In the VSCode plugin
Register an 'application' identity in the 'Fabric Wallets' section
Export the connection profile from the 'Fabric Gateway' section
Export the application identity's wallet
Update code to point to the exported connection profile
Update code to point to the exported wallet
As far as I can tell, the connection profile and other steps needed to connect the SDK to the VS Code Network should be pretty 'standard' so I wonder if someone knows of a working example?
Thanks for the collective help!
Unfortunately you are going to struggle with this at the moment. Wallets are not compatible with the Go SDK currently. Also the Go SDK doesn't quite conform (or at least it didn't the last time I tried it) to the connection profile specification so the connection profile from the VS Code extension won't work without some minor modification and didn't work with a CA not using TLS (IIRC I patched the Go SDK to make it work).
There is work underway to bring the Gateway/Wallet programming model to the Go SDK which will then make working with the VS Code extension a lot easier, but I don't know when a version of the Go SDK with a working implementation will be available.
I am using JMeter 3.3.
I am not able to record traffic from our mobile banking app but I am able to record traffic from simple app which are less secure like weather channel. Can anyone help me here to make my mobile banking app work?
Most probably you need to install JMeter's self-signed certificate onto your mobile device:
Locate ApacheJMeterTemporaryRootCA.crt file (it's being generated in "bin" folder of your JMeter installation when you start HTTP(S) Test Script Recorder)
Transfer it to device somehow (i.e. send it via email and open the attachment on the device side)
Import the certificate to the device, follow your mobile operating system instructions on how to do this
Assuming everything goes well JMeter should be able to intercept, decrypt and record mobile traffic (You might need a 3rd-party application to proxy the secure traffic, i.e. ProxyDroid for Android OS)
You can also consider using a cloud proxy which makes the process of installing the certificate easier, check out A Step by Step Guide to Performance Testing on Native Mobile Apps article for more details.
I built an app to offer a client of the company I work for that I deployed to Firebase. It uses Firebase storage for retrieving files as well as the realtime database. It's actually just the front-end portion of a two-app suite I made; the backend portion is used by an admin for uploading files, checking data, etc --- which data then becomes available to view over the frontend. Both use firebase.
It turns out the devices that would need to access the app (tablets mostly) are inside of an extranet with a server that can establish VPN connections only. Now I'm being asked how I can build the app so these devices can access the app.
I don't know much about the inner-workings of Firebase but it seems to me I may have couple of options:
1) Figure out how to make the FB database accessible over VPN (preferable)
2) Reconfigure the app to use something like MongoDB. Instead of deploying on a remote server, let the on-site server service the devices using the app. Send files that are needed by the server via FTP over the VPN, then process these files on-site.
Problem: I'm using a Mac and the on-site server uses Windows. It will be a pain to install things on a Windows machine remotely, let alone set up the VPN.
Any ideas? I'm sure there are parts of this question where I've made wrong assumptions --- I've never needed to do things over a VPN before.
I need to have a communication channel between my web application that runs on Chrome, and a native code on Windows. I need to run a native code when JS requests and pass the results back from native code. The environment is totally managed so I can set trusts and group policies, etc.
I can think of preparing a small web service that runs locally (and allows CORS) and call this service from javascript, but in this case i need to run this code forever.
Any advices will be very helpful. If it is possible i can try Windows registry write/read, pipes, shared memory, MMF or any other way to do it.
Thanks
There's a way to communicate with local processes without using an extension. Websockets aren't restricted to communicating with the same domain as the web page, they can communicate with a WebSocket server on localhost. You have to wrap your native code in a WebSocket server, libraries are available for that though.
Another method is Native Messaging, but it requires a browser extension:
Native messaging enables a WebExtension to exchange messages with a
native application installed on the user's computer.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging
https://developer.chrome.com/extensions/nativeMessaging
I've been handed a Genexus KB to make an SD app for it. But each time i want to try it i get a "an error occurred in the application server (Not found)" each time i've ran it in a real device (connected in the internal network thorugh) or in an Android Emulator (Andy).
I've setted the KB to point to a local DB stored in my computer and i've tried different ways to try it and it keeps with no luck.
What else should I do?
PS: when i run the web version of it, there's no problem.
Altight people, first of all thanks for the help you gave me!
Secondly #fpanizza that link you gave me was very useful, I could use CatLog with android emulator Andy (after installing Andy Rootkit) and I found out that my app wasn't reaching REST services in the server which leads me to #Franklin, who was right to let me know that it had to do with REST services and I've found out later that i didn't had installed HTTP Activation at one of the WCF Services at the .Net Framework 4.5 Advanced Services, which allowed to reach REST services, and now it worked.
You can try setting the server URL with the IP of your server.
Is probable that the local host is trying to access itself, the android device.
Service URL property: http://wiki.genexus.com/commwiki/servlet/hwikibypageid?21146
Update
I would do what fpanizza suggests on the comment.
Another troubleshooting idea that may bring some light into problem would be to try to access the rest services from a web navigator on the emulator. The idea would be to validate that the emulator/device can "see" the server. Testing outside the app will help understand if the problem is in the app or the server or the connection device - server.
Thank you #Juan.
For better understanding here I enclose the image.
Control Panel > All Control Panel Items > Programs and Features > Turn Windows features on or off