quikkly / react-native

React Native plugin for the Quikkly iOS and Android SDKs.
Apache License 2.0
3 stars 6 forks source link

Example doesn't build on Xcode 10.2.1 #4

Open yuweipei opened 5 years ago

yuweipei commented 5 years ago

Recently the latest Quikkly iOS SDK 3.4.11 is out with Swift 5 and Xcode 12 Support (https://github.com/quikkly/ios-sdk/releases/tag/3.4.11), however when trying to build the app on Xcode 10.2.1, I'm hitting the build error Property 'value' cannot be found in forward class object 'QKScannable'

/Users/david/git/example/example/node_modules/react-native-quikkly/ios/QuikklyScanViewController.m:28:13: error: expected identifier [result setObject:[NSNumber numberWithUnsignedLongLong:scannable.value].stringValue forKey:@"value"]; ^ 1 error generated.

It seems that something has changed in the framework and QKScannable class no longer has the value property. Could you guys look into this issue, please?

mini-devops commented 5 years ago

Thanks for flagging this - we'll investigate

janekp commented 5 years ago

Weird. "value" appears to be there just fine:

@objc public internal(set) var value:UInt64 = 0

yuweipei commented 5 years ago

Screen Shot 2019-05-22 at 4 04 53 PM

not sure if this is useful. the screenshots shows the error and after tapping on Forward declaration of class here shows the header file of QKScanViewController

janekp commented 5 years ago

Not sure what's wrong.

https://github.com/quikkly/ios-sdk/blob/master/Quikkly.framework/Headers/Quikkly-Swift.h#L724

Example project compiles just fine (Xcode 10.2.1)

janekp commented 5 years ago

Does it solve the issue if you add the following to QuikklyScanViewController.m

`@interface QKScannable(Additions)

@property (nonatomic, readonly) uint64_t value;

@end`

Jberivera commented 5 years ago

@janekp I'm getting this error after including the suggested workaround: QKScannable is not defined, it seems to be a Swift issue on object-c code, but I have Always Embed Swift Standard Libraries = yes properly set, I noticed that this react-native bridge is not following that rule of including the Swift Standard Libraries suggested in the iOS-SDK repo, is there a reason for that? I'm forking this library-bridge and also switching that setting to 'yes' but it is not working either.

image

janekp commented 5 years ago

The problem seems to be with the Simulator. Trying to figure out why. We mostly test on actual devices, because of the camera requirement.

davidtrogers commented 4 years ago

To add something extra to @janekp's comment, we're only seeing this on the Simulator (i.e. not on build for generic device, or on an actual device.) We're using RN 0.61.4, Xcode 11.2.1 (so it isn't just Xcode 10).