OneSignal / react-native-onesignal

React Native Library for OneSignal Push Notifications Service
Other
1.57k stars 374 forks source link

YogaKit in OneSignalNotificationServiceExtension #965

Closed omarDtp closed 4 years ago

omarDtp commented 4 years ago

react-native info

System: OS: macOS 10.15.1 CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz Memory: 93.24 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node Yarn: 1.22.0 - ~/.yarn/bin/yarn npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 Android SDK: API Levels: 21, 23, 26, 27, 28, 29 Build Tools: 26.0.2, 26.0.3, 27.0.3, 28.0.3 System Images: android-27 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 3.5 AI-191.8026.42.35.5791312 Xcode: 11.2.1/11B500 - /usr/bin/xcodebuild Languages: Python: 2.7.16 - /usr/local/bin/python npmPackages: @react-native-community/cli: Not Found react: ^16.9.0 => 16.13.1 react-native: ^0.61.5 => 0.62.0 npmGlobalPackages: react-native: Not Found

----- Error on Xcode after build on OneSignalNotificationServiceExtension

ld: warning: Could not find or use auto-linked library 'swiftCoreFoundation' ld: warning: Could not find or use auto-linked library 'swiftCompatibility50' ld: warning: Could not find or use auto-linked library 'swiftObjectiveC' ld: warning: Could not find or use auto-linked library 'swiftQuartzCore' ld: warning: Could not find or use auto-linked library 'swiftCore' ld: warning: Could not find or use auto-linked library 'swiftCoreGraphics' ld: warning: Could not find or use auto-linked library 'swiftUIKit' ld: warning: Could not find or use auto-linked library 'swiftDarwin' ld: warning: Could not find or use auto-linked library 'swiftMetal' ld: warning: Could not find or use auto-linked library 'swiftCoreImage' ld: warning: Could not find or use auto-linked library 'swiftCompatibilityDynamicReplacements' ld: warning: Could not find or use auto-linked library 'swiftFoundation' ld: warning: Could not find or use auto-linked library 'swiftDispatch' Undefined symbols for architecture x86_64: "protocol descriptor for Swift.ExpressibleByFloatLiteral", referenced from: protocol conformance descriptor for C.YGValue : Swift.ExpressibleByFloatLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "associated conformance descriptor for Swift.ExpressibleByFloatLiteral.FloatLiteralType: Swift._ExpressibleByBuiltinFloatLiteral", referenced from: protocol conformance descriptor for C.YGValue : Swift.ExpressibleByFloatLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "associated type descriptor for FloatLiteralType", referenced from: protocol conformance descriptor for C.YGValue : Swift.ExpressibleByFloatLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "associated conformance descriptor for Swift.ExpressibleByIntegerLiteral.IntegerLiteralType: Swift._ExpressibleByBuiltinIntegerLiteral", referenced from: protocol conformance descriptor for C.YGValue : Swift.ExpressibleByIntegerLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "method descriptor for Swift.ExpressibleByFloatLiteral.init(floatLiteral: A.FloatLiteralType) -> A", referenced from: protocol conformance descriptor for C.YGValue : Swift.ExpressibleByFloatLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "_OBJCCLASS$_RCTOneSignalExtensionService", referenced from: objc-class-ref in NotificationService.o "protocol descriptor for Swift.ExpressibleByIntegerLiteral", referenced from: protocol conformance descriptor for C.YGValue : Swift.ExpressibleByIntegerLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "associated type descriptor for IntegerLiteralType", referenced from: protocol conformance descriptor for C.YGValue : Swift.ExpressibleByIntegerLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "method descriptor for Swift.ExpressibleByIntegerLiteral.init(integerLiteral: A.IntegerLiteralType) -> A", referenced from: protocol conformance descriptor for C.YGValue : Swift.ExpressibleByIntegerLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "value witness table for Builtin.Int32", referenced from: full type metadata for C.YGUnit in libYogaKit.a(YGLayoutExtensions.o) "swift_FORCELOAD$_swiftCompatibilityDynamicReplacements", referenced from: swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_YogaKit in libYogaKit.a(YGLayoutExtensions.o) (maybe you meant: swift_FORCELOAD$swiftCompatibilityDynamicReplacements$_YogaKit) "protocol witness table for Swift.Float : Swift._ExpressibleByBuiltinFloatLiteral in Swift", referenced from: associated type witness table accessor for FloatLiteralType : Swift._ExpressibleByBuiltinFloatLiteral in C.YGValue : Swift.ExpressibleByFloatLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) "swift_FORCELOAD$_swiftCompatibility50", referenced from: swift_FORCELOAD$swiftCompatibility50$_YogaKit in libYogaKit.a(YGLayoutExtensions.o) (maybe you meant: swift_FORCELOAD$swiftCompatibility50$_YogaKit) "_swift_getForeignTypeMetadata", referenced from: merged type metadata accessor for C.YGValue in libYogaKit.a(YGLayoutExtensions.o) "protocol witness table for Swift.Int : Swift._ExpressibleByBuiltinIntegerLiteral in Swift", referenced from: associated type witness table accessor for IntegerLiteralType : Swift._ExpressibleByBuiltinIntegerLiteral in C.YGValue : Swift.ExpressibleByIntegerLiteral in YogaKit in libYogaKit.a(YGLayoutExtensions.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

jkasten2 commented 4 years ago

@omarDtp It looks like YogaKit was added to your OneSignalNotificationServiceExtension target by mistake or YogaKit is adding it self automatically to all targets.

I recommend check your Podfile to make sure only the OneSignal pod is under your OneSignalNotificationServiceExtension target. I also recommend checking NotificationService.swift or NotificationService.m if and remove references to Yoga there too.

Last if you believe there is a compatibility problem between YogaKit and OneSignal please provide exact details on how to reproduce this issue on new project. Please also share this with the YogaKit repo if you are able to as well.

jkasten2 commented 4 years ago

Closing due to inactivity.