You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.8 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # Firebase APIs for iOS
  2. Simplify your iOS development, grow your user base, and monetize more
  3. effectively with Firebase services.
  4. Much more information can be found at [https://firebase.google.com](https://firebase.google.com).
  5. ## Install a Firebase SDK using CocoaPods
  6. Firebase distributes several iOS specific APIs and SDKs via CocoaPods.
  7. You can install the CocoaPods tool on OS X by running the following command from
  8. the terminal. Detailed information is available in the [Getting Started
  9. guide](https://guides.cocoapods.org/using/getting-started.html#getting-started).
  10. ```
  11. $ sudo gem install cocoapods
  12. ```
  13. ## Try out an SDK
  14. You can try any of the SDKs with `pod try`. Run the following command and select
  15. the SDK you are interested in when prompted:
  16. ```
  17. $ pod try Firebase
  18. ```
  19. Note that some SDKs may require credentials. More information is available in
  20. the SDK-specific documentation at [https://firebase.google.com/docs/](https://firebase.google.com/docs/).
  21. ## Add a Firebase SDK to your iOS app
  22. CocoaPods is used to install and manage dependencies in existing Xcode projects.
  23. 1. Create an Xcode project, and save it to your local machine.
  24. 2. Create a file named `Podfile` in your project directory. This file defines
  25. your project's dependencies, and is commonly referred to as a Podspec.
  26. 3. Open `Podfile`, and add your dependencies. A simple Podspec is shown here:
  27. ```
  28. platform :ios, '8.0'
  29. pod 'Firebase'
  30. ```
  31. 4. Save the file.
  32. 5. Open a terminal and `cd` to the directory containing the Podfile.
  33. ```
  34. $ cd <path-to-project>/project/
  35. ```
  36. 6. Run the `pod install` command. This will install the SDKs specified in the
  37. Podspec, along with any dependencies they may have.
  38. ```
  39. $ pod install
  40. ```
  41. 7. Open your app's `.xcworkspace` file to launch Xcode. Use this file for all
  42. development on your app.
  43. 8. You can also install other Firebase SDKs by adding the subspecs in the
  44. Podfile.
  45. ```
  46. pod 'Firebase/AdMob'
  47. pod 'Firebase/Analytics'
  48. pod 'Firebase/Auth'
  49. pod 'Firebase/Database'
  50. pod 'Firebase/DynamicLinks'
  51. pod 'Firebase/Firestore'
  52. pod 'Firebase/Functions'
  53. pod 'Firebase/InAppMessaging'
  54. pod 'Firebase/InAppMessagingDisplay'
  55. pod 'Firebase/Messaging'
  56. pod 'Firebase/MLCommon'
  57. pod 'Firebase/MLModelInterpreter'
  58. pod 'Firebase/MLNLLanguageID'
  59. pod 'Firebase/MLNLSmartReply'
  60. pod 'Firebase/MLNLTranslate'
  61. pod 'Firebase/MLNaturalLanguage'
  62. pod 'Firebase/MLVision'
  63. pod 'Firebase/MLVisionAutoML'
  64. pod 'Firebase/MLVisionBarcodeModel'
  65. pod 'Firebase/MLVisionFaceModel'
  66. pod 'Firebase/MLVisionLabelModel'
  67. pod 'Firebase/MLVisionObjectDetection'
  68. pod 'Firebase/MLVisionTextModel'
  69. pod 'Firebase/Performance'
  70. pod 'Firebase/RemoteConfig'
  71. pod 'Firebase/Storage'
  72. ```