0

Two of my apps broke after what I assume was a change to Xcode (10.1 - 10B61) or iOS API. Both use Receigen in Obj-C mode and for some reason no longer recognize UIDevice.

Unknown type name 'UIDevice'

Here are the imports auto-generated by Receigen: Imports

What change to Xcode or the API am I missing?

NewEndian
  • 559
  • 2
  • 16

2 Answers2

0

Turns out Receigen changed a few things. Previously it didn't import UIKit/UIKit.h, but it did import Foundation/Foundation.h

Also previously, the method declaration and variable types had more underscores:

inline static void FastReceiptCheck_CheckInAppPurchases(NSArray *_inapp_identifiers, FastReceiptCheck_InAppValidateBlock _inapp_block, FastReceiptCheck_CallBackBlock _callback_block)

vs

inline static void FastReceiptCheck_CheckInAppPurchases(NSArray *_inapp_identifiers, FastReceiptCheckInAppValidateBlock _inapp_block, FastReceiptCheckCallBackBlock _callback_block)

I ended up inserting this into my Build Script which adds the UIKit import:

echo '#import <UIKit/UIKit.h>' | cat - "$FILENAME" > temp && mv temp "$FILENAME"

And changing my method calls

Thanks for the help!

NewEndian
  • 559
  • 2
  • 16
0

Receigen released version 4.0.4 which adds the UIKit/UIKit.h import. Just make sure you keep in mind the variable type changes.

NewEndian
  • 559
  • 2
  • 16