Skip to content

fix: Made inline methods in Sentry Native Bridge static #932

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

Merged
merged 3 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Fixed an 'Undefined symbols' issue within the Sentry Native Bridge when building for iOS ([#932](https://github.com/getsentry/sentry-unity/pull/932))

## 0.22.1

### Fixes
Expand Down
11 changes: 7 additions & 4 deletions package-dev/Plugins/iOS/SentryNativeBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// macOS only
int SentryNativeBridgeLoadLibrary() { return 0; }
void *SentryNativeBridgeOptionsNew() { return nil; }
void *_Nullable SentryNativeBridgeOptionsNew() { return nil; }
void SentryNativeBridgeOptionsSetString(void *options, const char *name, const char *value) { }
void SentryNativeBridgeOptionsSetInt(void *options, const char *name, int32_t value) { }
void SentryNativeBridgeStartWithOptions(void *options) { }
Expand Down Expand Up @@ -133,14 +133,17 @@ void SentryNativeBridgeUnsetUser()
return cString;
}

inline NSString *_NSStringOrNil(const char *value)
static inline NSString *_NSStringOrNil(const char *value)
{
return value ? [NSString stringWithUTF8String:value] : nil;
}

inline NSString *_NSNumberOrNil(int32_t value) { return value == 0 ? nil : @(value); }
static inline NSNumber *_NSNumberOrNil(int32_t value)
{
return value == 0 ? nil : @(value);
}

inline NSNumber *_NSBoolOrNil(int8_t value)
static inline NSNumber *_NSBoolOrNil(int8_t value)
{
if (value == 0) {
return @NO;
Expand Down