2015-09-04 83 views
1

我使用的是Parse pod,它允许我使用Facebook SDK for iOS。iOS 9 Facebook SDK解析

我想为我的应用程序添加对iOS 9的支持,但我面临的迁移问题很少。

首先是有任何一些步骤如何更新我的代码。

我需要先更新Parse吗?并分别设置Facebook Pod吗?

而且我发现这个link,但是当我复制粘贴代码到我的.plist:

<key>NSAppTransportSecurity</key> 
<dict> 
    <key>NSExceptionDomains</key> 
    <dict> 
     <key>facebook.com</key> 
     <dict> 
      <key>NSIncludesSubdomains</key> 
      <true/>     
      <key>NSExceptionRequiresForwardSecrecy</key> 
      <false/> 
     </dict> 
     <key>fbcdn.net</key> 
     <dict> 
      <key>NSIncludesSubdomains</key> 
      <true/> 
      <key>NSExceptionRequiresForwardSecrecy</key> 
      <false/> 
     </dict> 
     <key>akamaihd.net</key> 
     <dict> 
      <key>NSIncludesSubdomains</key> 
      <true/> 
      <key>NSExceptionRequiresForwardSecrecy</key> 
      <false/> 
     </dict> 
    </dict> 
</dict> 

我得到一些问题,Xcode中说:

的数据无法读取因为它的格式不正确。

+0

还有问题与iO9 fb和解析集成 - 唉! – Ronaldoh1

+0

@ Ronaldoh1是的我不知道为什么从Facebook页面提供的代码将无法正常工作。看起来像一个解决方案,但我不能构建应用程序。 –

+0

经过很多个小时,我才开始工作。 CocoaPods没有为我工作。它们尚未针对iOS9进行更新。我使用了解析启动器项目。我还注意到一些框架在文件夹中,但它们没有包含在项目中。我认为这是ParseFacebookUtilsV4没有包括在内。我不得不将我的旧代码添加到启动器项目中。我确保Starter项目能够工作,并能够在我转移我的代码之前登录。这很痛苦#sigh – Ronaldoh1

回答

0

我觉得你的info.plist可能是这样

<key>NSAppTransportSecurity</key> 
<dict> 
<key>NSExceptionDomains</key> 
<dict> 
    <key>facebook.com</key> 
    <dict> 
     <key>NSIncludesSubdomains</key> 
     <true/>     
     <key>NSExceptionRequiresForwardSecrecy</key> 
     <false/> 
    </dict> 
    <key>fbcdn.net</key> 
    <dict> 
     <key>NSIncludesSubdomains</key> 
     <true/> 
     <key>NSExceptionRequiresForwardSecrecy</key> 
     <false/> 
    </dict> 
    <key>akamaihd.net</key> 
    <dict> 
     <key>NSIncludesSubdomains</key> 
     <true/> 
     <key>NSExceptionRequiresForwardSecrecy</key> 
     <false/> 
    </dict> 
    </dict> 
</dict> 

<dict> <------ You couldn't add two dictionaries in one <key></key> 
    <key>hogehoge</key> 
</dict> 

<key>fugafuga</key> 

如果是的话,你应该将hogehoge如下。

<key>NSAppTransportSecurity</key> 
<dict> 
<key>NSExceptionDomains</key> 
<dict> 
    <key>facebook.com</key> 
    <dict> 
     <key>NSIncludesSubdomains</key> 
     <true/>     
     <key>NSExceptionRequiresForwardSecrecy</key> 
     <false/> 
    </dict> 
    <key>fbcdn.net</key> 
    <dict> 
     <key>NSIncludesSubdomains</key> 
     <true/> 
     <key>NSExceptionRequiresForwardSecrecy</key> 
     <false/> 
    </dict> 
    <key>akamaihd.net</key> 
    <dict> 
     <key>NSIncludesSubdomains</key> 
     <true/> 
     <key>NSExceptionRequiresForwardSecrecy</key> 
     <false/> 
    </dict> 
    </dict> 
    <key>hogehoge</key> 
</dict> 

<key>fugafuga</key>