Google Cloud Console प्रोजेक्ट को कॉन्फ़िगर करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Driver SDK के लिए, अपने मोबाइल ऐप्लिकेशन प्रोजेक्ट और Google Cloud Console प्रोजेक्ट को कॉन्फ़िगर करने के लिए, यह तरीका अपनाएं:
- अगर आपके पास Google Cloud Console डेवलपमेंट प्रोजेक्ट और मोबिलिटी प्रोजेक्ट के लिए एपीआई पासकोड नहीं है, तो आपको इसे सेट अप करना होगा. ज़्यादा जानकारी के लिए, Fleet Engine प्रोजेक्ट बनाना लेख पढ़ें.
- Google Cloud Console में, वही Google Cloud Console प्रोजेक्ट और एपीआई पासकोड चुनें जिसका इस्तेमाल Fleet Engine के लिए किया जा रहा है.
- एपीआई और सेवाएँ चुनें. इसके बाद, Maps के हिसाब से फ़िल्टर करें. इसके बाद, Maps SDK for iOS को खोजें और चालू करें.
प्रोजेक्ट में एपीआई पासकोड जोड़ना
यहां दिए गए उदाहरणों में, Xcode में अपने प्रोजेक्ट में एपीआई कुंजी जोड़ने का तरीका बताया गया है:
Swift
अपनी एपीआई कुंजी को AppDelegate.swift
में इस तरह जोड़ें:
ये इंपोर्ट स्टेटमेंट जोड़ें:
import GoogleMaps
import GoogleRidesharingDriver
अपने application(_:didFinishLaunchingWithOptions:)
तरीके में यह जानकारी जोड़ें:
GMSServices.provideAPIKey("YOUR_API_KEY")
Objective-C
अपनी एपीआई कुंजी को AppDelegate.m
में इस तरह जोड़ें:
ये इंपोर्ट स्टेटमेंट जोड़ें:
@import GoogleMaps;
@import GoogleGoogleRidesharingDriver;
अपने application:didFinishLaunchingWithOptions:
तरीके में यह जानकारी जोड़ें:
[GMSServices provideAPIKey:@"YOUR_API_KEY"];
आगे क्या करना है
पुष्टि करने वाले टोकन बनाना
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eTo use the Driver SDK, you must first set up a Google Cloud console project and an API key for your mobility project if you haven't already.\u003c/p\u003e\n"],["\u003cp\u003eEnsure the same Google Cloud project and API key used for Fleet Engine are selected, and enable the Maps SDK for iOS within the APIs & Services section.\u003c/p\u003e\n"],["\u003cp\u003eIntegrate your API key into your Xcode project by adding it to \u003ccode\u003eAppDelegate\u003c/code\u003e and utilizing necessary import statements (\u003ccode\u003eGoogleMaps\u003c/code\u003e, \u003ccode\u003eGoogleRidesharingDriver\u003c/code\u003e).\u003c/p\u003e\n"]]],[],null,["# Configure a Google Cloud console project\n\nTo configure your mobile app project and Google Cloud console project for the Driver\nSDK, follow these steps:\n\n1. If you don't have a Google Cloud console development project and an API key for your mobility project, you need to set one up. For more information, see [Create your Fleet Engine project](/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/create-project).\n2. In the Google Cloud console, select the same Google Cloud console project and API key that you are using for Fleet Engine.\n3. Select **APIs \\& Services** , filter by **Maps**, and then search for and enable the Maps SDK for iOS.\n\nAdd your API key to the project\n-------------------------------\n\nThe following examples show how to add the API key to your project in Xcode: \n\n### Swift\n\nAdd your API key to your `AppDelegate.swift` as follows:\n\n1. Add the following import statements:\n\n import GoogleMaps\n import GoogleRidesharingDriver\n\n2. Add the following to your `application(_:didFinishLaunchingWithOptions:)`\n method:\n\n GMSServices.provideAPIKey(\"\u003cvar translate=\"no\"\u003eYOUR_API_KEY\u003c/var\u003e\")\n\n### Objective-C\n\nAdd your API key to your `AppDelegate.m` as follows:\n\n1. Add the following import statements:\n\n @import GoogleMaps;\n @import GoogleGoogleRidesharingDriver;\n\n2. Add the following to your `application:didFinishLaunchingWithOptions:`\n method:\n\n [GMSServices provideAPIKey:@\"\u003cvar translate=\"no\"\u003eYOUR_API_KEY\u003c/var\u003e\"];\n\nWhat's next\n-----------\n\n[Create authentication tokens](/maps/documentation/mobility/driver-sdk/on-demand/ios/authenticate)"]]