Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS

IOS Topic Suggestion

I was wondering If you guys will ever do an IOS 6 app tutorial integrating the new features of IOS 6 rather than just blogging about it. Since the release of IOS 6, features such as using the social framework have become popular. I highly suggest you guys do a tutorial to help the many noobs/members such as myself that join treehouse and are looking to learn up to date technologies. It may also be a good marketing strategy as most of the free social framework tuts out there tend to have bugs or have incomplete codes. It's almost 2013 and it looks like more people will be using IOS 6.
In my opinion, If treehouse had such a tut , it could differentiate itself from the other learning platforms out there- Just a (not so selfish) suggestion. Thanks. MERRY XMAS

19 Answers

@Amit said he would be covering some more of the iOS 6 stuff in the iOS Project "Build a Blog Reader iPhone App". I do agree though. I personally wasn't even aware that the blog had actual learning material in it. I would love if that stuff were added into my library if anything, but I'm sure the treehouse team knows that some things have changed and are trying to come up with some solution instead of remaking all of the videos. @Mikaila try to edit your post and add "feature request" as a tag on the bottom.

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

Hi Mikaila,

I totally agree with you: I would like to increase the pace at which we produce iOS content. Right now Amit is our only iOS teacher, but in 2013 we'll likely hire an additional iOS teacher so that we can cover the latest version twice as fast.

@Ernest..I just added feature request as a tag to my suggestion. Thanks.

@Nick..I understand however not sure I can continue to afford paying the monthly fees for too long without new up to date IOS 6 tuts.

Rightnow, i am stuck with one little error code in my ios app that has to do with IOS 6 and the Social framework (facebook specifically).

I know, If such a tut existed on treehouse(Integrating the facebook social framework into ios 6 apps)..I am sure I would not have that problem and If i did @amit would help resolve.

As for now, I may just have to look into paying someone for a facebook social framework code that is NOT buggy. Here is the bug that is literally bugging me out and stackoverflow as previously suggested does not help. Perhaps cos I am a total noob.

This only occurs when a user attempts to post to facebook but decides not to do so and depresses the home button (menu) instead of hitting the cancel button on the top (navigation bar) of the Iphone (simulator)

<Error> CGImageCreate invalid image size 0 x 0

Last, If anyone has successfully implemented IOS 6 facebook social framework into their app please share . Will not mind sending you a gift for it. Thanks.

@Amit..Thanks for the link. I followed your blog tut and still had the same error.

This error pops up in the console even though build is successful and xcode states no issues.

When I depress the home button on the iphone simulator to quit the facebook sharing screen (Instead of pressing the cancel button first, located in the top nav (left cancel button) of the facebook sharing screen).

I do not get an error if I press the cancel button (on the facebook sharing screen) before depressing the home button to quit the app in the iphone simulator.

<Error>: CGImageCreate: invalid image size: 0 x 0.

BTW, I do not get any errors with the twitter sharing screen when i do the same thing using your code.

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

@Mikaila Please share the code related to the social framework

Can we have a tutorial on NSDictionary please?

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

@Christina We have one in the new "Build a Blog Reader" project which will be released soon. See the roadmap for dates.

Hello,

I've been going through the IOS6 updates from few days. Overall they've made some changes to the current syntax (literals) and provided few new frameworks lyk SocialFramework and many more.

Here is an useful resource for IOS6. http://www.techotopia.com/index.php/Image:IPhone_iOS_6_Essentials.png

It covers all the new topics related to IOS6.

Hope it helps :)

THANKS @NAGA

@amit, Sorry for the late response. I just noticed your response...Here you go. I think it's just a facebook / apple bug..No problems with twitter.

    - (IBAction)post:(id)sender {
        if( [SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {
            SLComposeViewController *mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
            [mySLComposerSheet setInitialText:self.blahblah.text];
            [mySLComposerSheet addURL:[NSURL URLWithString:@"http://www.blahblah.com"]];
            [mySLComposerSheet addImage:[UIImage imageNamed:@"blablah.jpg"]];

            [self presentViewController:mySLComposerSheet animated:YES completion:nil];


        } else {
            UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Facebook" message:@"Ok" delegate:self cancelButtonTitle:nil otherButtonTitles:@"", nil];
            [alertView show];

        }}

@Amit, I noticed that when a user post to facebook or cancels post to facebook. They do not get a notification (bubble) alerting them that their post was either cancelled or posted successfully. How can i modify the code to add such a feature to my app for a better user experience? { I'm referring to code posted above earlier today} Thanks.

@Mikalla Akeredolu

You can set if-else conditions for different states and play custom sounds using AVFoundation framework according .

It has AVAudioPlayer class which you can make use of to play the sound files.

Thanks.

Lucas Edwards
Lucas Edwards
2,477 Points

I'm glad to hear that there will be more iOS content. I was thinking about leaving Tree House because of this; however I'm very excited about the news — and @Amit does a great job! Hire some more people wweee!!!!

Amit Bijlani
STAFF
Amit Bijlani
Treehouse Guest Teacher

@Mikaila

Have you tried using the UIActivityViewController instead?

// An array of content that needs to posted 
NSArray *activityItems = @[@"Here is your text!", [UIImage imageNamed:@"blablah.jpg"]]; 

// Create a new UIActivityViewController with the activityItems array 
UIActivityViewController *activityController = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil]; 

// Exclude activities that are irrelevant 
activityController.excludedActivityTypes = @[UIActivityTypePostToWeibo,UIActivityTypePrint,UIActivityTypeCopyToPasteboard,UIActivityTypeAssignToContact]; 

// Use the completion handler to figure whether something was posted
[activityController setCompletionHandler:^(NSString *activityType, BOOL completed) {
    NSLog(@"completed dialog - activity: %@ - finished flag: %d", activityType, completed);
}];

// Present the activityController 
[self presentViewController:activityController animated:YES completion:nil];

See the completion handler to answer your question about alerting a user when something was posted.

@amit..got the same error but looks like it may not be a big deal because i tested my app on a real iphone 5 today and got no errors. now i am getting ready to submit to the app store..wish me luck..or share tips and tricks on submitting apps to the ios app store if you got some. Thanks

@Amit..Cool. I used those videos to test the app and will use them when attempting to submit the app. But I do have perhaps one last question. Instead of displaying my quotes randomly. Is it possible to display them one at a time? example i want to create 3 square buttons.

First button middle button third button

First Button Titled : Previous Quote (Behavior - Takes user back to previous quote) Middle Button Titled : Random Quotes (Behavior - Takes user to random quote) Third Button Titled : Next Quote (Behavior - Takes user to next quote in plist)

Hope this makes sense. How can I modify the code for such results.

The code i have now only allows for random quotes to be posted. Hope to hear from you soon. thanks again for all your help.

Bacil Warren
Bacil Warren
199 Points

I'd also like to make a note here about iOS 6 ... it's almost too late for an iOS 6-based course, since iOS 7 will be available in just a few months, making it largely irrelevant. With that in mind, it might be more useful to start working on iOS 7 learning, and skip iOS 6 entirely.