Prerequisites
- An iOS application with a deployment target of iOS 15 or later
- Xcode with command-line tools
- CocoaPods
- A physical arm64 iPhone or iPad for runtime verification
- A Nosmai licence key bound to the app bundle ID
Install with CocoaPods
Add the pod to the application target:
platform :ios, '15.0' target 'CameraApp' do use_frameworks! pod 'NosmaiCameraSDK', '3.0.4' end
Install dependencies:
pod install --repo-update
Open the generated .xcworkspace, not the .xcodeproj.
The 3.0.4 pod compatibility release currently resolves the verified nosmai.framework archive from the iOS v3.0.4 GitHub release. The archive is SHA-256 pinned by the podspec.
Add permission descriptions
Add only the descriptions required by enabled application flows:
<key>NSCameraUsageDescription</key> <string>This app uses the camera for real-time filters and effects.</string> <key>NSMicrophoneUsageDescription</key> <string>This app uses the microphone when recording video.</string> <key>NSPhotoLibraryAddUsageDescription</key> <string>This app saves captured photos and videos to your library.</string>
NSCameraUsageDescription is required for preview. Microphone access is needed only when recording audio. Photo Library Add access is needed only when the host app saves output to Photos.
Configure the target
Confirm these settings:
- iOS deployment target is
15.0or later - the application target is selected, not a test or extension target
- a physical iOS device or
Any iOS Device (arm64)is selected - application signing uses the bundle identifier registered in Nosmai Console
- the final app contains
Frameworks/nosmai.framework
The CocoaPod excludes iOS Simulator architectures because the proprietary framework is device-only. Do not work around that exclusion by copying an unverified framework into the Pods directory.
Manual framework installation
Use manual installation only when the project cannot use CocoaPods.
- Download
nosmai.framework.zipandSHA256SUMSfrom the official iOS release. - Verify the archive:
shasum -a 256 -c SHA256SUMS
The expected framework ZIP SHA-256 is:
f63f566f2580c25360d29e667308a127360e558198f05ad437ff1dd5e7a01157
- Unzip the archive.
- Add
nosmai.frameworkto the application target. - Set it to Embed & Sign.
- Link the Apple frameworks listed by the release podspec.
Do not install CocoaPods and a manual copy at the same time. Two embedded copies can cause duplicate symbols or runtime loading ambiguity.
Framework size
The verified iOS release ZIP is 23,962,678 bytes, about 22.9 MiB compressed. This is not the final App Store download increase. App thinning, compression, symbols, existing linked frameworks, and bundled .nosmai assets change the signed application result.
Measure an Archive build for the device family that will ship.
Verify it worked
Add a compile-only import to an Objective-C source file:
#import <nosmai/Nosmai.h> NSString *version = [NosmaiCore shared].version; NSLog(@"Nosmai version: %@", version);
Build the application for a physical device. A successful build and launch with the version log confirms the framework is linked. Continue to the iOS quickstart to initialize the licence, request the camera, and apply a visible effect.
Common errors
| Error | Cause | Fix |
|---|---|---|
No such module 'nosmai' | The workspace or pod target is not being used | Run pod install and open the .xcworkspace |
'nosmai/Nosmai.h' file not found | The framework is missing from the application target | Reinstall the pod or add the verified framework to the correct target |
building for iOS Simulator, but linking in object file built for iOS | A simulator target was selected | Build and run on a physical arm64 iOS device |
dyld: Library not loaded: @rpath/nosmai.framework/nosmai | Manual framework was linked but not embedded | Set nosmai.framework to Embed & Sign |
| App closes when asking for camera access | NSCameraUsageDescription is missing | Add the camera usage string before requesting permission |
Next steps
- Add real-time camera effects to an iOS app
- Get and apply a licence key
- Check iOS capability support
- Apply a beauty filter on iOS
- Control a camera game on iOS