शुरू करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस पेज पर iOS SDK टूल को सेट अप करने का तरीका बताया गया है. अगर आपने ज़रूरी शर्तें पूरी नहीं की हैं, तो पहले उन्हें पूरा करें.
निर्भर है
Swift Package Manager
Xcode में, Google-SearchInApps-SDK Swift पैकेज इंस्टॉल करने के लिए, फ़ाइल > पैकेज जोड़ें पर जाएं....
दिखने वाले प्रॉम्प्ट में, Google-SearchInApps-SDK Swift Package GitHub डेटा स्टोर खोजें:
https://github.com/google/search-in-apps.git
- उस Google-SearchInApps-SDK Swift पैकेज का वर्शन चुनें जिसे आपको इस्तेमाल
करना है. नए प्रोजेक्ट के लिए, हमारा सुझाव है कि आप अगले मेजर वर्शन तक का इस्तेमाल करें
इसके बाद, Xcode आपके पैकेज की डिपेंडेंसी को हल करना शुरू कर देगा और उन्हें बैकग्राउंड में डाउनलोड करेगा. पैकेज डिपेंडेंसी जोड़ने के तरीके के बारे में
ज़्यादा जानकारी के लिए, Apple का लेख पढ़ें.
CocoaPods
CocoaPods का इस्तेमाल करके, Google-SearchInApps-SDK टूल को iOS प्रोजेक्ट में इंपोर्ट करें. अपने प्रोजेक्ट की Podfile खोलें और इस लाइन को अपने ऐप्लिकेशन के टारगेट में जोड़ें:
pod 'Google-SearchInApps-SDK'
इसके बाद, कमांड लाइन से यह चलाएं:
pod install --repo-update
अगर आपने CocoaPods का इस्तेमाल पहले कभी नहीं किया है, तो उनके आधिकारिक दस्तावेज़ देखें. इनमें पॉडफ़ाइल बनाने और उन्हें इस्तेमाल करने के बारे में जानकारी दी गई है.
अपनी Info.plist अपडेट करना
दो कुंजियां जोड़ने के लिए, अपने ऐप्लिकेशन की Info.plist
फ़ाइल अपडेट करें:
- आपकी SDK टूल की एपीआई कुंजी की स्ट्रिंग वैल्यू वाली
GSAAPIKey
कुंजी (ऊपर देखें).
- आपके ऐप्लिकेशन के क्लाइंट आइडेंटिफ़ायर की स्ट्रिंग वैल्यू वाली
GSAClientIdentifier
कुंजी (ऊपर देखें).
सैंपल Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GSAAPIKey</key>
<string>ABC123...xyz890</string>
<key>GSAClientIdentifier</key>
<string>ms-demo-app-sia</string>
...
</dict>
</plist>
Init
ContextualSearchRuntime
का इंस्टेंस बनाएं
Objective-C
ContextualSearchRuntime
ContextualSearchRuntime *searchRuntime = [[ContextualSearchRuntime alloc] init];
आगे बढ़ें: Search से जुड़ी सुविधाएंarrow_forward
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["This guide explains how to integrate the iOS SDK for Google Search in Apps, covering setup, dependency management, and initialization."],["Before starting, ensure you have fulfilled the prerequisites mentioned in the linked documentation."],["You can add the SDK to your project using either Swift Package Manager or CocoaPods, with instructions provided for both methods."],["Remember to update your app's `Info.plist` file with your API key and client identifier for the SDK to function correctly."],["Finally, initialize the `ContextualSearchRuntime` to begin utilizing the search functionalities."]]],["To set up the iOS SDK, first install the Google-SearchInApps-SDK via Swift Package Manager or CocoaPods. For Swift Package Manager, add the package via Xcode using the provided GitHub repository URL. For CocoaPods, add `pod 'Google-SearchInApps-SDK'` to your Podfile and run `pod install --repo-update`. Then, update your app's `Info.plist` by adding `GSAAPIKey` and `GSAClientIdentifier`. Finally, initialize a `ContextualSearchRuntime` instance in either Swift or Objective-C.\n"]]