Posts tagged with ios5
In iOS5, Apple introduced native Twitter integration via the "Tweet Sheet" (aka TWTweetComposeViewController), allowing you to easily implement Twitter in your iOS app without worrying about all the heavy lifting. If you tried implementing Twitter support in the past and found yourself lost in a sea of OAuth source files, trying to handle authentication yourself, and banging your head over what to do with various responses, you'll know how much of a relief it is that this now "just works."
This is great for UIKit, but what if you want to implement the same simple Twitter sharing functionality in your cocos2d game? Luckily, it's nearly as easy!
iOS 5.0.1 was released today, for the first time you can update your iOS devices without having to sync them to a computer running iTunes.
To do an over the air (OTA) update:
If your iOS app uses UILocalNotifications, you (and your users) may be wondering why you haven't been receiving them after updating iOS 5. It seems that due to a bug (or is it undocumented feature?) in iOS 5, Local Notifications now behave a lot more like Push Notifications.
By default, if your app does not register for push notifications, it will not be in the Notification Center and thus unable to send notifications (remote or local). Of course your users can always manually go into Settings -> Notifications and hunt down your app, but not all users will realize this and - as in our case - many may think your app is 'broken' in iOS 5.
Until Apple (hopefully) releases an update to fix this, a workaround is to register your app to receive Remote/Push Notifications (even if you don't use them) so that your app is "in" the Notification Center and able to receive Local Notifications. To do this, in your App Delegate's application didFinishLaunchingWithOptions method, add the following:
- // Workaround for iOS5 bug. We need to register for remote notifications,
- // otherwise all notifications are disabled by default in the Notification Center
- [[UIApplication sharedApplication]
- UIRemoteNotificationTypeBadge |
- UIRemoteNotificationTypeAlert |
At startup, your app will now prompt the user to receive push notifications and when they accept, join the ranks of other Push Notification apps in the Notification Center.