Discussion Forums  >  Buzztouch News and Announcements

Replies: 18    Views: 1632

David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
09/22/12 03:07 AM (11 years ago)

iOS 6 Screen Rotations Supported

As many of you know, each iOS release brings lots of challenges for us (buzztouch folks and you). iOS 6 is no different. One of the big changes this time around is the way iOS handles rotation changes inside each view controller. Transitioning from portrait to landscape is like magic - when it works! But, we got this updated and all of your BT 2.0 projects support screen rotating in iOS 6 now. This means you'll need to re-download the source code for your app(s) if you want to take advantage of TONS of changes needed to support this. Most of the thanks goes to @Lester and @MrEd for some great findings. I'm happy to take the credit for the other updates to get this working :-) If you're interested, these are the files that were updated to support the logic (and keep it working on older devices, always the fun part!): /BT_config folder... [YOUR APP]_appDelegate.h [YOUR APP]_appDelegate.m /BT_Layout folder... BT_viewController.h BT_viewController.m BT_rotatingNavController.h BT_rotatingNavController.m BT_rotatingTabBarController.h BT_rotatingTabBarController.m The best news...NONE of the plugins need any changes to support the changes made in the affected files. Choosing "allow" or "prevent" rotations in Core Settings in your control panels will work exactly as it did before, even if the app is running on iOS 6. We do have more updates to make to some of the plugins and we'll continue rolling them out as we get them done. This was a big one and we're stoked to get screens spinning and flipping again. For the plugins, self hosted folks will need to update them as the new ones are released. buzztouch.com hosted folks don't need to do anything, we'll do it for you. It's amazing how complicated these things can get but I can say 100% that it's getting MUCH EASIER to keep up with iOS and Apple changes. I say this because your apps are more organized than ever due to the way the source code is organized and assembled. As we continue to refine our approach, learn with you guys, and release more and more screen types, it's also getting easier - go figure. iOS 6 has been out for less than 48 hours worldwide and we're nearly done finding and fixing issues. It took 3 weeks to get to this point when iOS 5 was released. Super stoked about this. It's 3:00 AM on the West Coast and I'm headed to the car....the heater on the boat magically stopped working a few hours ago, it's cold as heck and I'm crashing as soon as I get home. Did you make something cool today?
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
09/22/12 04:09 AM (11 years ago)
Awesome news David, you are an absolute coding gun! I don't know if this matters to others but having you and the buzztouch team in my corner always makes me feel much, much more confident going forward :) Cheers
 
MacApple
Apple Fan
Profile
Posts: 4674
Reg: Oct 25, 2010
USA
61,140
like
09/22/12 04:25 AM (11 years ago)
First class!
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
09/22/12 08:37 AM (11 years ago)
Great news to see the iOS6 mods are not that intrusive of the code and will support older devices. Such a fine line to support new features and remain backward compatible. I'm a slow adopter and expect things like this to take time to work out. The fact BT is on top of it so quickly just enforces why folks should migrate over to this platform. I bet lots of independent developers are scouring thru code and stackoverflow for fixes. We have a frozen guy in a boat on the job. Where do I send the space heater so he stays toasty and can keep hacking? I'm starting to wonder if some versioning of the BT Source code might start making sense? I know the plug-ins are, but maybe more BT Core files may need to be going forward?
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
09/22/12 10:39 AM (11 years ago)
Hey guys! I added the previously mentioned files into my Xcode project and I received 4 errors, all concerned with the [YOUR APP]_appDelegate.m file in the BT_Config folder... They are semantic issues: "use of undeclared identifier 'UIInterfaceOrientationMaskPortrait'; did you mean 'UIInterfaceOrientationPortrait'? [3]" "use of undeclared identifier 'UIInterfaceOrientationMaskLandscapeLeft'; did you mean 'UIInterfaceOrientationLandscapeLeft'? [3]" "use of undeclared identifier 'UIInterfaceOrientationMaskLandscapeRight'; did you mean 'UIInterfaceOrientationLandscapeRight'? [3]" "use of undeclared identifier 'UIInterfaceOrientationMaskPortraitUpsideDown'; did you mean 'UIInterfaceOrientationPortraitUpsideDown'? [3]" Note that I'm using Xcode 4.2 and I really hope that isn't the issue since I'm limited in the technology I have using Snow Leopard and not Mountain Lion! I submitted my app yesterday without this update, but for one extra day, it would be nice to incorporate this code and submit a new binary to the iTunes Connect. Thanks again! Nicholas
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
09/22/12 10:53 AM (11 years ago)
Any chance that I might have to add these 4 interfaces to the BT_info.plist file under the UIInterfaceSupportedOrientations section?
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
09/22/12 10:54 AM (11 years ago)
Sorry, correction, UISupportedInterfaceOrientations.. lol!
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
09/22/12 11:24 AM (11 years ago)
Sorry for spamming - I attempted to add the 4 interfaces into the BT_info.plist folder, but to no avail. Xcode does not comprehend the addition of "Mask" after "UIInterfaceOrientation" in the [YOUR APP]_appDelegate.m file from the BT_Config folder.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/22/12 12:19 PM (11 years ago)
Please post URL of screenshot (errors). You're right, this is an Xcode 4.5 fix which is Lion only. We'll engineer a workaround. But, you can't compile for iOS 6 with old Xcode. No way around this.
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 372
Reg: Feb 15, 2012
Montreal
10,720
like
09/22/12 12:38 PM (11 years ago)
Ah, alright, thanks for the insight and of course, thanks for cracking the screen rotation issue for iOS 6!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/23/12 05:29 PM (11 years ago)
If you're compiling with the previous version of xcode... just COMMENT OUT all the lines like: UIInterfaceOrientationMaskPortrait It will look like... //mask |= UIInterfaceOrientationMaskPortrait; //if(canRotate){ // mask |= UIInterfaceOrientationMaskLandscapeLeft; // mask |= UIInterfaceOrientationMaskLandscapeRight; // mask |= UIInterfaceOrientationMaskPortraitUpsideDown; //} That will tell the compiler to ignore these lines.
 
