简体   繁体   English

Receigen Xcode 10.1-未知类型名称'UIDevice'

[英]Receigen Xcode 10.1 - Unknown type name 'UIDevice'

Two of my apps broke after what I assume was a change to Xcode (10.1 - 10B61) or iOS API. 我的两个应用程序在我认为是Xcode(10.1-10B61)或iOS API更改后发生了故障。 Both use Receigen in Obj-C mode and for some reason no longer recognize UIDevice . 两者都在Obj-C模式下使用Receigen,并且由于某种原因不再识别UIDevice

未知类型名称“ UIDevice”

Here are the imports auto-generated by Receigen: 这是Receigen自动生成的导入: 进口

What change to Xcode or the API am I missing? 我缺少对Xcode或API的哪些更改?

Turns out Receigen changed a few things. 原来,Reeigen改变了几件事。 Previously it didn't import UIKit/UIKit.h , but it did import Foundation/Foundation.h 以前它没有导入UIKit/UIKit.h ,但是确实导入了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 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: 我最终将其插入到构建脚本中,该脚本添加了UIKit导入:

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

And changing my method calls 并更改我的方法调用

Thanks for the help! 谢谢您的帮助!

Receigen released version 4.0.4 which adds the UIKit/UIKit.h import. Receigen发布了版本4.0.4,其中添加了UIKit/UIKit.h导入。 Just make sure you keep in mind the variable type changes. 只要确保记住变量类型的变化即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM