This is the official template for creating OmniTAK plugins. Use this template to build secure, signed plugins that extend the functionality of the OmniTAK mobile application.
- Use your own Apple Developer account (free or paid)
- Build and test on your own iPhone/iPad
- Perfect for learning and experimentation
- See Local Development Setup
- Submit your plugin for official distribution
- Signed with OmniTAK's certificate via GitLab CI/CD
- Published to official plugin registry
- Available to all OmniTAK users
git clone https://github.com/engindearing-projects/omniTAK-mobile.git
cd omniTAK-mobile/plugin-templateEdit plugin.json with your plugin details:
{
"id": "com.yourcompany.yourplugin",
"name": "Your Plugin Name",
"version": "1.0.0",
"description": "What your plugin does",
"author": "Your Name",
"license": "MIT",
"omnitak_version": ">=1.0.0",
"type": "ui",
"platforms": ["ios"],
"permissions": [
"cot.read",
"ui.create"
],
"entry_points": {
"ios": "YourPlugin"
}
}Edit ios/Sources/PluginMain.swift and implement your plugin logic:
public class PluginMain: NSObject, OmniTAKPlugin {
// Implement initialize, activate, deactivate, cleanup
}# Copy example configuration
cp .bazelrc.local.example .bazelrc.local
# Edit with your Team ID (find at developer.apple.com)
# Change TEAM123456 to your actual Team ID
nano .bazelrc.local# Build for simulator (no signing needed)
./scripts/build_plugin_ios.sh simulator debug
# Build for your iPhone (uses your Apple Developer certificate)
./scripts/build_plugin_ios.sh device debug
# Run tests
./scripts/test_plugin_ios.shIntegrate the plugin into the OmniTAK test app and install on your iPhone.
Want to publish your plugin to all OmniTAK users?
Fork on GitLab to your account.
Follow the local development steps above.
git add .
git commit -m "Add awesome plugin feature"
git push origin your-branchCreate a merge request to the main repository.
The OmniTAK team will review your plugin for:
- Security (no malicious code)
- Quality (follows best practices)
- Functionality (works as described)
Once approved and merged:
- GitLab CI/CD automatically builds with the official OmniTAK certificate
- Plugin is signed with
com.engindearing.omnitak.plugin.*bundle ID - Published to the official plugin registry
git tag v1.0.0
git push origin v1.0.0Your plugin is now available to all OmniTAK users.
my-plugin/
├── plugin.json # Plugin manifest
├── .gitlab-ci.yml # CI/CD pipeline (do not modify)
├── ios/ # iOS implementation
│ ├── BUILD.bazel # Bazel build config
│ ├── Info.plist # iOS framework info
│ └── Sources/
│ └── PluginMain.swift # Main plugin class
├── scripts/ # Build scripts
└── README.md
Request only the permissions your plugin needs:
network.access- Make network requestslocation.read- Access device locationlocation.write- Update location datacot.read- Read CoT messagescot.write- Send CoT messagesmap.read- Access map datamap.write- Add map layers/markersstorage.read- Read local storagestorage.write- Write local storageui.create- Create UI components
func activate() throws {
let cotManager = try context.cotManager
try cotManager?.registerHandler(self)
}
func handleCoTMessage(_ message: CoTMessage) -> CoTHandlerResult {
// Process CoT message
return .passthrough
}func activate() throws {
let mapManager = try context.mapManager
let marker = MapMarker(
id: "my-marker",
coordinate: CLLocationCoordinate2D(latitude: 37.7749, longitude: -122.4194),
title: "My Marker"
)
try mapManager?.addMarker(marker)
}func createPanel() -> UIViewController? {
let viewController = UIViewController()
viewController.title = "My Plugin"
// Add your UI here
return viewController
}func activate() async throws {
let networkManager = try context.networkManager
let url = URL(string: "https://api.example.com/data"). let (data, response) = try await networkManager?.request(url: url)
// Process response
}| Aspect | Local Development | Official Distribution |
|---|---|---|
| Signing | Your Apple Developer cert | OmniTAK official cert |
| Bundle ID | com.yourname.* |
com.engindearing.omnitak.plugin.* |
| Devices | Only your devices | All OmniTAK users |
| Distribution | Manual sharing | Official plugin registry |
| Approval | None needed | Code review required |
| Certificate | Your account | OmniTAK account |
See Local Development Setup Guide for detailed instructions.
# Build for simulator (fastest, no signing)
./scripts/build_plugin_ios.sh simulator debug
# Build for your iPhone
./scripts/build_plugin_ios.sh device debug
# Release build
./scripts/build_plugin_ios.sh device release
# Run tests
./scripts/test_plugin_ios.sh
# Validate plugin
./scripts/validate_plugin.pyThe GitLab CI/CD pipeline automatically:
- Validates - Checks manifest and structure
- Builds - Compiles plugin for iOS
- Tests - Runs unit tests
- Signs - Code signs with OmniTAK developer keys
- Packages - Creates .omniplugin bundle
- Publishes - Uploads to plugin registry (on tags)
These are configured at the GitLab group/project level:
IOS_SIGNING_CERT- Base64-encoded Apple Developer certificateIOS_SIGNING_CERT_PASSWORD- Certificate passwordIOS_PROVISIONING_PROFILE- Base64-encoded provisioning profilePLUGIN_REGISTRY_TOKEN- Token for publishing to registry
- validate - Runs on all branches
- build - Runs on all branches
- test - Runs on all branches
- sign - Runs on main branch and tags only
- package - Runs on main branch and tags only
- publish - Runs on tags only
All plugins are signed with the same Apple Developer certificate as the main OmniTAK app. This ensures:
- Trust chain with the main app
- Consistent bundle ID pattern:
com.engindearing.omnitak.plugin.* - App Store compatibility (if applicable)
Merge to main branch to create a development build:
git checkout main
git merge feature-branch
git push origin mainCreate a git tag to publish a release:
git tag v1.0.0
git push origin v1.0.0The plugin will be published to the OmniTAK Plugin Registry and available for installation.
- Documentation: https://docs.omnitak.io/plugins
- Issues: https://gitlab.com/omnitak/plugin-template/issues
- Community: https://discord.gg/VSUjDddRt3
This template is licensed under MIT. Your plugin can use any license you choose.