Custom Content Reader fails on OS 7.1.1 hardware

Hi folks, I’m back!!!

I thought I’d note that I just ran into a specialized failure on the new iOS 7.1.1 running on hardware. I should note that the following bug does not appear on any other version of iOs, yet I have not been able to find the iOs7.1.1 simulator so I haven’t tested it there.

It’s the typical failure when reflection is not able to find your reader; I ran into this years ago when this area was still being worked on and was delighted to see it fixed now.

I’m digging into this now, but I thought I would raise the issue in case anyone else was investigating the same.

-Patrick

I have found the root cause, but have not yet fixed it.

Essentially, on the hardware of 7.1.1, the fully qualified typereadername isn’t being populated.

I’ll update when I have a proposed fix.

Put a dummy instance in your code so the mono ahead of time compiler knows that it should be compiled.

        protected override void Initialize()
        {
#if IOS
        // Create dummy items to pervent MonoTouch AOT from stripping them
            EnumReader<ShipType> shipTypeReader = new EnumReader<ShipType>();
            EnumReader<TargetType> targetTypeReader = new EnumReader<TargetType>();
            EnumReader<Goods> goodseReader = new EnumReader<Goods>();
#endif

            base.Initialize();
        }