Facebook ios sdk disable ARC - ios

I have a non-ARC project and i need to integrate Facebook SDK. As i understand, current version of framework (3.0.8) is to be used with ARC enabled. But i took a look at github master branch (actually both - master and preview) and... there are lots of retain/release/autorelease calls there and the project's 'Objective-C Automatic Reference Counting' is turned off.
So i guess, it doesn't support ARC from scratch and we need to run special script to build static library as boz mentioned. But 1 - there's no such script there anymore, 2 - examples on the same branch of github use ARC! As for me - it's better just use non-ARC sources from github, but is it guaranteed that everything will work fine? It's weird: original github source code is non-ARC, but samples are ARC-oriented. Thanks.

You can use the Facebook SDK whether your project is enabled for ARC or not. Just grab the SDK package from https://developers.facebook.com/ios (iOS dev center). Once you've downloaded and installed the SDK you can just follow the instructions in the Getting Started docs (under the iOS dev center) to set the SDK up.

Related

Can someone please explain the differences between Cocos2d-Swift, SpriteBuilder, Xcode and CocoaPods?

I'm completely confused and I don't know where to start asking questions. I tried googling, but the terminology is confusing and I'm not sure what either of these things do (except for Xcode). Can someone explain like I'm 5?
I'm on the cocos2d-swift website and after reading the getting started section it says "From this point onwards, using SpriteBuilder is optional.". I don't know what they mean by that.
How do each of these correlate with each other?
Also, how is an API Documentation Browser and Code Snippet Manager useful to an everyday iOS Developer?
cocos2d-swift is a framework that enables you to build things like sprite-based games quickly.
SpriteBuilder is a tool that helps you build your own multilayered sprites (images and animations grouped into a single package -- i.e. Mario, a Goomba, a Fireflower fireball, etc.).
Xcode is a developer environment in which you write your source code, compile, distribute, and test.
CocoaPods is a tool that fetches and manages framework/SDK dependancies.
You would use CocoaPods to fetch the cocos2d-swift framework so that you could build a sprite-based game in Xcode using sprites you generated in SpriteBuilder.
Not sure what Cocos2d is, but swift is the latest programming language by Apple for both OS X and iOS development.
http://en.wikipedia.org/wiki/Swift_(programming_language)
SpriteBuilder is a framework used to create games for iOS very quick. Think of it as a game engine.
http://www.spritebuilder.com/about
Xcode is the IDE (integrated development environment) that you use when writing native OS X and iOS applications. It's awesome!
CocoaPods is a way to load in third-party libraries and frameworks without having to manually install them on your own. It also makes it very easy to keep the frameworks up-to-date. Pods also allows your project to be more portable as it's much easier to install an application with multiple dependancies via Pods.
http://cocoapods.org
A documentation browser is good if you want to have access to documentation while offline. However, I almost always use Google to find what I'm looking for regardless of what technology I'm working on. Google is just the best way to search.
Finally, I'd start off with this book. I read the first edition years ago, and made things very easy for me to understand.
http://www.bignerdranch.com/we-write/ios-programming.html
Hope this helps!
Here are some basics:
XCode (A Program)- Most of your iOS development will happen here. Coding, creating the app etc.
Think of an SDK as a suite of commands or tools you can use-API's (API - Application programming interface)
Cocoas2d (An SDK) - Game engine. A software development kit for creating games. you would pull this library of code and tools into xcode to use it.
SpriteBuilder (An SDK) - Suite of tools for building games. Just like Cocoas, you would pull this into xCode to make use of it as you code.
CocoaPods - A tool for linking/loading SDK's into XCode and easily updating them.
Moral of the story: XCode is the software you will use for everything. Everything else are just additional libraries of code you can pull in.

How to add iOS frameworks to a Unity project?

