gpt4 book ai didi

iphone - 使用多个 Facebook 应用 ID 的 iOS 应用

转载 作者:行者123 更新时间:2023-12-01 16:55:10 27 4
gpt4 key购买 nike

我有一个应用程序,它使用不同的 Facebook 应用程序(2 个不同的 AppID)在 Facebook 上发布并显示它是“通过 iPhone”/“通过 iPad”。

当 Facebook 应用程序安装在设备上并且用户想要在我的应用程序中使用 Facebook 登录时,Facebook 应用程序将启动 - 并且它不会返回到我的应用程序 - 在 iPad 的情况下。

我尝试将这两个 AppID 都放在 CFUrlScheme 中的 plist(如 fbxxxxxxxxx)中 - 在这种情况下,无论设备是什么,它都不会返回到我的应用程序。如果只有 iPhone 应用程序的 ID,它可以工作(当然,只在 iPhone 上)。

任何帮助将不胜感激 !

最佳答案

也许这会有所帮助。我取自 IOS Programming Guide

Updating Your Info.plist Settings

Most of the existing keys in a universal app’s Info.plist file should remain the same. However, for any keys that require different values on iPhone versus iPad devices, you can add device modifiers to the key name. When reading the keys of your Info.plist file, the system interprets each key using the following format:

key_root-~

In this format, the key_root portion represents the original name of the key. The and portions are both optional endings that you can use for keys that are specific to a platform or device. For apps that run only on iOS, you can omit the platform string. (The iphoneos platform string is used to distinguish apps written for iOS from those written for Mac OS X.) To apply a key to a specific device, use one of the following values:

iphone—The key applies to iPhone devices.

ipod—The key applies to iPod touch devices.

ipad—The key applies to iPad devices.

For example, to indicate that you want your app to launch in a portrait orientation on iPhone and iPod touch devices but in landscape-right on iPad, you would configure your Info.plist with the following keys:

UIInterfaceOrientation

UIInterfaceOrientationPortrait

UIInterfaceOrientation~ipad

UIInterfaceOrientationLandscapeRight

Notice that in the preceding example, there is an iPad-specific key and a default key without any device modifiers. Continue to use the default key to specify the most common (or default) value and add a specific version with a device-specific modifier when you need to change that value. This guarantees that there is always a value available for the system to examine. For example, if you were to replace the default key with an iPhone-specific and iPad-specific version of the UIInterfaceOrientation key, the system would not know the preferred starting orientation for iPod devices.

For more information about the keys you can include in your Info.plist file, see Information Property List Key Reference

关于iphone - 使用多个 Facebook 应用 ID 的 iOS 应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12351216/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com