Xcode 6.4 crashing after installing Xcode 7.01 when viewing a storyboard

I don’t usually blog about crashes etc but this one wasted me a few hours.  I was working on a iOS 8.4 project in Xcode 6.4.  Each time I edited the storyboard, Xcode would instantly crash.  However my colleague’s machine did not?  The only difference we could see (even after reinstalling Xcode) was I had also had Xcode 7.1 installed.  Usually this would be fine however something changed with the libraries it uses (PepperUICore).  It was only when I found this post, I saw the fix

https://forums.developer.apple.com/thread/21927

The fix, which worked for me was to run the following commands to make some symbolic links

sudo ln -s “/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/PepperUICore.framework” “/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 9.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks”

sudo ln -s “/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SockPuppetGizmo.framework” “/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 9.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks”

 

 

New version of Hack24 submitted!

I May of just solved a programming issue that’s been bugging me for many months. The only way I thought I could get round it was a complete rewrite of the 3D engine for Hack24. However it seems you can get around the massive performance with Hack24 by having multiple threads. Yes seems obvious however this is OpenGL world and that is completely different, the items have to created in the main context!

The fix worked, so a new version of Hack24 has been submitted (with other bug fixes!)

Xamarin : Results so far

So, I been playing with Xamarin on and off (damn meetings) and I am slowly getting to grips with it.  I am not a C# developer so while learning Xamarin, I am also learning C#!

I have to be honest, some things I have found a real struggle.  The Android part of my project just died, would not build for toffee, after many hours of search for info, even talking to Xamarin (work call), it turned out to be a corrupt package in a hidden directory.  To be fair, with every new tool, language you are going to learn these issues.

The other random issue which I have not solved is using OpenTk and OpenGL to render a cube on the screen.  This is completely shared code (WOOHOO) however iOS works, Android does not.  One thing I picked up from when speaking to Xamarin is that if any platform is going to break, its Android due to Google pushing updates.  I can respect that!  Android Studio 0.9 -> 1.0 broke every project for me.

The Show must go on!

I can see some real benefits from Xamarin, if I was a C# developer I would be in heaven!  I really want to see whats possible with Xamarin Forms, the holy grail of mobile development (Be warned its not!, its a good technology for a certain job, not all jobs).

In all honestly I don’t have much interest in Xamarin Native which is where you write C# code that directly binds to native Apple/Android Api’s.  I would prefer just to do it in Xcode / Android Studio.

Focus!

I think my personal focus for Xamarin is looking at cross-platform game development using MonoGame or OpenTK.OpenGL.  I either need to learn XNA for MonoGame 3D stuff or see how different the OpenGl is on OpenTK.  This however brings me to the question, why am I not using Unity3D?

My work focus is Xamarin Forms and working out how far you can go with them.  I have been told things like custom pins on a map is a no go on Forms.

I will keep you posted on what I discover!

 

 

WWDC 2015 Keynote highlights

This years WWDC was divided into 4 key areas.  The overall keynote felt more of improvements to current systems / apps instead of anything ground breaking.  This is not a bad thing if it improves the user’s experience.

iOS 9

  • Apple News app allows you to get all the latest news in a very rich way (pictures, animations etc). I been told by others it’s like Flipboard,  sad times for Flipboard.
  • Apple Pay is coming to the UK and Apple Wallet allows you to group your store / credit cards together.
  • Maps now show Transit routes for major cities.
  • New iPad only split screen / multitasking modes that allow you to use 2 apps at the same time.  Looks super fun and cool but the best parts are only supported on a iPad Air 2.
  • Swift 2 announced and is going open source.
  • iOS 9 installation size will be a lot smaller than iOS 8!

WatchOS 2

The biggest announcement from a developer’s point of view was WatchOS 2

  • Native Apps.  This is the big change, you now have access to the watch hardware (sensors and buttons).  The watch can now do stuff without being connected to the phone.
  • Third-party complications.  Complications are basically watch face widgets that you can create.  You could create a Complication that shows your heart rate as part of your watch face.
  • Better health and fitness performance
  • New Siri capabilities.  You can now ask Siri to start a 5 mile run, or go for a 300 calorie bike ride

OSX El Capitan

Lots of small improvements however it felt like a maintenance release instead of a new big shiny thing.  The support for split screen for apps is cool, but Windows 8 has had that for a while.  Mac gets the 3D engine called Metal which iOS got in iOS 8

Apple has merged it iOS and Mac developer program which is a good move, the Mac app store is a bit of a graveyard.

Apple Music

This was Apple’s big announcement.  In summary, imagine Sportify + a 24 hour radio station managed by Zane Lowe.  $9.99 a month or $14.99 for families (up to 6 people)

Xamarin ???

This week, I will mostly be looking at Xamarin 🙂

On a serious note, I have been asked at work to take a look at Xamarin and see if it’s something that can be used, and if so for what.  The native iOS/Android developer in me instantly goes NOOO.  However the excited child in me always says yes!

I think I assumed I knew what Xamarin did without actually knowing, and their hugely limited free version kept the hobbiest in me away. However, starting the free trail and looking in to things, shows that actually this is could be pretty cool!  I am not ready to review it yet because I have not made my first app yet, but initial research of a few days is looking promising.

The main decision I need to make is to choose between Xamarin Native and Xamarin Forms.  Xamarin forms does look very good (Universal app) however I don’t think their website info on it is up to date compared to what is actually possible.  They basically say that anything marginally complex should be done in Native.  However if you see some of the stuff people have done, its very impressive.

I hope to do a post by the end of the week on how I got on with making a simple app 🙂

Apple Watch : Sending notifications to the watch from the iPhone

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!

WatchKit code

– (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];

}

iPhone code to fire off notification

CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR(UPDATE_WATCH), (__bridge const void *)(self), nil, TRUE);