इंस्टॉलेशन
AIBuds SDK को CocoaPods से इंस्टॉल करें। यदि ऐप में आवश्यक सुविधाएँ अभी तय नहीं हैं, तो पूर्ण इंस्टॉलेशन से शुरुआत करें।
आवश्यकताएँ
- iOS 13.0 या नया
- Xcode 26.0 या नया
- CocoaPods 1.16.0 या नया
इंस्टॉलेशन का तरीका चुनें
पूर्ण इंस्टॉलेशन
AIBudsSDK/AllInOne से डिवाइस कनेक्टिविटी, AI सेवाएँ, वॉइस असिस्टेंट, मीडिया, डायग्नोस्टिक्स और अन्य वैकल्पिक SDK घटक एक साथ इंस्टॉल करें।
मॉड्यूलर इंस्टॉलेशन
केवल वे सुविधाएँ चुनें जो आपके उत्पाद में उपयोग होती हैं। आवश्यक SDK लेयर और तृतीय-पक्ष निर्भरताएँ CocoaPods अपने आप इंस्टॉल करता है।
AI कोडिंग सहायक से इंटीग्रेट करें
इंस्टॉलेशन चुनें, फिर प्रोजेक्ट वर्कस्पेस में छोटा प्रॉम्प्ट अपने AI सहायक को दें।
AIBudsSDK/AllInOne के साथ पूरा SDK इंस्टॉल करें।
https://docs-aibuds.github.io/hi/skills/integrate-aibuds-sdk को पढ़ें और निर्देशों का पालन करें। इस iOS प्रोजेक्ट में AIBudsSDK/AllInOne इंटीग्रेट करें और सत्यापित करें।चरण 1: Podfile में SDK जोड़ें
हर AIBudsSDK Pod घोषणा में Git source:
:git => 'https://github.com/topstepsmart/AIBuds-SDK-iOS.git'या लोकल SDK path देना आवश्यक है:
:path => '../AIBuds-SDK-iOS'नीचे दिए उदाहरणों में source शामिल नहीं है। अपने प्रोजेक्ट के अनुसार उपयुक्त रूप जोड़ें।
- पूर्ण इंस्टॉलेशन
- मॉड्यूलर इंस्टॉलेशन
platform :ios, '13.0'
target 'YourTargetName' do
pod 'AIBudsSDK/AllInOne'
endplatform :ios, '13.0'
target 'YourTargetName' do
# Device connectivity.
pod 'AIBudsSDK/ABMate'
# Choose one AI provider.
pod 'AIBudsSDK/AI/StarBurst'
# pod 'AIBudsSDK/AI/MltCloud'
# Add only the optional capabilities your product enables.
# pod 'AIBudsSDK/VoiceAssistant' # On-device voice assistant
# pod 'AIBudsSDK/LiveStream' # RTSP playback and RTMP streaming
# pod 'AIBudsSDK/VideoStabilization' # Imported six-axis video
# pod 'AIBudsSDK/FitCloudProOTA' # FitCloud Pro OTA devices
# pod 'AIBudsSDK/JieliOTA' # Jieli single-bank OTA devices
# pod 'AIBudsSDK/Log/XLFacility' # Persistent logs
# pod 'AIBudsSDK/AI/Dashboard' # Local AI diagnostics
# pod 'AIBudsSDK/CrashReporter' # Persisted crash reports
endसभी मॉड्यूल देखें
# Installing only AIBudsSDK selects Core.
# It does not include ABMate, an AI provider, or optional features.
pod 'AIBudsSDK'
# Base SDK types, Bluetooth orchestration, models, and protocols.
# Includes: Foundation, Log/Core
pod 'AIBudsSDK/Core'
# ABMate BLE device communication.
# Includes: Core, GCDWebServer, libopus
pod 'AIBudsSDK/ABMate'
# Shared audio-session and voice-activity processing for AI.
# Includes: Core, tenVad
pod 'AIBudsSDK/Audio'
# Core logging without the XLFacility backend.
# Includes: zipzap
pod 'AIBudsSDK/Log/Core'
# Persistent logging and local log-browser integration.
# Includes: Log/Core, iOSLogBrowserSDK
pod 'AIBudsSDK/Log/XLFacility'# Optional OTA protocol plugins. Install only the implementations required by
# your devices, then register each plugin before connecting a device.
pod 'AIBudsSDK/FitCloudProOTA'
pod 'AIBudsSDK/JieliOTA'# AI facade, sessions, reports, and provider routing.
# Includes: AI/Foundation, Core, WCDB.swift
pod 'AIBudsSDK/AI/Core'
# StarBurst AI services.
# Includes: AI/Core, Audio, StarBurst SDK, LAME, libopus, libogg
pod 'AIBudsSDK/AI/StarBurst'
# MLTCloud AI services.
# Includes: AI/Core, Audio, MagicHelper, Microsoft Speech, LAME, libopus, libogg
pod 'AIBudsSDK/AI/MltCloud'
# Local AI diagnostic dashboard.
# Includes: AI/Core, WCDB.swift, GCDWebServer, YYWebImage, iOSLogBrowserSDK
pod 'AIBudsSDK/AI/Dashboard'# On-device voice assistant authentication bridge.
# Includes: Core, MZEncryptSDK, OpenSSL
pod 'AIBudsSDK/VoiceAssistant'
# Persisted crash-report capture and access.
# Includes: CrashReporter framework
pod 'AIBudsSDK/CrashReporter'
# Native RTSP playback and RTMP streaming.
# Includes: Log, FFmpeg, LiveStream resource bundle
pod 'AIBudsSDK/LiveStream'
# Post-processing for imported six-axis video.
# Includes: Core, bundled AWEISIMG implementation
pod 'AIBudsSDK/VideoStabilization'एक से अधिक सुविधाओं वाले subspec# Log/Core + Log/XLFacility
pod 'AIBudsSDK/Log'
# AI/Foundation + AI/Core + both providers + AI/Dashboard
pod 'AIBudsSDK/AI'
# Log + ABMate + FitCloudProOTA + JieliOTA + AI + VoiceAssistant
# + CrashReporter + LiveStream + VideoStabilization
pod 'AIBudsSDK/AllInOne'
# Do not normally select these implementation layers directly:
# AIBudsSDK/Foundation
# AIBudsSDK/AI/Foundation
# AIBudsSDK/ThirdParty/*
चरण 2: आवश्यक Podfile hook जोड़ें
यह ब्लॉक Podfile में केवल एक बार जोड़ें। यह आवश्यक dynamic framework कॉन्फ़िगर करता है, असमर्थित private header import हटाता है और बाइनरी वितरण की संगतता चालू करता है।
dynamic_frameworks = ['AFNetworking', 'WCDB.swift', 'WCDBOptimizedSQLCipher', 'SocketRocket']
pre_install do |installer|
installer.pod_targets.each do |pod|
if dynamic_frameworks.include?(pod.name)
def pod.static_framework?; false; end
def pod.build_type; Pod::BuildType.dynamic_framework; end
end
end
end
def patch_private_header(installer, pod_subdir_pairs)
pod_subdir_pairs.each do |pod_name, sub_dir|
target_dir = sub_dir ? File.join(installer.sandbox.pod_dir(pod_name), sub_dir) : installer.sandbox.pod_dir(pod_name)
puts target_dir
next unless Dir.exist?(target_dir)
private_header_import = '#import <netinet6/in6.h>'
Dir.glob(File.join(target_dir, '**', '*.{h,m}')).each do |file_path|
puts file_path
next unless File.exist?(file_path)
file_content = File.read(file_path)
next unless file_content.include?(private_header_import)
original_mode = File.stat(file_path).mode
File.chmod(original_mode | 0o200, file_path)
File.write(file_path, file_content.gsub(private_header_import, ''))
File.chmod(original_mode, file_path)
puts "patched #{pod_name} private header import: #{File.basename(file_path)}"
end
end
end
post_install do |installer|
patch_private_header(installer, {'AFNetworking' => 'AFNetworking', 'Reachability' => nil })
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
endचरण 3: इंस्टॉल करें और workspace खोलें
CocoaPods चलाएँ और .xcodeproj के बजाय बनाया गया workspace खोलें:
pod install
open YourProject.xcworkspaceचरण 4: अनुमतियाँ जोड़ें
डिवाइस कनेक्शन के लिए आवश्यक
Info.plist में Bluetooth उपयोग के दोनों विवरण जोड़ें:
<key>NSBluetoothWhileInUseUsageDescription</key>
<string>Your app needs Bluetooth access while in use to connect to AIBuds devices.</string>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Your app needs Bluetooth access to communicate with AIBuds devices.</string>किसी भी Bluetooth key के न होने पर AIBudsSDK.initialize, false लौटाता है।
केवल उपयोग की जा रही सुविधाओं के लिए जोड़ें
| सुविधा | अतिरिक्त कॉन्फ़िगरेशन |
|---|---|
| iPhone पर ऑडियो रिकॉर्डिंग | माइक्रोफ़ोन उपयोग का विवरण |
| लाइव स्ट्रीमिंग, Camera OTA या डिवाइस hotspot से मीडिया डाउनलोड | लोकल नेटवर्क उपयोग का विवरण, Bonjour service, Access WiFi Information और Hotspot Configuration |
| बैकग्राउंड Bluetooth या AI वार्तालाप | उपयोग किए जा रहे व्यवहार के लिए आवश्यक Background Modes |
वैकल्पिक अनुमति और entitlement के उदाहरण देखें
माइक्रोफ़ोन<key>NSMicrophoneUsageDescription</key>
<string>Your app needs microphone access for simultaneous interpretation and conversation translation.</string>
लोकल नेटवर्क और Bonjour<key>NSLocalNetworkUsageDescription</key>
<string>Your app needs local network access to stream live video, perform device updates, and download recordings and photos.</string>
<key>NSBonjourServices</key>
<array>
<string>_dummy._tcp</string>
</array>
बैकग्राउंड मोड<key>UIBackgroundModes</key>
<array>
<string>bluetooth-central</string>
<string>push-to-talk</string>
<string>audio</string>
</array>
Hotspot entitlement
ऐप target के Signing & Capabilities टैब में Access WiFi Information और Hotspot Configuration चालू करें:<key>com.apple.developer.networking.wifi-info</key>
<true/>
<key>com.apple.developer.networking.HotspotConfiguration</key>
<true/>
चरण 5: इंस्टॉलेशन जाँचें
- बनाए गए
.xcworkspaceको बिल्ड करें। - जाँचें कि target इंस्टॉल किए गए AIBuds framework इंपोर्ट कर सकता है।
- आवश्यक Bluetooth key जोड़ने के बाद जाँचें कि
AIBudsSDK.initialize,trueलौटाता है। - SDK इनिशियलाइज़ करने और डिवाइस कनेक्ट करने के लिए त्वरित शुरुआत पर जाएँ।
इंस्टॉलेशन या इनिशियलाइज़ेशन विफल होने पर Pod cache या lockfile बदलने से पहले सामान्य समस्याएँ में दिए गए जाँच चरण अपनाएँ।