Can't connect to Facebook via Facebook iOS SDK - ios

I'm trying to connect to facebook from my iOS application, so I can make a wall-post.
I've tried using Sharekit, and also the Facebook mobile API.
Using the 'stable' Sharekit, I can connect, but I'm lacking features I need with that version.
So I've tried using the latest Sharekit from GIT, with no luck.
After providing my facebook login information, I always receive an error of the following flavour:
"This page contains the following errors: 'error on line 2 at column 75: EntityRef: expecting ';'"
Occasionally I'll get a different line # or slightly different error message, but there's always an EntityRef problem on a line/column.
Giving up on that, I tried using the facebook mobile SDK and have the exact same problem.
I then tried the facebook sample app, and have the same problem.
I've setup a facebook app account, and I've specified that AppID (247969245245487) in all the place I believe I need to:
static NSString* kAppId = #"247969245245487" in the sample app's appdelegate
#define SHKFacebookAppID #"247969245245487" in SHKConfig.h for Sharekit.
Likewise, I've got the following in the info.plist for both apps:
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb247969245245487</string>
</array>
I'm using XCode 4.0.2.
I'm at a bit of a loss here... any tips or thoughts on where I could start debugging?

I'm experiencing the same problem, and I'm not sure what's changed on Facebook's end that causes the problem, but I do believe it's on their end. That said I did find a "solution" that worked for my customers:
If your simulator or device has the Facebook Mobile app installed, an updated version was recently made available on the app store. When I updated to that latest version, the problem went away for me.
When the simulator or device doesn't have the official Facebook app installed, the iOS SDK (for me) doesn't generate the same error.
So again, I only experienced it on devices that had the Facebook app installed, and then the problem was "fixed" when I updated to the latest version of that app. Maybe this'll work for you too?

Related

Add a key named FacebookClientToken to your Info.plist, and add your client token as its value while running Flutter app in IOS

I am getting errors while running my app in Xcode / iOS via Android Studio. The app is working on Android devices but on iOS, it's freezing in Splash Screen.
So, I have to try many things to solve this error. Finally, I solve this & the answer is below.
A major change in Xcode & iOS Development in Flutter is that info.plist you have to add some more information for Facebook Authentication. According to Facebook's documentation, I need to add the following to info.plist:
<key>FacebookAppID</key>
<string>3088*******</string>
<key>FacebookClientToken</key>. //You have to add this key
<string>3088986********</string> // And client token value from facebook developer page
This will solve my issue. while running the app in iOS Xcode & Mac. Hope This will solve your issue too.

How to fix if App rejected for using UIWebView in code?

I have been trying to upload an iOS app to Appstore but its only appearing on "Activity" tab for 3-5 minutes and then disappears.
Then I got an email from Apple saying that my app is rejected because it is using UIWebView in one of the view controller. I deleted that particular screen and reuploaded the app and had the same error email.
Then I checked my third-party sdks like FacebookLoginSDK and GoogleSignInSDK and updated those and then checked that if the app has no UIWebView which it did not. Then i reuploaded the app but this time again I had the same error email. I have searched the whole storyboard source code and the whole app code to look that if there is any sign for UIWebView but there is nothing, but still I am getting this email.
I also tried deleting 'Derived Data' folder several times and cleaning the build folder also but nothing helps.
On the other hand I have uploaded a different app today which had UIWebView and it got approved but I also got the same email for not using UIWebView.
Does anybody had this kind of experience or can anybody tell me whats going on ?
I got the same issue before.
If you have uploaded the build and showing it in activity tab for few minutes then its not mean that issue is only about UIWebview but there can be some other issue as well.
I have uploaded my app n got the mail related to UIWebview, so I coverted the UIWebview to WKWebView and again I uploaded but that time same thing happend.
I failed to tackle the problem.
Then I mailed to Apple Developer Support and they replied like
Any of the third party library internally using some privacy data you should ask permission for the same.
Then I checked Info.plist, I have given each permission in list still how it comes that we don't understand.
Finally then after whole search the one third party library internally using motion related data without permission so this happened.
Then I have added that in plist and then again uploaded and its approved.
So please you can check your info.plist and also check whether your third party library using any privacy sensitive data without permission or not.
May it help you at some point.
Make sure you update all your plugins to the latest version!
Check this: https://ionicframework.com/blog/understanding-itms-90809-uiwebview-api-deprecation where you can find the plugins that have known issues concerning the old WebView usage.
But be aware that uninstalling and re-installing some plugins will NOT will not install the latest available version of the plugin!
So to be sure that you are re-installing the latest version of a plugin, go to the github repository of the cordova plugin and search for the plugin.xml file and open it. Then, copy the version string found in the root xml element.
Finally, install the plugin like that: ionic cordova plugin add plugin_name#copied_version
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-firebase" version="2.0.5"
xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<name>Google Firebase Plugin</name>
...
...
...
</plugin>
Are you using the AdMob plugin?
It is not enough to check for the absence of "UIWebView" strings!
You have to make sure that all third party plugins are up to date.
One of the trickiest situations I had went to is when I had tried to update an app (using AdMob) on the AppStore after Apple started rejecting apps using the UIWebView.
The generated iOS source code has no UIWebView references, but still rejected!
After a long headache, I realized that the Google AdMob SDK version I'm using is out of date, knowing that I had updated the AdMob plugin from the CLI, but it seems that the SDK is not updated when updating from the npm.
Finally, I had downloaded the latest AdMob SDK from this link https://developers.google.com/admob/ios/download and replaced it in the source code of the AdMob SDK plugin. Then I had followed the instructions found in this link https://developers.google.com/admob/ios/quick-start to update the code in the xCode.

