How to add .plist file to all targets in Xcode?

后端 未结 5 1549
猫巷女王i
猫巷女王i 2021-02-03 17:02

Totally new to iOS but I\'m currently trying to setup Google Analytics. I have followed the SDK documentation and everything went great until this step:

相关标签:
5条回答
  • 2021-02-03 17:39

    If you select the plist in question and then go to the file inspector (press command+option+1 or select the first tab on the right panel), you can select on which targets you wish to include it:

    0 讨论(0)
  • 2021-02-03 17:43

    Select the GoogleService-Info.plist in the project navigator (the file hierarchy on the left side of Xcode). Then, if it isn't open yet, open the utilities bar (click the top-right most button in Xcode). You will see a section 'Target Membership'. Check all the checkboxes to add the .plist to all targets.

    In most cases it is enough to just add the file to your project.

    0 讨论(0)
  • 2021-02-03 17:43

    Physically drag the GoogleService-Info.plist file from your download folder ( or wherever you saved it) to your main project directory as shown below. Once you do that, the "Targets" dialog should open automatically and you can choose all targets (...click on all the targets shown)

    0 讨论(0)
  • 2021-02-03 17:51

    Update for Xcode 12.3:

    It should be selected automatically, but check anyway:

    ce you drag the file to the root dir, select it and on the very right hand side you will see Target membership, make sure all the targets are selected.

    0 讨论(0)
  • 2021-02-03 18:04

    In Xcode 6 Follow the step sequence in this digram.

    1. First select your target.
    2. Select build settings tab.
    3. Search for "info.plist file"
    4. Edit the value for key "info.plist file" (Add the actual plist path in step 4)

    0 讨论(0)
提交回复
热议问题