So last Friday my Apple Watch turned up, super excited I soon ran in to some issues with how to use it.
This article by SERENITY CALDWELL cleared them all up!
28 Apple Watch Tips and Tricks you should know
So last Friday my Apple Watch turned up, super excited I soon ran in to some issues with how to use it.
This article by SERENITY CALDWELL cleared them all up!
The normal way to communicate between the AppleWatch and the iPhone is via AppGroups to share data (shared Prefs, CoreData etc) or by calling the method openParentApplication from the watch and using the delegate method handleWatchKitExtensionRequest.
What would be very nice is if you could notify the watch from the iPhone that something happened, something like a postNotification. Sadly postNotificaitons do not work, but Darwin ones do!
– (void)registerTestNotification {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MY_METHOD) name:@”com.burfdevelopment.test” object:nil];
CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), (__bridge const void *)(self), didReceivedDarwinNotification, CFSTR(“UPDATE_WATCH”), NULL, CFNotificationSuspensionBehaviorDrop);
}
static void didReceivedDarwinNotification() {
[[NSNotificationCenter defaultCenter] postNotificationName:@”com.burfdevelopment.test” object:nil];
}
CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR(UPDATE_WATCH), (__bridge const void *)(self), nil, TRUE);
So, as you may or may not know, I changed jobs in March. This was a pretty big thing for me as I have not changed companies for over 13 years! My new job is at the O2 Labs as their senior iOS developer (woop woop!).
The lab is tasked with looking in to new tech, create prototypes of useful discoveries and then showing the business how they can use it (their is probably a more official better way to say it). Generally people are not limited by skillset, so I can look at Android stuff, or robotics or anything that could be useful within reason.
It’s odd changing from a small company to a huge one, but so far its awesome (excluding travelling, damn you M3)!
I have been spending quite a bit of my time researching the new iOS8 api’s which has been fun. It’s nice just focusing on the new stuff for once.
I have also managed to bring LEGO Mindstorms in to the Lab (well they technically had the old version)
Here is another example of bringing my 2 favourite hobbies together, programming and LEGO.
This time round I have made a voice activated (iOS Siri) LEGO garage.
Quick post, today I was asked to look in to making a simple iOS8 widget that displayed some contacts with status updates, A Widget is a kind of iOS8 extension that is part of your main app but a separate target. The widget needed to be displayed under the Today notification center.
The first guide I followed showed that Apple had done a really good job on making this super simple!
iOS8 : Creating a Today Widget
Then I needed to share simple data between my parent app and the widget
Sharing NSUserDefaults between your app and a Today Extension on iOS8
The last bit was to make it clickable so that it took you to the main app
So having a quick look around, there has been quite a few changes to Swift in the latest Beta.
Instead of me listing them, check out this awesome post on it:
Changes in the Swift Standard Library in Beta 5