Skip to content

Conversation

@KolbyML
Copy link

@KolbyML KolbyML commented Dec 27, 2025

I don't know how but Kotlin calls OperatingSystem.IOS, adding iOS as an OperatingSystem fixed my problems, it had something to do with Kotlin's logging library if I remember correctly during initialization it calls something with OperatingSystem.IOS then it panics because IOS isn't an option in the OperatingSystem Class


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Error

 ⚠️ OCA signatory status must be verified

Issue

  • JDK-8374522: Mobile: Add iOS as a platform in OperatingSystem.java (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/mobile.git pull/44/head:pull/44
$ git checkout pull/44

Update a local copy of the PR:
$ git checkout pull/44
$ git pull https://git.openjdk.org/mobile.git pull/44/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 44

View PR using the GUI difftool:
$ git pr show -t 44

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/mobile/pull/44.diff

@KolbyML
Copy link
Author

KolbyML commented Dec 27, 2025

My contributor agreement is under review right now

@bridgekeeper bridgekeeper bot added the oca Needs verification of OCA signatory status label Dec 27, 2025
@bridgekeeper
Copy link

bridgekeeper bot commented Dec 27, 2025

Hi @KolbyML, welcome to this OpenJDK project and thanks for contributing!

We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing /signed in a comment in this pull request.

If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user KolbyML" as summary for the issue.

If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing /covered in a comment in this pull request.

@openjdk
Copy link

openjdk bot commented Dec 27, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@KolbyML
Copy link
Author

KolbyML commented Dec 27, 2025

/signed

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 27, 2025

Thank you! Please allow for up to two weeks to process your OCA, although it is usually done within one to two business days. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated!

@KolbyML
Copy link
Author

KolbyML commented Dec 30, 2025

/signed

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 30, 2025

Already processed the signed command

@johanvos
Copy link
Collaborator

Can you create a JBS issue for this? In order for Skara to deal with this PR, it needs to be linked to an issue in JBS (project JDK, OS iOS).
https://bugs.openjdk.org/issues/?jql=project%20%3D%20%2210100%22%20AND%20OS%20%3D%20iOS
Let me know if you need help with this.

@KolbyML
Copy link
Author

KolbyML commented Dec 31, 2025

Hi @johanvos it appears that I can't login because I don't have an account, and it looks like getting an account is an invite thing, so I don't think I am able to make an issue, although I want to!

If you could help me make an account that would be greatly appreciated!

@johanvos
Copy link
Collaborator

johanvos commented Jan 2, 2026

@KolbyML unfortunately, I can't create/modify accounts on JBS. If you don't have an account, you can still file an issue at https://bugs.java.com/bugdatabase/
It will then manually be triaged, and after that, it should be auto-assigned to me (hopefully).
While the triage can take a few days, it would help adding a code snippet here on how this would be intended to use.

@KolbyML
Copy link
Author

KolbyML commented Jan 3, 2026

I run this jar on iOS https://github.com/Suwayomi/Suwayomi-Server and here is my iOS project https://github.com/KolbyML/Mangatan/tree/master/bin/mangatan_ios

Suwayomi-Server.jar initalizes Kotlin's logger which calls OperatingSystem.iOS, but then I got an error because the modules or static libs I built from openjdk/mobile OperatingSystem didn't have iOS as a member, when I added the member the panic went away

Sure I will submit an issue there

@KolbyML
Copy link
Author

KolbyML commented Jan 3, 2026

I submitted a bug report

image

@KolbyML
Copy link
Author

KolbyML commented Jan 6, 2026

I got a bug report made @johanvos https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8374522

@ForceInline
public static boolean isMacOS() {
return PlatformProps.TARGET_OS_IS_MACOS;
// Treat iOS as macOS for compatibility with existing libraries unless specific IOS checks exist
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is needed once the isIOS() call is added? (which is added in this PR)

Copy link
Member

Choose a reason for hiding this comment

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

Also, it looks really odd. Why isn't it something like:

return current() == MACOS || current() == IOS;

or

return PlatformProps.TARGET_OS_IS_MACOS || PlatformProps.TARGET_OS_IS_IOS;

?

Copy link
Author

Choose a reason for hiding this comment

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

I will test this tomorrow and report back and go from there

Copy link
Author

Choose a reason for hiding this comment

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

Ok I applied the feedback

I don't think this is needed once the isIOS() call is added? (which is added in this PR)
yeah it worked without it, updated the PR

I applied PlatformProps.TARGET_OS_IS_IOS to isIos

@johanvos
Copy link
Collaborator

johanvos commented Jan 6, 2026

Can you change the title of this PR into
8374522: Mobile: Add iOS as a platform in OperatingSystem.java

@johanvos
Copy link
Collaborator

johanvos commented Jan 6, 2026

I got a bug report made @johanvos https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8374522

It is now in JBS as well: https://bugs.openjdk.org/browse/JDK-8374522

@KolbyML KolbyML changed the title Add iOS as a platform in OperatingSystem.java 8374522: Mobile: Add iOS as a platform in OperatingSystem.java Jan 6, 2026
@KolbyML
Copy link
Author

KolbyML commented Jan 6, 2026

Can you change the title of this PR into 8374522: Mobile: Add iOS as a platform in OperatingSystem.java

Updated 🫡 let me know if I need to do anything else

@KolbyML KolbyML requested review from johanvos and magicus January 16, 2026 02:04
@KolbyML
Copy link
Author

KolbyML commented Jan 16, 2026

@johanvos @magicus ready for another look 🫡

Copy link
Member

@magicus magicus left a comment

Choose a reason for hiding this comment

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

LTGM now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oca Needs verification of OCA signatory status oca-verify

Development

Successfully merging this pull request may close these issues.

3 participants