Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

GH-136 Make linker safe! #147

Merged
merged 2 commits into from
Apr 3, 2018
Merged

GH-136 Make linker safe! #147

merged 2 commits into from
Apr 3, 2018

Conversation

jamesmontemagno
Copy link
Collaborator

Description of Change

Ensure linker safe! Enabled LinkerSafe attributes on iOS/Android. Also updated screenmetrics with a preserve so it doesn't get removed.

Bugs Fixed

API Changes

Made ScreenMetrics a struct to align with other types that we have inside of a class.

Added preserve to it so it works.

Behavioral Changes

Added linker settings for sample projects for better testing.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Has samples (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Updated documentation (see walkthrough)

#elif __IOS__
[Foundation.Preserve(AllMembers = true)]
#endif
public struct ScreenMetrics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have any idea why this type gets removed if the device info is being used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't to be honest with you. It is kind of odd because other ones are just fine. I would have contact the linker team i guess. However not too worried about a single struct.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is because it is a struct... the other types are classes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was a class originally, i changed to struct :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both had the issue

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😭

@jamesmontemagno
Copy link
Collaborator Author

build

@jamesmontemagno jamesmontemagno merged commit ec20afc into master Apr 3, 2018
@jamesmontemagno jamesmontemagno deleted the feature/linkersafe branch April 4, 2018 22:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants