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

migrate RadarUtils to swift #395

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

migrate RadarUtils to swift #395

wants to merge 3 commits into from

Conversation

ShiCheng-Lu
Copy link
Contributor

@ShiCheng-Lu ShiCheng-Lu commented Sep 25, 2024

a slow but swift migration

...

swift and objective-c is fully inter-op-able, the migration only requires converting the *.m file into a *.swift file.

If there are no other objective-c implementations that requires a swift class (i.e. all the references of a swift class are other swift classes), then the *.h file can be omitted, and the @objc tags can be removed, this is for internal interfaces only.

For public interfaces, the swift class can be marked public and then *.h header is not required if there are no more references in other headers.

shoutout to chatGPT for helping to convert the objective-C file into swift without too much pain.

something to note: UIApplication.shared.backgroundTimeRemaining when invalid returns 1.79769e+308 in swift, inf in obj-c. This value is only used as part of logging.

I've also tested building this branch with waypoint, and it's working properly.

@ShiCheng-Lu ShiCheng-Lu marked this pull request as draft September 25, 2024 18:02
@ShiCheng-Lu ShiCheng-Lu marked this pull request as ready for review September 25, 2024 18:24
@ShiCheng-Lu
Copy link
Contributor Author

merge conflict is the sdk version update, will update it after review since there may be more version updates while this is still in review.

@ShiCheng-Lu ShiCheng-Lu changed the title migrate RadarUtils migrate RadarUtils to swift Sep 27, 2024
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.

1 participant