Facebook SDK on Unity 5 on iOS - 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.

Related

How to use Swift Pod in Unity exported iOS App

I have reach experience in iOS native app development, My company have a unity app. Unity app developer exported the app for iOS and shared with me. I wanted to use my own created cocoa-pod library (which I have already using in my another iOS App) into Unity iOS project.
So Unity developer exported by File -> Build Settings, choose iOS and click Build, and now I am trying integrated pod (which is written in Swift 4.2) into Unity exported of iOS project.
I have taken medium post and many more reference, I have implemented the same as conclusive direction. Please look the attached screenshot below.
Reference - https://medium.com/ios-os-x-development/swift-and-objective-c-interoperability-2add8e6d6887
Please look the below screenshot for autogenerated file
Now when I am going to import this autogenerated header file to make connection between Objective C to Swift, then it is showing error as attached screenshot below
Please help me to resolve this issue. Thanks in advance.
One thing that has hung me up on this in the past is if you get an error during the initial build, then sometimes it doesn't create the -swift.h file and then subsequent builds also get an error that it's missing. Make sure you've deleted your derived data and cleaned the build folder to reset so everything gets built from the beginning.

Twitter Kit Integration issues in iOS app

I want to integrate twitter in iOS Application, I tried using Fabric as well as by using Cocoa pod but getting same error every time.
Following are the Errors:
Could Not build TwitterCore
Cocoa/Cocoa.h file not found
Could Not build Module TwitterKit
I searched and tried some solutions as per given below links but nothing work for me. I am using xcode 6.4, ios 8.4.
Please give me any correct solution.
I went through below link
Twitter integration in iOS app
but didnt help
TwitterKit issue comming
https://twittercommunity.com/t/could-not-build-objective-c-module-twitterkit/49551
Cocoa/Cocoa.h file not found
Cocoa/Cocoa.h file not found
Go to project settings --> Build settings
Click on All tab and search "allow non"
then set YES to Allow Non-modular Includes in Framework option

My Instant Messaging Project Won't Work Like in the Xcode Tutorial

So I was just trying to create a simple instant messaging application on my Xcode 5.0.2. I downloaded the free beta SDK from c2call.com and I followed exactly what their video instructed. However once I tried to build, atleast a dozen issues popped up.
Heres the link to the tutorial:
http://www.youtube.com/watch?v=qyp_BFORvIk
One of the comments said that one possible reason might be because I need to set my Xcode 5 to default in build settings, but I'm not sure how. Does anyone know what I should do?

Twitter Integration for IOS 4.3

It's easily to integrate Twitter in iOS 5 (Twitter.framework) and iOS 6 (Social.framework).
What about iOS 4.3?
What I have tried:
1) I tried Sharekit, it's not working properly, it's hard to install, and I get a lot of Xcode errors and files not found error after installation.
2) I also tried DETweetComposeViewController + unoffcial-twitter-sdk, I also get many errors, one of them is OAuth+UserDefaults.h not found.
What's the best way for iOS 4.3?
Thanks
hi you can use "MGtwitter Engine" for ios 4.3
you get it form following link
https://github.com/mattgemmell/MGTwitterEngine
i hope it may help you.

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