I’m having troubles with generating MOE bindings for Google ML Kit TextRecognition framework and would appreciate any help or hints.
The moeNatJGen task gives a bunch of warnings like attributes may not be specified on a category
(log is below) and generated MLKTextRecognizer
class doesn’t have methods that I see in the MLKTextRecognizer.h
header file, e.g.:
- (void)processImage:(MLKVisionImage *)image
completion:(MLKTextRecognitionCallback)completion NS_SWIFT_NAME(process(_:completion:));
The MLKVisionImage
class and other core classes are also not generated.
I pushed a test project and my *.nbc file to github at https://github.com/ekuleshov/mlkit-test
EK
:moeNatJGen
2020-12-15 11:45:13:899 -0500 [main] DEBUG org.moe.natjgen.Main - NatJGen started
2020-12-15 11:45:14:165 -0500 [main] DEBUG org.moe.natjgen.Indexer - Clang options: [-arch, arm64, -x, objective-c, -fmessage-length=133, -std=c99, -fobjc-arc, -fpascal-strings, -ferror-limit=9999999, -DNS_BLOCK_ASSERTIONS=1, -DOBJC_OLD_DISPATCH_PROTOTYPES=0, -isysroot, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk, -miphoneos-version-min=9.0, -I/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitTextRecognition/Frameworks/MLKitTextRecognition.framework/Headers, -I/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitVision/Frameworks/MLKitVision.framework/Headers, -I/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitTextRecognition/Frameworks/MLKitTextRecognition.framework/Headers, -I/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitCommon/Frameworks/MLKitCommon.framework/Headers, -I/var/folders/6x/xg4xswbx3nldfk2vdn_ts6mm0000gn/T/NatJGen801312725765969176, -iquote/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitTextRecognition/Frameworks/MLKitTextRecognition.framework/Headers]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:109:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:196:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:112:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:187:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGLDrawable.h:52:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder+UIActivityItemsConfiguration.h:16:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UISceneActivationConditions.h:31:25: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIScreenshotService.h:35:50: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSUserActivity+NSItemProvider.h:12:81: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UNNotificationResponse+UIKitAdditions.h:16:25: error: attributes may not be specified on a category
2020-12-15 11:45:14:596 -0500 [main] DEBUG org.moe.natjgen.Indexer - Indexing translation unit
2020-12-15 11:45:16:849 -0500 [main] DEBUG org.moe.natjgen.Indexer - Clang options: [-arch, armv7, -x, objective-c, -fmessage-length=133, -std=c99, -fobjc-arc, -fpascal-strings, -ferror-limit=9999999, -DNS_BLOCK_ASSERTIONS=1, -DOBJC_OLD_DISPATCH_PROTOTYPES=0, -isysroot, /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk, -miphoneos-version-min=9.0, -I/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitTextRecognition/Frameworks/MLKitTextRecognition.framework/Headers, -I/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitVision/Frameworks/MLKitVision.framework/Headers, -I/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitTextRecognition/Frameworks/MLKitTextRecognition.framework/Headers, -I/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitCommon/Frameworks/MLKitCommon.framework/Headers, -I/var/folders/6x/xg4xswbx3nldfk2vdn_ts6mm0000gn/T/NatJGen801312725765969176, -iquote/Users/eu/Downloads/mlkit-test/xcode/Pods/MLKitTextRecognition/Frameworks/MLKitTextRecognition.framework/Headers]
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:109:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:196:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:112:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSOrderedSet.h:187:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGLDrawable.h:52:12: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIResponder+UIActivityItemsConfiguration.h:16:12: error: attributes may not be specified on a category
2020-12-15 11:45:17:244 -0500 [main] DEBUG org.moe.natjgen.Indexer - Indexing translation unit
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UISceneActivationConditions.h:31:25: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIScreenshotService.h:35:50: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/NSUserActivity+NSItemProvider.h:12:81: error: attributes may not be specified on a category
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk/System/Library/Frameworks/UIKit.framework/Headers/UNNotificationResponse+UIKitAdditions.h:16:25: error: attributes may not be specified on a category
2020-12-15 11:45:19:706 -0500 [main] DEBUG org.moe.natjgen.CStructManager - c:@S@__darwin_arm_neon_state64: Failed to merge secondary field types
2020-12-15 11:45:19:706 -0500 [main] DEBUG org.moe.natjgen.CStructManager - c:@S@arm_legacy_debug_state: Failed to merge secondary field types
2020-12-15 11:45:19:707 -0500 [main] DEBUG org.moe.natjgen.CStructManager - c:@S@_CALayerIvars: Failed to merge secondary field types
2020-12-15 11:45:19:707 -0500 [main] DEBUG org.moe.natjgen.CStructManager - c:@S@__darwin_arm_neon_state: Failed to merge secondary field types
2020-12-15 11:45:19:710 -0500 [main] DEBUG org.moe.natjgen.Indexer - Generating classes
2020-12-15 11:45:20:083 -0500 [main] INFO org.moe.natjgen.UnitEditContext - Getting compilation unit from /Users/eu/Downloads/mlkit-test/src/main/java/com/google/mlkit/mlkittextrecognition/MLKTextRecognizedLanguage.java
2020-12-15 11:45:20:454 -0500 [main] INFO org.moe.natjgen.UnitEditContext - Getting compilation unit from /Users/eu/Downloads/mlkit-test/src/main/java/com/google/mlkit/mlkittextrecognition/MLKText.java
2020-12-15 11:45:20:508 -0500 [main] INFO org.moe.natjgen.UnitEditContext - Getting compilation unit from /Users/eu/Downloads/mlkit-test/src/main/java/com/google/mlkit/mlkittextrecognition/MLKTextElement.java
2020-12-15 11:45:20:549 -0500 [main] INFO org.moe.natjgen.UnitEditContext - Getting compilation unit from /Users/eu/Downloads/mlkit-test/src/main/java/com/google/mlkit/mlkittextrecognition/MLKTextRecognizer.java
2020-12-15 11:45:20:590 -0500 [main] INFO org.moe.natjgen.UnitEditContext - Getting compilation unit from /Users/eu/Downloads/mlkit-test/src/main/java/com/google/mlkit/mlkittextrecognition/MLKTextLine.java
2020-12-15 11:45:20:624 -0500 [main] INFO org.moe.natjgen.UnitEditContext - Getting compilation unit from /Users/eu/Downloads/mlkit-test/src/main/java/com/google/mlkit/mlkittextrecognition/MLKTextBlock.java
2020-12-15 11:45:20:661 -0500 [main] DEBUG org.moe.natjgen.Main - NatJGen ended in 6.762858196s