Packaging NPAPI plugin for Mac App Store - macos

I have a Safari extension built using NPAPI plugin. It was built by a contractor but I was asked to package it up for the Mac App Store.
Now I don't even know if this is possible as it was not built using Cocoa and when I use xcode to Archive it, I get a Generic Xcode Archive as the Archive Type instead of a Mac App Archive, that wont validate.
1. Can this be done in the first place?
2. If so, how do I go about creating the right Archive?
Thanks!

You can't distribute an NPAPI plugin via the App Store:
2.15: Apps must be self-contained, single application installation bundles, and cannot install code or resources in shared locations
An NPAPI plugin isn't an application, and in order to work must be installed in a shared location (the system or user plugin directory), so doesn't meet the App Store criteria.

Related

Go - How to link Go macOS binary in an Xcode project?

I'm completely new to macOS development, this might sound quite basic.
I need to distribute a Golang app for macOS.
I built the Go executable for macOS, the executable works fine on macOS.
I made its .app structure following this tutorial
But before distributing it, I need to do a few things like code signing & integrating Sparkle (for updates).
For that, I need to open this .app as a Xcode project. How do I do that ?
Xcode recognizes .xcodeproj extension
I created a sample Xcode Objective-C project but how do I get this project to run my executable/.app ?
You do not need to open the app as an Xcode project - that doesn't make sense as such and cannot be done, as the app is not an Xcode project.
I would suggest instead using the gon tool you can find here for code signing.
The easiest way to install it is usually through HomeBrew by running:
brew tap mitchellh/gon
brew install mitchellh/gon/gon
The above requires you to have HomeBrew installed in advance.
After installing, you create a config.json file as described on the gon GitHub page, and then run:
gon config.json
That will sign, zip, notarize and staple your application for you - creating a .dmg file for distribution.
In regards to Sparkle for easily updating your program, this is something you have to integrate into your Go program. You can find an example of how to do that here.
The example contains a simply Objective-C function sparkle_checkUpdates() that uses the Sparkle framework to invoke the updating mechanism. It also contains a Go function sparkle_checkUpdates() that use C imports to call that C function described before.
In your existing Go program, you just need to call that sparke_checkUpdates from somewhere when the user wants to check for updates.

XCode - How to create bundled CLI tool application

I'm new to XCode, so maybe I'm missing something that is very easy, but how can I create a CLI tool with XCode and bundle it with a system extension I compiled?
I want to create a console app that is bundled with my system extension and install/uninstall it.
As I understand, the extension should reside in the Contents/Library/SystemExtensions of the application(info from here).
From what I've found, I succeeded only to make a GUI/UI app but not a CLI app that can bundle things inside it.

How to notarize a Java app bundled in .dmg created by Install4j?

I need to notarize a Java app that is bundled by Install4J.
At the end of the process I get:
.dmg: rejected (the code is valid but does not seem to be an app)
It seems I need to sign items within .dmg according to this and this.
I am uncertain how this signing relates to that of made by install4j.
Do I need to use a Code Signing Identity used by install4j or my own to pass to 's' option?
It's not possible with install4j 7.x, but it is going to be supported directly in install4j 8.x, to be released this summer.

Running an Android app that has a dependency of another app in Google ARC

Experimenting with Google Chrome ARC, I'm trying to run my application which has a dependency of another application (in particular, my application is using some library functions from OpenCV, and it needs the "OpenCV Manager" app to be installed on the device in order to work).
Is it possible to tell ARC that the 2 apps are connected (I got the APKs of both apps), or every app is entirely isolated and can't know about other apps?
Your packaged APKs in your CRX file are isolated from those in any other CRX file, with the special exception of any APKs inside the ARC runtime CRX file.
You may be able to package the OpenCV manager APK in with your app (inside the same CRX file). It sounds like the license terms would allow it (but require a copyright notice). Since it would be bundled, you would lose out on automatic updates, which may or may not be a problem for you.
We definitely have integration tests which bundle two APKs together like this. However I'm not sure we have done much testing around having a service APK (like OpenCV Manger) with a normal app APK, so you may run into additional issues.
Note that ARC tries to start the main activity in the last APK installed (listed in the metadata file), so the OpenCV APK should be listed first.

How can I make iWork load my plugin? (Like MathType?)

I would like to create a plugin for iWork, like MathType. The issue is that the plugin architecture for iWork is entirely undocumented. I have experience creating plugins for other applications, such as Xcode. To make a plugin for Xcode, you need to make sure your plugin bundle is located in the proper directory where Xcode looks for plugins when it launches, and that your Info.plist is set up properly.
I have no idea how MathType is able to embed itself in the iWork apps. I've gone over all of its install logs and grepped over my entire machine to find all the files it installs - all of them are placed inside my Applications directory in a file called "MathType 6". Nothing about its Info.plist appears magical in anyway.
There's also the LinkBack plugin which embeds itself in the iWork apps. I've attempted to contact the authors of both MathType and LinkBack a few times over the past year, but they've never gotten back to me.
Is there anyone who knows how to write a plugin for an iWork application? What are the magical essentials that I need for iWork applications to load my plugins when they start up?

Resources