GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(mobile): start tasks and open t3 code from ios control center by CopyJosh · Pull Request #30462 · pingdotgg/t3code

feat(mobile): start tasks and open t3 code from ios control center #30462

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.

Sign up for GitHub

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

Open
CopyJosh wants to merge 4 commits into pingdotgg:main
base: main
Loading
Loading
from CopyJosh:feat/ios-control-center-shortcuts
+315 −1
Open

feat(mobile): start tasks and open t3 code from ios control center #30462

Changes from 1 commit
Commits
Show all changes
4 commits
Select commit Hold shift + click to select a range
041cb5c
feat(mobile): start tasks and open t3 code from ios control center
CopyJosh Nov 3, 2026
d4b7973
test(mobile): verify control sources and flags in generated xcode pro…
CopyJosh Nov 4, 2026
b371d60
Merge remote-tracking branch 'origin/main' into feat/ios-control-cent…
juliusmarminge Nov 28, 2026
296d7ac
test(mobile): cover control center plugin with one scheme
juliusmarminge Nov 28, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
test(mobile): verify control sources and flags in generated xcode pro…
…jects
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@CopyJosh
CopyJosh committed Nov 4, 2026
commit d4b797390f739c091810fb7da72275b279b0c001

There are no files selected for viewing

54 changes: 50 additions & 4 deletions 54 apps/mobile/plugins/withIosControls.test.mjs
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as NodeChildProcess from "node:child_process";
import * as NodeFS from "node:fs";
import * as NodeModule from "node:module";
import * as NodeOS from "node:os";
import * as NodePath from "node:path";
import { expect, it } from "vite-plus/test";

const require = NodeModule.createRequire(import.meta.url);
const { IOSConfig } = require("expo/config-plugins");
const withIosControls = require("./withIosControls.cjs");
const withWidgetLogoAsset = require("./withWidgetLogoAsset.cjs");
const withWidgets = require("expo-widgets/app.plugin.js").default;
Expand All @@ -14,7 +16,18 @@ it.each(["t3code", "t3code-dev", "t3code-preview"])(
async (scheme) => {
const root = NodeFS.mkdtempSync(NodePath.join(NodeOS.tmpdir(), "t3-task-control-"));
try {
NodeFS.writeFileSync(NodePath.join(root, "Podfile"), 'target "T3Code" do\nend\n');
const iosRoot = NodePath.join(root, "ios");
const projectPath = NodePath.join(iosRoot, "HelloWorld.xcodeproj", "project.pbxproj");
NodeFS.mkdirSync(NodePath.dirname(projectPath), { recursive: true });
NodeFS.writeFileSync(
projectPath,
NodeChildProcess.execFileSync("tar", [
"-xzOf",
NodePath.join(NodePath.dirname(require.resolve("expo/package.json")), "template.tgz"),
"package/ios/HelloWorld.xcodeproj/project.pbxproj",
]),
);
NodeFS.writeFileSync(NodePath.join(iosRoot, "Podfile"), 'target "T3Code" do\nend\n');
NodeFS.mkdirSync(NodePath.join(root, "assets/widget"), { recursive: true });
NodeFS.copyFileSync(
NodePath.join(import.meta.dirname, "../assets/widget/T3Mark.svg"),
Expand Down Expand Up @@ -43,16 +56,49 @@ it.each(["t3code", "t3code-dev", "t3code-preview"])(
);
await config.mods.ios.dangerous({
...config,
modRequest: { projectRoot: root, platformProjectRoot: root, platform: "ios" },
modRequest: { projectRoot: root, platformProjectRoot: iosRoot, platform: "ios" },
});
const generated = await config.mods.ios.xcodeproj({
...config,
modResults: IOSConfig.XcodeUtils.getPbxproj(root),
modRequest: { projectRoot: root, platformProjectRoot: iosRoot, platform: "ios" },
});
const widgetRoot = NodePath.join(root, "ExpoWidgetsTarget");
NodeFS.writeFileSync(projectPath, generated.modResults.writeSync());
const project = IOSConfig.XcodeUtils.getPbxproj(root);
const [widgetTargetId, widgetTarget] = Object.entries(project.pbxNativeTargetSection()).find(
([key, target]) => !key.endsWith("_comment") && target.name === "ExpoWidgetsTarget",
);
const buildFiles = project.pbxBuildFileSection();
const fileReferences = project.pbxFileReferenceSection();
const sourcePaths = (targetId) =>
project
.pbxSourcesBuildPhaseObj(targetId)
.files.map(({ value }) =>
fileReferences[buildFiles[value].fileRef].path.replaceAll('"', ""),
);
expect(sourcePaths(project.getFirstTarget().uuid)).toContain("T3ControlIntents.swift");
expect(sourcePaths(widgetTargetId)).toEqual(
expect.arrayContaining([
"ExpoWidgetsTarget/T3ControlIntents.swift",
"ExpoWidgetsTarget/T3StartTaskControl.swift",
"ExpoWidgetsTarget/T3OpenAppControl.swift",
]),
);
const configurations = project.pbxXCConfigurationList()[widgetTarget.buildConfigurationList];
for (const { value } of configurations.buildConfigurations) {
expect(
project.pbxXCBuildConfigurationSection()[value].buildSettings
.SWIFT_ACTIVE_COMPILATION_CONDITIONS,
).toContain("T3_WIDGET_EXTENSION");
}
const widgetRoot = NodePath.join(iosRoot, "ExpoWidgetsTarget");
const index = NodeFS.readFileSync(NodePath.join(widgetRoot, "index.swift"), "utf8");
expect(index).toContain("if #available(iOS 18.0, *)");
expect(index).toContain("T3StartTaskControl()");
expect(index).toContain("T3OpenAppControl()");
expect(index).toContain("SubscriptionUsage()");
expect(index).toContain("WidgetLiveActivity()");
const intent = NodeFS.readFileSync(NodePath.join(root, "T3ControlIntents.swift"), "utf8");
const intent = NodeFS.readFileSync(NodePath.join(iosRoot, "T3ControlIntents.swift"), "utf8");
expect(intent).toContain(`"${scheme}://new"`);
expect(NodeFS.readFileSync(NodePath.join(widgetRoot, "T3ControlIntents.swift"), "utf8")).toBe(
intent,
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.