iOS - Facebook - You must upgrade this app to Graph API v2.x - ios

upon Facebook login, I am getting this message on the Facebook side: "You must upgrade this app to Graph API v2.x. v1.0 will be deprecated on April 30, 2015.
I have visited the Facebook page but it is unclear to me what I need to do. It had seemed I need to just update the Framework in Xcode to version 3.20 which I have done, but I still am getting this message.
I have cleaned the App before running but I am still encountering this message. Any help would be greatly appreciated!

I was having the same problem. I updated the framework through Xcode and nothing. What I found was that the FacebookSDK.framework in my application folder was not being updated. I deleted and updated with the new framework that I download from Facebook website. It worked. No more warning. I hope that helps

It's all in the docs. Have a look at
https://developers.facebook.com/docs/apps/changelog
https://developers.facebook.com/docs/apps/upgrading#v1tov2
https://developers.facebook.com/docs/ios/upgrading#313to314
https://developers.facebook.com/docs/reference/ios/current/class/FBRequest/#overrideVersionPartWith:

sorry for the delayed response but what camus wrote above was my solution as well. I found i was not linking in plist to the same framework that i had downloaded.

Related

UIWebView Deprecation and App Store Rejection on Xamarin Forms

Can i fix the following ?
My setup
Xamarin.iOS Version: 13.16.0.13 (Visual Studio Community)
Visual Studio Community 2019 for Mac Version 8.5.2 (build 13)
Xamarin.Forms 4.5.0.617
I follow the instruction here
https://learn.microsoft.com/en-gb/xamarin/xamarin-forms/user-interface/webview?tabs=macos#uiwebview-deprecation-and-app-store-rejection-itms-90809
and here
https://github.com/xamarin/Xamarin.Forms/issues/7323#issuecomment-542363338
to fix this problem
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no
longer accepted. Instead, use WKWebView for improved security and
reliability.
but i get the following error on publish
Thank you!
As Microsoft mentions in the Microsoft blog, this is fixed in Xamarin.Forms 4.6
Now in 4.6, we are updating the bindings to Google’s library. We have
improved the styling support for things like, setting a button’s
‘Disabled’ text color. The latest library also removes the reference
to Apple’s deprecated UIWebView.
So update your Xamarin.Forms to Version 4.6.
Adding --optimize=force-rejected-types-removal in mtouch arguments works. I have submitted to TestFlight and I did not get email about UIWebView removal.
I dont know why, but when i changed my app's version number and build number it's worked. Also i create a new app version on App Store Connect.
Same errors in this link helps me
https://forums.xamarin.com/discussion/172296/app-store-connect-application-loader-publishing-failed-failed-to-parse-altool-output
Is two different errors I believe. The first is from deprecated UIWebView and another error (publish error) showed up after the first rejection from apple.
Thanks.
This is not an answer, but I share my experience on this particular issue I also have. Maybe it would helps.
When pusblishing to Apple App Store Connect a new app after April 1st 2020, apple could reject your app if you are using UIWebView. Apps submitted before have warnings, but thoses app will not be submitable past December 2020.
My app is new and I publishing after April 1st. I had some hard time publishing this app using VS 2019 Mac and the archive process. I don't like it. You can have a green screen during publishing and see nothing on the appstoreconnect. This is because Apple reject your app. See your emails, you have :
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability
I suggest to use a archive on your disk and use Transporter app to upload it. It has a log view and warns me about build number issue.
Back on my app, I try the mtouch argument --optimized trick but it doesn't work. I tried Don't link, Link SDK only, Link all to be sure. None worked. Apple keep saying I am using UIWebView. I check my code, I cannot see UIWebView anywhere.
So I wanted to try a fresh app from scratch using last version of Xamarin.Forms 4.6 and publish it. I had the same issue message by Apple. Then I add the --optimizer mtouch argument and publish it. Apple was satisfied. So this means that the "patch" is working.
So as my code doesn't have any UIWebView, I think this could be a tiers library... But how to find... I am try this https://levelup.gitconnected.com/how-to-find-and-remove-uiwebview-uses-in-your-ios-app-d9395f7baacc
The command gives me this :
FirebaseCore
FirebaseCoreDiagnostics
GTMSessionFetcher
GoogleAPIClientForREST
GoogleDataTransport
GoogleDataTransportCCTSupport
GoogleToolboxForMac
GoogleUtilities
PersonalizedAdConsent
U _OBJC_CLASS_$_UIWebView
leveldb
libSkiaSharp
nanopb
protobuf
So I presume those libs are not "compatible"...?
I will update if I find something...

GoogleService-Info.plist not created

