XCode - How to create bundled CLI tool application - xcode

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.

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.

How to bundle in GLFW3 with an Elixir Scenic app distribution for macOS

I am building an Elixir app and I ended up using Scenic https://github.com/boydm/scenic to test some rendering components. When I bundle the app for release and try to run it on another macOS computer it first fails with Gatekeeper stuff (I understand it must be signed) and then once I manually approve all the services it still will not run due to missing GLFW3 library.
What would be the workflow to bundle the Elixir application with GLFW3 so if the application is downloaded via a Zip on a website the end-user wouldn’t have to install GLFW3 via terminal/homebrew? It would just run... I imagine it would somehow have to bundle together via Xcode? So a relatively manual process? Thanks.

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.

Packaging NPAPI plugin for Mac App Store

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.

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