Open yulingtianxia opened 4 years ago
Foundation 头文件路径:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/Foundation.framework/Headers
已经可以 Run 起来的 Header(运行不挂掉,但生成的内容未经过 check):
先用 Foundation 试水,遇到的问题列在这个 Issue 里,逐个解决:
生成代码功能问题:
NSArray<ObjectType>
分别转成XXXProtocol
和List
)typedef
(现在写死成解析Block
,应区分其他情况,比如定义函数指针)@property (readonly) const void *bytes NS_RETURNS_INNER_POINTER;
时误把bytes
当做类型,原因跟typeSpecifier
出现多次有关。API_DEPRECATED_WITH_REPLACEMENT
等 ~- [ ] 生成常量声明,如:FOUNDATION_EXPORT double const foo;
~ ~- [ ] 生成函数声明,如FOUNDATION_EXPORT NSObject * _Nullable NXReadNSObjectFromCoder(NSCoder *decoder) API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
~flutter format
后的所有 Dart 语法报错问题解析报错问题:
NSBundle.h
报错line 245:109 no viable alternative at input 'FOUNDATION_EXPORT NSNotificationName const NSBundleResourceRequestLowDiskSpaceNotification API_AVAILABLE(ios(9.0'
NSCompoundPredicate.h, NSData.h
报错line 11:64 extraneous input '<' expecting {';', ','}
NSCompoundPredicate.h
报错line 34:0 mismatched input '+' expecting '@end'
NSCompoundPredicate.h
报错line 34:80 extraneous input ')' expecting {'BOOL', 'Class', 'bycopy', 'byref', 'id', 'IMP', 'in', 'inout', 'oneway', 'out', 'Protocol', 'SEL', 'self', 'super', 'atomic', 'nonatomic', 'retain', '__autoreleasing', '__block', '__bridge_retained', '__bridge_transfer', '__covariant', '__contravariant', '__deprecated', '__kindof', '__unused', NULL_UNSPECIFIED, NULLABLE, NONNULL, 'null_resettable', 'NS_INLINE', 'NS_ENUM', 'NS_OPTIONS', 'assign', 'copy', 'getter', 'setter', 'strong', 'readonly', 'readwrite', 'weak', 'unsafe_unretained', 'IBOutlet', 'IBOutletCollection', 'IBInspectable', 'IB_DESIGNABLE', IDENTIFIER, LP}
NSCompoundPredicate.h
报错line 34:95 missing ';' at 'NS_SWIFT_NAME'
NSException.h
报错line 79:39 mismatched input '(' expecting ';'