ios - 如何放入Info.plist 2 <key>CFBundleURLTypes</key>

标签 ios firebase google-cloud-platform nativescript info.plist

我想使用 google 和 facebook 的身份验证,plugin

我想放入Info.plist

对于谷歌:

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>REVERSED_CLIENT_ID</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.googleusercontent.apps.1052836194035-l81fsjai1u40ocnqjcpnoebnnsltt03b</string>
            </array>
        </dict>
    </array>

对于 Facebook :

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>fb{your-app-id}</string>
    </array>
  </dict>
</array>
<key>FacebookAppID</key>
<string>{your-app-id}</string>
<key>FacebookDisplayName</key>
<string>{your-app-name}</string>
<key>LSApplicationQueriesSchemes</key>
<array>
  <string>fbapi</string>
  <string>fb-messenger-share-api</string>
  <string>fbauth2</string>
  <string>fbshareextension</string>
</array>

如何在一个 Info.plist 中同时使用两者?

当我在 facebook 中删除 CFBundleURLTypes 时,在控制台中显示错误:解析时缺少 key

请问有什么想法吗?

最佳答案

将实体归入同一键下,如下所示: (您可以使用以下内容)

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Editor</string>
            <key>CFBundleURLName</key>
            <string>REVERSED_CLIENT_ID</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>com.googleusercontent.apps.1052836194035-l81fsjai1u40ocnqjcpnoebnnsltt03b</string>
               <string>fb{your-app-id}</string>
            </array>
        </dict>
    </array>
<key>FacebookAppID</key>
<string>{your-app-id}</string>
<key>FacebookDisplayName</key>
<string>{your-app-name}</string>
<key>LSApplicationQueriesSchemes</key>
<array>
  <string>fbapi</string>
  <string>fb-messenger-share-api</string>
  <string>fbauth2</string>
  <string>fbshareextension</string>
</array>

关于ios - 如何放入Info.plist 2 <key>CFBundleURLTypes</key>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59391527/

相关文章:

reactjs - 如何在 Firebase firestore 中使用用户 'uid' 创建文档

google-bigquery - 如何在Google云平台中自动加载CSV文件?

ios - 在 iOS 应用程序的键盘上仅显示一部分表情符号

ios - 如何在 NSString 中多次出现的特定字符后获取 NSString?

ios - Apple Mach-O 链接器错误 - GameCenter

ios - 如何在异步调用中退出循环?

使用自定义声明的 Angular 和 Firebase 路线守卫

android - 云功能执行成功但通知未显示android

node.js - 为 GKE kubernetes 集群选择 Node 大小

javascript - Firebase:如何将虚 URL 添加到云功能?