iOS Facebook SDK error language - ios

I am wondering if the Facebook SDK for iOS provides a method for localizing the error messages.
From here: https://developers.facebook.com/docs/ios/errors/ I learned that there's an easy way to get a description of e.g. Login errors which you can display to the user:
[FBErrorUtility userMessageForError:error];
But that only returns an english version. Is there any way to automatically translate that to a different language? Or a different method to return a localized string? Otherwise this convenient method would be kind of useless for non-english apps.
Regards
Kim

Ok, I figured it out myself.
I had to create a bundle file, set it in the .plist under the key "FacebookBundleName" and overwrite the needed Error Message key/value pairs there.
Took me a while to get it running, but the Scrumptious sample helped me figure it out.
See "How can I localize the Facebook images and strings?" in
https://developers.facebook.com/docs/ios/troubleshooting/

Related

Interpreting nm output after rejected app

my app was rejected by Apple, because somehow my app uses private API's.
Apple said that my app uses
framework: '/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation': CFHashBytes
I couldn't find anything in the code, so I searched stackoverflow and fout out that I can use otool or strings.
With string I find two "hash" calls (wherever they are) and using nm, I get the following output:
nm Sporty\ Architect | grep hash
0000000100077490 T __TFO16Sporty_Architect12ActivityTypeg9hashValueSi
0000000100056240 T __TFO16Sporty_Architect12RotationModeg9hashValueSi
0000000100064480 T __TFO16Sporty_Architect13DraggedSliderg9hashValueSi
000000010003e3a0 T __TFO16Sporty_Architect8FileTypeg9hashValueSi
000000010003d910 T __TFO16Sporty_Architect9DateRangeg9hashValueSi
0000000100021360 T __TFO16Sporty_Architect9ModelModeg9hashValueSi
U __TFSig9hashValueSi
00000001000777b0 T __TTWO16Sporty_Architect12ActivityTypes8HashableS_FS1_g9hashValueSi
00000001000562e0 T __TTWO16Sporty_Architect12RotationModes8HashableS_FS1_g9hashValueSi
0000000100064500 T __TTWO16Sporty_Architect13DraggedSliders8HashableS_FS1_g9hashValueSi
000000010003e9d0 T __TTWO16Sporty_Architect8FileTypes8HashableS_FS1_g9hashValueSi
000000010003e080 T __TTWO16Sporty_Architect9DateRanges8HashableS_FS1_g9hashValueSi
0000000100021500 T __TTWO16Sporty_Architect9ModelModes8HashableS_FS1_g9hashValueSi
I think the U __TFSig9hashValueSi is it, isn't it? But now the question...how can i narrow this down any further?
It is beyond me, why Apple offers a validate button that shows that everything is OK and once the app is in review, it gets rejected for something, that could clearly be detected at compile time (or at least when it is submitted).
If you don't use any external API or framework, CFHashBytes is present only in Swift framework.
I had this issue with two Apps. I have sent this message to the Resolution Center and now both have been approved:
"Hello,
I think that there is an error. The only file that contains that non-public API is libswiftFoundation.dylib, framework used in Swift Apps. Xcode uses it automatically. Please, check it again.
Many thanks."
I hope this helps you.

Flurry Crash Reporting not working

I have tried like below in my app delegate. Can you please tell me what's going wrong here:
Flurry.setDebugLogEnabled(true)
Flurry.setLogLevel(FlurryLogLevelDebug)
Flurry.setEventLoggingEnabled(true)
Flurry.setBackgroundSessionEnabled(true)
Flurry.setCrashReportingEnabled(true)
Flurry.setShowErrorInLogEnabled(true)
Flurry.startSession("KEY")
As stated in this post please check with the support from Flurry first, to make sure that this isn't normal behaviour. The post also states that it can take up to 8 hours for a crash to appear in the dashboard.
Flurry support page : https://developer.yahoo.com/flurry/support.html
Make sure to include your API-key in the email, so they can actually check on your problem.

Facebook iOS deep linking - can't parse request_ids since target_url is missing

First I just want to state that I already know this question exist. It is somewhat similar to mine. But since I don't have enough reputation I couldn't comment and ask if there was any progress on the issue.
Ok, so I'm trying to retrive the request_ids from the target_url, as per the Facebook docs. When the user taps on a request in the native Facebook iOS app, iOS switches to my app, and when I try to process the app launch url in order to parse out the request_ids, I can't even find the target_url.
The launch url should look something like:
fb00000000000000://authorize/#access_token=00000000000000&expires_in=86400&target_url= http://m.facebook.com/apps/friendsmashsample?fb_source=notification&request_ids=abc&ref=notif&app_request_type=Duser_to_user
But in my case the target_url is missing, and instead it looks like:
fb00000000000000://authorize/#access_token=0000000000000&expires_in=86400
So my question is: How do I get the target_url, so that I can parse the request_ids in order to deep link in my app?
Thanks!

iOS 6 SLComposeViewController - creating a facebook post with text and URL - no image

Quite simply unable to make a post with just the text and NSURL object. I can do it with just the post, or with the post, NSURL and image, but ideally I'd just like to provide the link with the post.
It simply states "Cannot post to Facebook" as "The post cannot be sent because the connection to Facebook failed."
Is there anything I can do? I'm not using the Facebook SDK at the moment, but perhaps I might have to?
Many thanks
We just started running in to this issue with code that was working correctly yesterday. Googling shows a lot of people having this issue sharing from other Apple apps today via native integration. I actually think this is an issue on Facebook's end.
I tried sharing a URL from Mobile Safari and it too fails with the same error. Can you confirm that Mobile Safari also fails to share?
Well for now I'm able to leave the image part nil (still include the method, just leave the argument nil) and it will show the text and link only.

Using AddThis SDK for iOS, Need to change "via #AddThis" for default Twitter text

First ever SO question, woohoo.
I've integrated the AddThis SDK into an iOS app. I've set it up to share the App Store link to the App via various channels. All works well except the default text in the Twitter message appends "via #AddThis" to the end of the tweet. Although this text is editable by the user, I'd like to change it to "via #MyTwitterHandle".
AddThis' documentation says you can use:
[AddThisSDK setTwitterViaText:#"MyTwitterHandle"];
Except this doesn't work. It raises a warning that AddThisSDK may not respond to the method call and the app crashes when it reaches this line.
Examining the AddThisSDK header file, there's no such method outlined. I've searched their forums and FAQ etc to no avail. And I did run into other instances where the method names in their documentation were different from those in the SDK. If that's the case here I haven't found the correct name. Does anyone know how to do this?
Thanks in advance.
Do you have the latest version of the addthis iOS sdk? http://www.addthis.com/help/ios-quickstart
Please set setTwitterViaText before the sharing code.
This will work:
[AddThisSDK setTwitterViaText:#"My App"];
[AddThisSDK shareURL:myUrl withService:#"twitter" title:#"myTitle" description:myDescription];
This will not work:
[AddThisSDK shareURL:myUrl withService:#"twitter" title:#"myTitle" description:myDescription];
[AddThisSDK setTwitterViaText:#"My App"];

Resources