How can I add stuff like AdSupport.framework to a Unity project?
I don't want to add them (on the Xcode side) every single time I do a build for iOS...
Using Unity 4.6.
Update, related:
http://forum.unity3d.com/threads/ios-plugin-how-to-link-ios-framework.156231/
http://feedback.unity3d.com/suggestions/frameworks-and-plist-on-ios-outp
https://github.com/AdColony/AdColony-Unity-SDK/wiki/Unity-and-Xcode-Project-Setup
http://answers.unity3d.com/questions/222478/how-do-i-automatically-include-a-framework-with-my.html
http://forum.unity3d.com/threads/get-tired-in-dragging-frameworks-and-dependence-in-xcode-try-xuporter.190752/ - https://github.com/onevcat/XUPorter - https://github.com/josh-ruis/XUPorter
Until there is an official way of doing this within the Unity editor, I'll just answer like this:
There is no official way to do this. You have to do this every single time you build an iOS project. Does UT hate iOS?
Or you could check out some 3rd party plugins that try to address the issue. I haven't tried it myself yet but https://github.com/onevcat/XUPorter or one of its forks could do it. It appears 3rd party tools have a hard time keeping up with new Unity and Xcode versions.
Or this: https://github.com/openkit/openkit-unity
Also: Something that would work from day-to-day is to select "Append" at build time instead of replace. That way framework setup is maintained (however splash screens settings seem to be ignored, and possibly other stuff too). It won't work however of you checkout the project on another computer or similar.

Why doesn't Xcode have an ios framework option?

I've seen project such as ios-universal-framework, but I want to know why XCode iOS does not natively support having a framework. Is it some kind of legal issue. The static library option is not good enough because I want to be able to use .dylib files in my framework.
A little background on what I want to do with a framework. I have a project that is generated from Unity3D, and when we update, we have to manually add back all of our project changes.
What I want is to use a framework that can store most of those external libraries and resources to make it easier to upgrade our project when updates are released.
From a security perspective no code is allowed to be dynamically loaded, thus only static libraries are allowed.
It is possible to create static psudo-frameworks. Take a look at GitHub iOS-Universal-Framework.
What you need is a PosprocessBuilder as described in the build pipeline described in the Unity3d Documentation.
You can manage the Xcode configurations in this pipeline using scripts like the Xcode Zerg.
I've used one python script written by a guy called Calvin Rien that worked really well, if you want to know more about this script this blog post should give you a hint.
What you really need to look for to you automate the these steps is to look for posts of Continuous Integration using Unity 3d and iOS like this one:
Unity3d: from commit to deployment onto tester devices in 20 min using Jenkins

Is there a CorePlot sample project for iOS 6.1 available somewhere?

CorePlot looks like the best library going for the iPad apps I'm looking into, but I've been fighting all day just to get it to compile in an OS 6.1 project set to use Core Date, ARC, and unit tests.
I want to use those specs, but I'm starting fresh, with no other code that needs salvaged, so it occurred to me that rather than fight through the tutorials that don't address installation in ARC; and through the fixes for ARC that never seem to get me all the way to compile-able; that I could easily take any bare-bones project with those basic specs and start bringing in the simpler additions I've already figured out.
Anything like that out there?
All of the CPTTestApp example apps for both Mac and iOS have been converted to use ARC. This was done after the 1.1 release, so at the moment you'll need to pull the latest code with Mercurial to see the changes.
Since the 1.0 release, no changes to the Core Plot project is required to use it in an app that uses ARC. The Core Plot header files will compile under all supported SDKs with and without ARC. Include the Core Plot static library in your app, either the pre-compiled version or one built as a dependent project, and it will link and run just fine.
Core Plot does not use ARC internally because it still supports older systems that cannot use it. It will be updated when the minimum supported system is increased to one that supports ARC on both Mac and iOS.

DIOS Drupal SDK ARC problems in new Xcode?

I'm trying to run the example program for Drupal iOS SDK as downloaded here https://github.com/workhabitinc/drupal-ios-sdk-example
But, I can't build the project because of the ARC problems as in the screenshot below.
How can I change the settings or code to make it compile?
I had the same issue - I resolved it by disabling ARC partially. I used ARC for all my code and disabled it for all downloaded stuff.
See How can I disable ARC for a single file in a project?
This is only a temporary fix, but I guess you just want to run it to see it in action so it should be feasible.

Resources