Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macOS/iOS build errors due to missing NS_SWIFT_SENDABLE macro definition #721

Merged
merged 2 commits into from
Dec 24, 2024

Conversation

tustanivsky
Copy link
Collaborator

During a recent attempt to publish the plugin package to the Unreal Engine Marketplace the following errors occurred:

Users/build/Build/U5M-Marketplace-Mac/Sync/LocalBuilds/PluginTemp/HostProject/Plugins/Sentry/Source/ThirdParty/Mac/include/Sentry/SentryOptions.h:145:79: error: expected ';' at end of declaration list
@property (nullable, nonatomic, copy) SentryBeforeSendEventCallback beforeSend NS_SWIFT_SENDABLE;

/Users/build/Build/U5M-Marketplace-Mac/Sync/LocalBuilds/PluginTemp/HostProject/Plugins/Sentry/Source/ThirdParty/Mac/include/Sentry/SentryOptions.h:145:80: error: C++ requires a type specifier for all declarations
@property (nullable, nonatomic, copy) SentryBeforeSendEventCallback beforeSend NS_SWIFT_SENDABLE;

/Users/build/Build/U5M-Marketplace-Mac/Sync/LocalBuilds/PluginTemp/HostProject/Plugins/Sentry/Source/ThirdParty/Mac/include/Sentry/SentryOptions.h:145:80: error: cannot declare variable inside @interface or @protocol
@property (nullable, nonatomic, copy) SentryBeforeSendEventCallback beforeSend NS_SWIFT_SENDABLE;

...

fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[3/9] Compile Module.Sentry.1_of_3.cpp
[4/9] Compile Module.SentryEditor.cpp
[5/9] Compile Module.Sentry.3_of_3.cpp
[6/9] Link UnrealEditor-Sentry.dylib cancelled
[7/9] Link UnrealEditor-SentryEditor.dylib cancelled
[8/9] WriteMetadata UnrealEditor.target cancelled
[9/9] sh Executing post build script (PostBuild-1.sh)
Sentry: Symbol upload script is missing. Skipping post build step.
Took 33.12142s to run dotnet, ExitCode=6
UnrealBuildTool failed. See log for more details. (/Users/build/Build/U5M-Marketplace-Mac/Sync/Engine/Programs/AutomationTool/Saved/Logs/BuildMarketPlaceItems/UBT-UnrealEditor-Mac-Development.txt)
AutomationTool executed for 0h 0m 33s
AutomationTool exiting with ExitCode=6 (6)
RunUAT ERROR: AutomationTool was unable to run successfully. Exited with code: 6
Took 34.26s to run RunUAT.sh, ExitCode=6
Build failed for plugin Sentry_5.1

The build farms where plugin pre-compilation for UE 5.1 occurs might be using an older version of Xcode (pre-13) or targeting an older macOS version (pre-12) where the NS_SWIFT_SENDABLE macro is unavailable. Adding a check to verify if the macro is defined should help address these issues.

@bruno-garcia bruno-garcia merged commit 19274c8 into main Dec 24, 2024
19 checks passed
@bruno-garcia bruno-garcia deleted the fix/marketplace-build-error branch December 24, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants