This repository contains distribution builds of the CascableCore framework from version 10.0 for use with the Swift Package Manager (SPM).
Despite the name of the distribution method, the framework is fully compatible with Objective-C. If you're using CascableCore with Swift, we recommend doing so via the CascableCoreSwift package, which contains some great Swift-y additions to CascableCore.
For older releases of the framwork, see the CascableCore Binaries repo.
For more information on the CascableCore product, including getting a trial license, see the Cascable Developer Portal.
The best starting point for working with the SDK is by seeing CascableCore in action by checking out the CascableCore Demo Projects repository. You'll need a trial license for it to do anything useful!
Next, our Getting Started With CascableCore document contains discussion about the CascableCore APIs and concepts in the order in which you're likely to encounter them. These APIs and concepts are equally important for both Objective-C and Swift developers.
API reference documentation for CascableCore can be found here.
To add CascableCore to your project, simply it as you would any other SPM module. If you're using CascableCoreSwift, it will bring CascableCore in as a dependency for you.
Once the SDK(s) are added, a few more steps must be done to comply with App Store and sandboxing policies. Most of this work is done in your app's
If your app is limited by App Transport Security, you need to allow CascableCore to talk to the cameras on your local network.
On iOS 10 and macOS 10.12 and above, set
YES in your
Info.plist App Transport Security settings.
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsLocalNetworking</key> <true/> </dict>
On iOS 9 and macOS 10.11 or lower, you need to disable App Transport Security entirely, by setting
YES. If you do this, you may need to describe why to Apple in order to pass App Review. A paragraph similar to this may suffice:
App Transport Security has been disabled for this app on iOS 9 and lower. This is because the app needs to communicate with cameras discovered on the local network, and App Transport Security provides no way to whitelist the local network or IP address ranges on iOS 9 or lower.
If you support iOS 10/macOS 10.12 and lower you can set both
YES to disable App Transport Security on older OS versions, but use the more secure local networking exemption on newer OS versions. For more information on this, see this thread on the Apple Developer Forums.
CascableCore makes no attempt to communicate with the outside world via the Internet, so no domain-specific App Transport Security exemptions are needed.
Apple's documentation for App Transport Security can be found here.
iOS 14 requires that permission is obtained from the user in order to use the local network. To do so, a usage description must be defined in your
Info.plist via the
<key>NSLocalNetworkUsageDescription</key> <string>MyCoolApp needs access to the local network in order to communicate with cameras over WiFi.</string>
You can find Apple's documentation on this here.
If your app is to work with cameras discovered using Bonjour (Canon EOS cameras in "EOS Utility" mode and some Nikon cameras), you should declare that you're resolving the PTP Bonjour service using the
NSBonjourServices key. For example:
<key>NSBonjourServices</key> <array> <string>_ptp._tcp</string> </array>
You can find Apple's documentation on this here.
If your app is to work with cameras discovered using SSDP (Canon cameras in "Smartphone" mode, some Sony cameras, and most Panasonic cameras), your app will need the
This entitlement must be applied for manually from Apple using this form. When explaining the need for this entitlement, language like this is appropriate:
In some cases, we need to be able to send UDP SSDP discovery broadcasts in order for cameras to be able to discover us and allow a connection. We also perform SSDP searches, and connect to various camera Bonjour services.
Apple's documentation for this entitlement can be found here.
|Last commit: 2 weeks ago|
Added an initial, basic API for working with video recording. This API has currently been implemented for Canon EOS and Nikon cameras.
To see if a camera supports video recording, check for
CBLCameraSupportedFunctionalityVideoRecording. To switch a camera into a mode that allows video recording, use
Once the camera is in a mode in which video recording can go ahead, start and stop video recording with
-endVideoRecording:. Whether or not the camera is currently recording video can be observed with
Video recording has ramifications across the entire API surface of a camera, and particularly changes a number of assumptions you may have been making when working with Canon and Nikon cameras. In particular:
A number of APIs are unavailable while video is recording, including all filesystem access. See the new error code
Canon EOS and Nikon cameras can now be placed into a mode where taking photos isn't allowed. Previously, these cameras always allowed both stills shooting and filesystem access.
Older Canon EOS cameras don't allow video recording while WiFi is active. If you try to start recording video via a WiFi connection, the
CBLErrorCodeDisallowedOnCurrentTransport error will be returned.
Some cameras require moving a physical switch to move the camera in or out of video mode. If that's the case, attempting to switch the available command categories to or from
CBLCameraAvailableCommandCategoryVideoRecording may produce the error
CBLErrorCodeRequiresPhysicalInteraction. If this happens, instruct the user to flip the relavent switch manually. The
-currentCommandCategories property is observable with Key-Value Observing, and will change automatically when the video mode is changed by the user.
CBLCameraSupportedFunctionalityVideoRecording to enable checks to see if video recording is supported by a particular camera.
CBLCameraAvailableCommandCategoryVideoRecording to put a camera into video recording mode.
-currentVideoTimerValue properties to
id <CBLCamera>, which are observable with Key-Value Observing.
id <CBLCamera> to start and stop video recording.
Added the error codes
CBLCameraAvailableCommandCategoryRemoteShooting has been renamed to
A number of existing situations where a camera would return a
CBLErrorCodeNotAvailable error code have been changed so a more accurate error code is returned instead. Particularly,
CBLErrorCodeVideoRecordingInProgress have replaced a number of more generic existing error paths.
Some older Canon cameras will automatically terminate live view when exiting video mode. If this happens, re-start live view.
Newer Nikon cameras have separate properties for video exposure settings, which aren't currently exposed by CascableCore. They will be added in a future release.
Added support for the Canon EOS R3.
CBLCameraSupportedFunctionalityRemoteControlWithoutLiveView to the Canon EOS 5D Mark II. [CORE-363]
Greatly improved file transfer performance from a number of Nikon cameras. [CORE-354]
CascableCore will no longer attempt to deliver shot preview callbacks for video or other non-image file types from Canon or Nikon cameras.
Improved the accuracy of the
active properties of
id <CBLCameraLiveViewAFArea> objects from Canon cameras.
Fixed some missing autoexposure mode localized display values for certain Nikon cameras. [CORE-347]