OneSignal / OneSignal-Flutter-SDK

OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your flutter app with OneSignal
https://www.onesignal.com
Other
615 stars 213 forks source link

[question]: How do I get XCTests to run properly (Flutter App)? #927

Open jnovak-SM2Dev opened 1 month ago

jnovak-SM2Dev commented 1 month ago

How can we help?

How do I get XCTests in RunnerTests to work in a Flutter app? I assume I need to add something to the test build target, but the docs don't mention anything.

Test command (from Firebase Test Lab docs)

xcodebuild build-for-testing -workspace Runner.xcworkspace -scheme Runner -xcconfig Flutter/Release.xcconfig -configuration Release -derivedDataPath ../build/ios_integ -sdk iphoneos

The error I receive

The following build commands failed:
        Ld /Users/username/Projects/my_app/build/ios_integ/Build/Products/Release-iphoneos/OneSignalNotificationServiceExtension.appex/OneSignalNotificationServiceExtension normal (in target 'OneSignalNotificationServiceExtension' from project 'Runner')

Firebase Test Lab docs:

https://github.com/flutter/flutter/tree/main/packages/integration_test#ios-device-testing

Code of Conduct

nan-li commented 1 month ago

Hi @jnovak-SM2Dev thank you for reaching out. Can you share more about what exactly was the build command that failed? What is the error for the OneSignalNotificationServiceExtension?

jnovak-SM2Dev commented 1 month ago

@nan-li That's all the log has about it. If I do verbose it gives me 500 lines, but nothing more about the error. Do I need to add anything to the RunnerTests target? That's the only thing I can think of.

Main Target:

Screenshot 2024-08-08 at 3 59 16 PM

Test Target:

Screenshot 2024-08-08 at 3 59 21 PM
nan-li commented 2 weeks ago

The ld command is a link editor, also known as a linker. It combines object and archive files to create an executable. Without a failure or error message, I don't know how to help you resolve.