Skip to content

Blog: platform APIs in the core (connectivity + identity + sharing + AI)#5087

Open
shai-almog wants to merge 4 commits into
blog-developer-workflowfrom
blog-platform-apis-in-the-core
Open

Blog: platform APIs in the core (connectivity + identity + sharing + AI)#5087
shai-almog wants to merge 4 commits into
blog-developer-workflowfrom
blog-platform-apis-in-the-core

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

File

  • docs/website/content/blog/platform-apis-in-the-core.md — single new file.

Sequencing

Branches off master; intended to publish on Monday. Front matter date is 2026-06-01.

Supersedes the closed PRs #5076 (connectivity), #5077 (OIDC + WebAuthn), #5078 (share callbacks), and #5082 (AI).

Test plan

  • Hugo build of docs/website succeeds.
  • Post renders correctly on the blog index and as a standalone page.
  • Header image is generated at /static/blog/platform-apis-in-the-core.jpg.

@shai-almog shai-almog force-pushed the blog-platform-apis-in-the-core branch from a3190d9 to ae74fe9 Compare May 29, 2026 11:33
@shai-almog shai-almog changed the base branch from master to blog-developer-workflow May 29, 2026 11:35
@github-actions
Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog shai-almog force-pushed the blog-platform-apis-in-the-core branch 2 times, most recently from f24bd82 to 5db7754 Compare May 29, 2026 13:18
Consolidated follow-up to the May 29 weekly index. Covers the four
surfaces that moved from "you need a cn1lib for this" to "it is in
the framework" this release:

- Connectivity (PR #5021): com.codename1.io.{wifi,bonjour,usb} +
  NetworkManager.addNetworkTypeListener with the per-platform
  implementations and the three new CN1_INCLUDE_* defines that keep
  unused entitlements out of Apple's API-usage scan.
- Identity (PRs #5018, #5039): OIDC client backed by
  ASWebAuthenticationSession / Custom Tabs with PKCE; Sign in with
  Apple in core; refreshed Google/Facebook/Microsoft/Auth0/Firebase
  wrappers; WebAuthn / passkey client in W3C JSON wire format with
  iOS 16 and Android API 28 native bindings; Auth0/Firebase passkey
  helpers; legacy Oauth2 deprecated.
- Sharing (PR #5036): ShareResult callbacks
  (SHARED_TO/DISMISSED/FAILED) on iOS and Android via
  UIActivityViewController.completionWithItemsHandler and
  Intent.createChooser with IntentSender; IOSShareExtensionBuilder
  in the Maven plugin generates a complete .ios.appext bundle.
- AI (PRs #5035, #5057): com.codename1.ai with LlmClient for
  OpenAI/Anthropic/Gemini/Ollama, streaming SSE, ChatView,
  SpeechRecognizer/TextToSpeech, SecureStorage non-prompting
  overloads, simulator Ollama redirect, AiDependencyTable build-time
  injection, and the cn1-ai-mlkit-{barcode,docscan,face} cn1libs.

Closes with the structural element common to all four (scanner-driven
gating that mirrors the NFC/biometrics pattern from two weeks ago).
- Retitled "AI, OAuth, And Other Platform APIs In The Core".
- Reordered sections so the two headline pieces come first: AI
  (with deep tutorials) and OAuth / OIDC (with provider walk-
  throughs and a migration). WiFi / connectivity and share-sheet
  callbacks land at the end.
- Opener no longer runs together; the NFC / biometrics / crypto
  call-back is linked to the previous post explicitly.
- AI section expanded with concrete examples for streaming, tool
  calls, embeddings, image generation, the simulator Ollama
  redirect, the SecureStorage non-prompting overloads, the ChatView
  binding, and an ASCII mockup of the ChatView surface for readers
  who haven't seen it.
- New subsection explaining why the ML Kit AI features stay in
  cn1libs even though the LlmClient surface lives in core (core
  carries the plumbing every AI app wants; specialised verticals
  with large native dependencies stay opt-in; the cloud-build big-
  upload guard rules out the multi-gigabyte models).
- OAuth section now walks through OIDC discovery, the four
  provider wrappers (Google, Microsoft, Auth0, Facebook), Sign in
  with Apple, an Oauth2-to-OidcClient migration example, and the
  WebAuthn / passkey client.
- Dev-guide references go to the HTML version on the website.
- Hero image lands at /blog/platform-apis-in-the-core.jpg.
- Wrap-up has the link back to the intro and forward to the
  Wednesday post.

Also updates the developer-workflow post (rebased on top) to add
the forward link to this post in its wrap-up.
@shai-almog shai-almog force-pushed the blog-platform-apis-in-the-core branch from 5db7754 to 81f62e3 Compare May 29, 2026 14:07
- Opening description rewritten so it does not read as a comma list.
- Dropped the "AI first, OAuth second" meta-paragraph.
- Anthropic and Gemini are no longer described as "still in flight";
  both are fully implemented in this release.
- Replaced the SecureStorage "small thing that matters more than it
  sounds" framing with a proper "How to handle API keys" section
  that opens with the security rule (never check in, never embed,
  never hardcode), explains the proper shape (fetch from your
  backend over an authenticated request, cache to the platform
  keychain via SecureStorage), and gives a concrete getOpenAiKey
  example.
- ChatView ASCII mockup replaced with a screenshot reference and a
  richer code example that drives the chat manually
  (ConversationStore + per-message lifecycle + error path).
- Removed the Speech / TTS subsection entirely. The native iOS /
  Android bridges are still tracked follow-ups in PR #5035 and are
  not shipping in this release.
- iOS Share Extension paragraph expanded into a real "how your app
  appears in other apps' share menus" section with a pom.xml
  configuration block, the cn1:generate-ios-share-extension Mojo
  invocation, and a host-side payload-read example.
- AI cn1libs rewritten. The 13 cn1libs land in a feature table with
  a one-line "what it gives you" column each, followed by a "how to
  add and use them" paragraph and three short worked examples
  (barcode, text recognition, translation). The "why these are
  cn1libs and not core" answer follows the concrete list rather
  than appearing without context.
- "What ties this together" section removed.
- Replaced the placeholder ChatView image reference with a real
  screenshot pulled from the ChatViewDevGuideScreenshotTest output
  (scripts/ios/screenshots-metal/ChatView_light.png), cropped to
  remove the test-harness caption and downscaled for web payload.
- Replaced the AI cn1lib quick-table and the "Why are these cn1libs"
  paragraph with thirteen per-cn1lib subsections (cn1-ai-mlkit-{
  text, barcode, face, labeling, translate, smartreply, langid,
  pose, segmentation, docscan}, cn1-ai-tflite, cn1-ai-whisper,
  cn1-ai-stablediffusion). Each subsection covers TL;DR, per-
  platform native bridge, use cases, and a real working code
  sample using the actual facade signature (TextRecognizer.
  recognize / BarcodeScanner.scan / FaceDetector.detect / ...
  PoseDetector.detect / SelfieSegmenter.segment / ... etc).
- Up front: the cn1libs aren't in the CN1 Preferences picker yet,
  so the manual pom.xml dependency snippet is the supported path;
  the shared pattern is given once with just the artifactId
  changing per cn1lib.
- Dropped the mention of scripts/create-ai-cn1lib.sh as an
  implementation detail.
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