Share via facebook - Xcode 4.2 with ARC - objective-c

I'm trying to share a simple NSString via Facebook in my app. I am using Xcode 4.2 with ARC. Now, first i went to shareKit, but soon discovered that this won't work without using a lot of compiler flags and workarounds.
So now i'm looking for an easy-to-use Facebook sharing way? all i need to do is share a string via Facebook. So, the easiest way to get this done, while using ARC?
Thanks on advance guys.

ShareKit still is one of the best ways to do this, just simply have all the files in your project that don't use ARC have the -fno-objc-arc flag, like in the following image:

Related

file browser for webdav ios7

I have been looking for a packet/library with a file browsing capability for WebDAV, which I could use for my project in objective c, using xcode 5.1. so far the best I have found is GDFileManagerKit. but it still has stuff unsupported by my ARC such as AFNetworking version used. I do not want to alt the code of this library since it requires many changes. I would like to know if there is a better library or without me having to use AFNetworking version 1.
Thank you and please bear with me if this question is very novice. I am new to objective c xcode and iOS
You could use one of several free libraries, for example WTClient. Yet, every library I have seen is not using ARC, instead managing memory without the garbage collector.

Phonegap record and playback simultaneously

I'm currently developing an iPhone/Android application in Phonegap and would like to record audio while playing back another track.
Now I know in Objective-C you can set the audio category to "AVAudioSessionCategoryPlayAndRecord" but since this is Phonegap and not a plain native objective-c app I'm not sure if it's possible for it to work or even where to put it as I think it needs to be in the phonegap core files somewhere>
Does anyone have any experience and/or ideas?
In case anyone else wants to know the answer to this, I managed to sort this issue out by recompiling Cordova/Phonegap (1.7.0 but 2.0 should be similar) with a tweak.
To tweak it I modified CDVSound.m, changing line 482 to
[self.avSession setCategory:AVAudioSessionCategoryPlayAndRecord error:nil];
And re-compiled and then used in my project.
This can be resolved by using a custom Objective C plugin, that sets the category of the AVAudioSession singleton instance to AVAudioSessionCategoryPlayAndRecord.
However there is a bug in the Cordova Media Plugin which complicates things, which can be worked around, if it is acceptable for you to start recording first, and then start playing the media.
If not, I have resolved this issue, and posted an answer here, where you can find more details:
Record and play simultaneously on iOS (Phonegap build)

Post to facebook newsfeed iOS

Googling around didn't do well for me.
I would like to know how to implement Facebook post to newsfeed using ARC, iOS 5 and Storyboarding without leaving/exiting the app.
Already tried the tutorial in developer.facebook.com and had a hard time getting this done.
Any references will do.
Thank you so much!
Using the Facebook SDK is not a trivial task. You need to put in the hours to understand it or just use sharekit. In future iOS may incorporate Facebook as it did with Twitter but for now you have to go to GITHUB and download the Facebook iOS code & hackbook sample.
The web page at Facebook's developer pages for iOS is the place to start learning.
If you have enough hours to burn you can get an implementation going in a couple of days.
Regarding ARC you need to set the -fno-objc-arc compiler flags in build phases, compile sources for the Facebook .m files which are not ARC. Your own files can be written as ARC & mixed with the FB ones which are pre-ARC.
This Facebook iOS tutorial basically provides all the knowledge you need for making posts with the Facebook SDK. If you scroll down a bit, you'll see the code for posting to the newsfeed (hint: search for feedDialog).

Converting Apple's MVC Networking sample to ARC

Has anyone converted the Apple MVC Networking sample to ARC?
http://developer.apple.com/library/ios/#samplecode/MVCNetworking/Introduction/Intro.html
As a new iOS developer I am very interested in ARC and attempted the conversion w/o success, sent a few emails to Apple, no response.
During the conversion there were some CF functions that I couldn't bridge correctly and there were all kinds of memory issues and exceptions.
Currently I don't have an example, just wanted to see if anyone else has been though the conversion, Google didn't help me out this time :)
Thanks
Just curious but why are you trying to do this conversion? If you are integrating this example into a project that already runs with ARC, you can exclude the source files that aren't ARC explicitly in the Compile Source section of your build phases in the Target.
If you want to try this, select the sources that don't have ARC and hit enter. A dialog should appear where you can enter:
-fno-objc-arc
Hope this helps.
XCode 4.3.2 has a new feature to convert projects to ARC.
Edit->Refactor->Convert to Objective-C ARC
Should get you going in no time!

Embeding streaming player inside my app IOS

I'm trying to create an iPhone app which plays local radio station in my district. I found this player to work best for me :
https://github.com/DigitalDJ/AudioStreamer
When testing it against my requirements it did the best without any doubt.
I thought I'll use this players API and it should be straightforward(not really for a newbie). How exactly I do that is where I'm stuck now. Because when I run the player original project it runs smooth, but when I copy code inside Classes to my app, this is what happens :
Ok, I've been developing some apps(test apps) for two weeks maybe and I lack experience.
How do you usually embed/import other projects code into your code and user the other codes api?
EDIT
So per Sunil Pandey answer, this cannot be run using IOS SDK version 5.0?
EDIT 2 :
I feel like I'm really close now, have this one issue :
Receiver 'AudioStreamer' for instance message is a forward declaration
It's declared in my h file. as AudioStreamer *streamer
As said Sunil Pandey, ARC mecanism is enabled for your project. With ARC, your project require at least iOS4 on the phone.
I would suggest you to disable ARC for the file you imported from the third party librairy. So you can keep using ARC in your own code (this mean, you never use retain, release, autorelease).
To disable ARC for each file of your AudioStreamer library, refer to How can I disable ARC for a single file in a project?
You must have implemented ARC inside your project. that's why it is giving you this error.
If you are using ARC then only way to use this project library is to create a static library of your AudioStreamer lib and then import it inside your app
Or
If you don't want to use ARC inside your app then you can turn it off by following method
select your target -> Build Setting -> Apple LLVM Compiler 3.0 - Language
set Objective c Automatic Reference Counting to NO