Trigger.io: iOS 9 iPad Multitasking error

UPDATE: This problem is now solved by using the latest version of Trigger.io
This question is about how to get around the ITMS-90475 error using Trigger.io (and not xcode).
After the release of iOS 9, i get the following error when submitting an app to the App Store that is built using Trigger.io/Forge:
ERROR ITMS-90475: "Invalid Bundle. iPad Multitasking support requires launch story board in bundle
I am developing on linux, and not using xcode to upload my app. From other stackoverflow answers (e.g. this: https://stackoverflow.com/a/32563605/1030104) I see one solution is to disable multitasking support using xcode.
Does anyone know whether this is possible to do using only Trigger.io and not xcode?
According to this answer, your bundle should be valid if you deactivate multitasking for your app. Add this to your Info.plist:
<key>UIRequiresFullScreen</key>
<string>YES</string>
As you're using Trigger.io, this means you have to edit the Info.plist file in between forge build and forge package either programatically (as part of your build process) or by editing the file manually.
For your target, check Requires Full Screen on the General Page:
try adding the bellow code to the info.plist
<key>UIRequiresFullScreen</key>
<true/>

"Attempts to access secure API” error in Blackberry - Phonegap

When I tried to install my phonegap app in Blackberry device it's showing an error like "Attempts to access secure API".
But the same app running properly in "Blackberry Simulator".
How can I resolve this error?
Please help...
You forgot to sign your application before installing it on an actual device. Unsigned app works on simulator, but you need to sign it to run it on actual device.
Get your signing keys here: https://www.blackberry.com/SignedKeys/codesigning.html
EDIT: updated signing keys link, because RIM (BlackBerry) has updated their web-site and old link pointed to 404 error page.

weinre with iPhone simulator

I am experimenting the PhoneGap development for IPhone. The environment is XCode 4.1, PhoneGap 1.0. I am using the Weinre remote debugger according to the tutorial provided by PhoneGap, when I run the app in IPhone Simulator, I got this error shown in XCode output:
2011-08-31 09:31:15.275 Contacts[898:11803] ERROR whitelist rejection: url='http://localhost:8080/target/target-script-min.js#anonymous'
The URL is pointing to the Weinre server and it works in browser. I can't find anything about the "whitelist rejection" error in google. Any idea what does this mean?
Thanks!
whitelist support was recently added to phonegap.
see here and here.
to fix this, you just need to add the needed domains in your PhoneGap.plist to your ExternalHosts-Array.
In your case, it would be localhostand would look like this:
just code, because can't post an image:
<key>ExternalHosts</key>
<array>
<string>localhost</string>
<string>debug.phonegap.com</string>
</array>
Now that Apache Foundation has taken over the name has changed from PhoneGap.plist to Cordova.plist, but it's still ExternalHosts, this helped me get Weinre running which makes a huge difference when debugging directly on an iDevice.

Resources