I'm upgrading from an earlier version of Google Analytics for my iOS app and when I follow the instructions here, I click the button to create a configuration file and nothing happens. Anyone else experience this? Is there a default GoogleService-Info.plist that I can use and customize?
Thanks!
Seems to be a bug on their site. It worked for me 2 weeks ago. However you have already found Googles Guide - the config file does not contain any complicated settings, however you can download the Sample Apps and get your initial GoogleService-Info.plist file from there:
pod try Google
from
https://developers.google.com/maps/documentation/ios-sdk/code-samples#try-the-sdk-demos-using-cocoapods
Steps for getting configuration if your first time login to google developer account.
1. open google developer console.
2. login to developer console.
3. create project with valid name.
4. then goto the API section & enable GCM API.
5. Then get the configuration file.
Thanks for the suggestions, looks like they would work for others. Unfortunately, I just couldn't get Cocoa Pods to upgrade the analytics, so I switched tactics and used the sdk directly. This worked fine, hopefully others have better luck!

Can't login with Facebook SDK on cordova iOS after changing permissions

I'm using Cordova latest version with this plugin https://github.com/jeduan/cordova-plugin-facebook4... In the first version, I was getting permission for only:
id,email,birthday
And in the 2nd version, I am getting permission for:
id,email,birthday,gender,first_name,last_name
which causes the following error:
domain=com.facebook.sdk.login code=304
But if I removed the app and re-installed it, it works fine!
So, what should I do now? the app in production, and all users can't login, and it is really hard to ask all users to remove the app and re-install it! any idea to release another version with a patch to fix this issue?
I think there is a solution here: ios facebook sdk 4.0 login error code 304, but I'm not a good Objective C developer to know how to implement it in the plugin!
I followed this link: ios facebook sdk 4.0 login error code 304
And made this patch:
https://github.com/mabdelfattah/cordova-plugin-facebook4/commit/e55b974ee62a6c98293fadda688e0382b5e2d45c#diff-c05c80840d093f0d14fb66a56466e521
The issue is because the cordova facebook plugin call facebookConnectPlugin.getLoginStatus() caches the FB response. It doesn't allow us to force a server trip in that call (whereas in the FB Javascript SDK it does).
I resolve the issue by calling facebookConnectPlugin.login() when I get 304. That forces a server trip to reload the FB permission upon a fresh login.

Facebook SDK on Unity 5 on iOS

I have been having trouble getting the latest Facebook SDK 6.2.1 to function with Unity 5.0.0f4 in both my project and an empty one.
Here is what I do:-
Create a blank project
import Facebook SDK
Set App ID and Name in editor settings
Add sample scene to build settings
Build Xcode Project
Open in Xcode
Disable ARC in settings
Remove extra #endif when xcode complains about it
Build and Run game on iOS device
The error I end up with is in the following link:-
dl.dropboxusercontent.com/u/13490919/FacebookiOSProb/Screenshot%202015-03-12%2014.53.29.png
The error I get is "EXC_BAD_ACCESS (code=1)". I'm not much of an xcode/iOS guy so this confuses me a tone load. This error does not occur if facebook isn't present. Has anyone got any idea how to get around this? Surely i'm not the only one with this issue. All I want to do is get an access token from facebook. If need be, I don't mind using a simple webview or something similar.
Any help on this would be much appreciated. I would give free hugs to but ya know.
Thanks
Ive managed to solve the issue. As posted by someone else on unity forums here, you need to mark the option "iOS" as platform for plugin and adding "-fno-objc-arc" as compile flag in the following file: Assets/Facebook/Editor/iOS/FbUnityInterface.mm
This works with the latest versions of Unity 5.0.1f and Facebook SDK 6.2.1 as of this post.
Facebook SDK for Unity Downloads
Note: Only Unity 4 is supported at this time
That is why it's not working. I don't know when Facebook will launch their sdk for Unity 5.

Integrating Facebook Docset with Xcode

So I downloaded the latest 3.1 Facebook iOS sdk and under the scripts I found a build_documentation.sh which I ran. It completed and generated a com.facebook.Facebook-SDK-3_0-for-iOS.docset file. I am trying to get it to integrate nicely with XCode. I know that apple docs can create documentation that shows up in the quick help panel. My own custom documentation works great.
Does anyone know what I have to do to get the same kind of documentation integration with Facebook?
EDIT:
I tried adding the docset to the corresponding folder according to the instructions here
and restarted Xcode but it didn't work
If you install the SDK from the package you don't have to generate the docset yourself.
Go to https://developers.facebook.com/ios
Click on the Download SDK button
You can get the Facebook Documentation working with the following:
Build the Facebook Documentation with the provided shell scripts
Move the .docset to /Library/Developer/Shared/Documentation/DocSets
If it doesn't work, you may have to check, if you moved the docset to ~/Library/Developer/Shared/Documentation/DocSets. This is sometimes WRONG
Why does it work by installing the Facebook Framework directly from the .pkg?
It moves it to /Library/..., not to ~/Library/...

Resources