Rohan
Veteran developer
Profile
Posts: 79
Reg: Mar 12, 2011
London
10,040
like
09/25/12 12:02 AM (11 years ago)
Any chance of porting this fix for BT V1.5 ? I understand that 1.5 apps are soon to be legacy, however I've been working on an app for the best part of a year and it nearly finished now, so would really like to release it before making the move to self hosted V2, which doesnt currently have all the functionality that I require.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/25/12 01:31 AM (11 years ago)
Hi Rohan, We feel your pain. If you're using v1.5 and...you're compiling with the latest version of Xcode (4.5) which is required to build iOS 6 apps, then you could... a) Download the code for a "test" v2.0 project. Make something simple, grab the project. b) Look in the BT_layout folder. There are not many files in this folder. You could replace these files in your v1.5 app (the files are the same name). c) Look in the BT_config folder. Replace the [your app name]_appDelegate.h and .m files. In ALL files, you'll need to replace all occurrences of [your app name]_appDelegate.m to the app you're working with. I'm thinking you can pull this off?
 
Rohan
Veteran developer
Profile
Posts: 79
Reg: Mar 12, 2011
London
10,040
like
09/25/12 10:48 AM (11 years ago)
Hey David, Your a Star :-) Followed your instructions and it works a treat, can run iOS6 on iPhone 5 simulator with rotation working. For those who might want to do the same thing I recommend using a program called "Find & Replace it" on the appstore. Just point it to the folder that contains your Buzztouch Xcode and it'll replace your old app name with new app name in under a second. I so pleased to be working on the Buzztouch platform and with you guys who are just awesome!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
09/26/12 12:40 AM (11 years ago)
@Rohan: Whoo-hoo, glad it worked. My advice was completely untested and based on a hunch - glad I remember that code base so well! LOL. If you're energetic, and feel like helping a bit, you could make a PDF documenting what you did with the v1.5 source to get it to rotate on iOS 6. Like listing the steps and adding some screenshots or something? I'm sure tons of folks would benefit from it. I'll add it to the How To's. If you're up for it (no pressure at all, really), email whatever you make to david 'at' buzztouch.com and I'll get it in the How To's. I'm stoked about the Oxford UK meetup tomorrow and hope to attend via Skype in a few hours at 7:00 AM California (PST) time.
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
11/30/12 08:18 PM (11 years ago)
Hi Rohan, you did use Xcode 4.5 and IOS 6 to accomplish this correct? Followed your How To but getting SIGABRT throwing exception. Any other tips? thanks!
 
Rohan
Veteran developer
Profile
Posts: 79
Reg: Mar 12, 2011
London
10,040
like
12/01/12 03:31 AM (11 years ago)
Hi Ian, Sorry to hear that your apps throwing a wobbly. To confirm when I wrote the HowTo I was using Xcode 4.5. The resulting code worked on iOS 4.3 through 6. Since then Apple have released Xcode 4.52- for iPad mini support, and also the Buzztouch crew have also updated 22 plugins for V2. It is possible that these recent changes have caused the problem that you are experiencing. To be honest I'm postponing the inevitable upgrade until I've finished added the content to my app, as I know it'll probably generate another raft of code exceptions which I'll have to track down and fix. Once I do I'll submit another updated PDF if needed. Maybe if you post the error that your code is generating someone on the forum, or on stacksocial might be able to figure out what's causing it. Rohan
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
12/01/12 07:27 PM (11 years ago)
Hi Rohan, I finally got my v1.5 app working nicely with xcode4.5 and IOS 6. When all is finished I will send updates for the How To. cheers! ian
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
12/03/12 01:51 PM (11 years ago)
Hi Rohan. I added a forum post with info and link. If you would like to use it in your How To please do. You don't seem to be able to receive private messages:) https://www.buzztouch.com/forum/thread.php?fid=D25107F1F57B493DBF50E56&tid=D25107F1F57B493DBF50E56
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.