Members
(constant) BBD_IOS_PODSPEC_CONFIG
Config file in ios/; source of truth for BBD podspec URL/path. Written by set-dynamics-podspec; read by hooks.
(constant) debugLog
Debug logging - only when BBD_DEBUG is set. No timestamp.
Writes to console and debug.log when flag enabled.
(constant) logError
Error logging - always to console.error. When BBD_DEBUG is set, also to debug.log.
(constant) replaceAndSave
Safe file modification utility with validation and backup
(constant) updateDevelopmentInfoJson
Updates development tools information for BlackBerry integration
Creates development-tools-info.json files in both Android and iOS projects
containing framework version information, Ionic details, and BlackBerry SDK version.
This information is used by BlackBerry development tools and debugging utilities.
Methods
extractBundleId() → {string}
Extract bundle ID (appId) from capacitor.config.ts or capacitor.config.json.
Used by bbdCapacitorAfterUpdate and cleanup hooks for iOS/Android configuration.
Returns:
The app bundle ID
- Type
- string
getDesiredBbdPodLine() → {string}
Resolve the desired BlackBerryDynamics pod line from config (if present) or plugin package.json default.
Config is read from ios/ so it stays with the platform and we never touch plugin source.
Returns:
Pod line, e.g. `pod 'BlackBerryDynamics', :podspec => 'https://...'` or `:path => '...'`
- Type
- string
getIOSPaths() → {Object|null}
Validates iOS platform exists and returns paths object for Capacitor CLI/Podfile/podspec.
Sets individual paths to null if they don't exist (for version compatibility).
Returns:
Paths object or null if ios directory is missing
- Type
- Object | null
patchCapacitorCLI()
Patches Capacitor CLI to support BlackBerry Dynamics
patchProjectPbxprojDeploymentTarget()
Patches project.pbxproj to set IPHONEOS_DEPLOYMENT_TARGET to the given version (e.g. "17.0")
for all build configurations. SPM-only; ensures Xcode uses BBD-required minimum iOS version.
patchProjectPbxprojForObjC()
Patches project.pbxproj to add OTHER_LDFLAGS = "$(inherited) -ObjC" to the App target's
Debug and Release build configurations. SPM-only (Option B); ensures both configs get -ObjC.
setupCocoaPodsForBBD()
Add BlackBerryDynamics pod (with :podspec URL or :path) to Podfile and patch Capacitor.podspec.
Uses .bbd-ios-podspec.json in the ios/ directory as source of truth when set by set-dynamics-podspec.
Must run in capacitor:update:before so the Podfile has the URL before Capacitor runs pod install
(otherwise CocoaPods resolves "BlackBerryDynamics" from Trunk as 11.0.1.151).
Idempotent.
setupLifecycleHooks()
Sets up Capacitor lifecycle hooks in package.json