Skip to content

Commit 9e54a01

Browse files
committed
Live activities, widget and service extension wip
1 parent 32270e7 commit 9e54a01

23 files changed

+1122
-2
lines changed

Diff for: example/ios/AirshipExample.xcodeproj/project.pbxproj

+375
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1620"
4+
wasCreatedForAppExtension = "YES"
5+
version = "2.0">
6+
<BuildAction
7+
parallelizeBuildables = "YES"
8+
buildImplicitDependencies = "YES"
9+
buildArchitectures = "Automatic">
10+
<BuildActionEntries>
11+
<BuildActionEntry
12+
buildForTesting = "YES"
13+
buildForRunning = "YES"
14+
buildForProfiling = "YES"
15+
buildForArchiving = "YES"
16+
buildForAnalyzing = "YES">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "6308BFD12D7FF2A700296239"
20+
BuildableName = "AirshipExampleNotificationServiceExtension.appex"
21+
BlueprintName = "AirshipExampleNotificationServiceExtension"
22+
ReferencedContainer = "container:AirshipExample.xcodeproj">
23+
</BuildableReference>
24+
</BuildActionEntry>
25+
<BuildActionEntry
26+
buildForTesting = "YES"
27+
buildForRunning = "YES"
28+
buildForProfiling = "YES"
29+
buildForArchiving = "YES"
30+
buildForAnalyzing = "YES">
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
34+
BuildableName = "AirshipExample.app"
35+
BlueprintName = "AirshipExample"
36+
ReferencedContainer = "container:AirshipExample.xcodeproj">
37+
</BuildableReference>
38+
</BuildActionEntry>
39+
</BuildActionEntries>
40+
</BuildAction>
41+
<TestAction
42+
buildConfiguration = "Debug"
43+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
44+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
45+
shouldUseLaunchSchemeArgsEnv = "YES"
46+
shouldAutocreateTestPlan = "YES">
47+
</TestAction>
48+
<LaunchAction
49+
buildConfiguration = "Debug"
50+
selectedDebuggerIdentifier = ""
51+
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
52+
launchStyle = "0"
53+
askForAppToLaunch = "Yes"
54+
useCustomWorkingDirectory = "NO"
55+
ignoresPersistentStateOnLaunch = "NO"
56+
debugDocumentVersioning = "YES"
57+
debugServiceExtension = "internal"
58+
allowLocationSimulation = "YES"
59+
launchAutomaticallySubstyle = "2">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
65+
BuildableName = "AirshipExample.app"
66+
BlueprintName = "AirshipExample"
67+
ReferencedContainer = "container:AirshipExample.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</LaunchAction>
71+
<ProfileAction
72+
buildConfiguration = "Release"
73+
shouldUseLaunchSchemeArgsEnv = "YES"
74+
savedToolIdentifier = ""
75+
useCustomWorkingDirectory = "NO"
76+
debugDocumentVersioning = "YES"
77+
askForAppToLaunch = "Yes"
78+
launchAutomaticallySubstyle = "2">
79+
<BuildableProductRunnable
80+
runnableDebuggingMode = "0">
81+
<BuildableReference
82+
BuildableIdentifier = "primary"
83+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
84+
BuildableName = "AirshipExample.app"
85+
BlueprintName = "AirshipExample"
86+
ReferencedContainer = "container:AirshipExample.xcodeproj">
87+
</BuildableReference>
88+
</BuildableProductRunnable>
89+
</ProfileAction>
90+
<AnalyzeAction
91+
buildConfiguration = "Debug">
92+
</AnalyzeAction>
93+
<ArchiveAction
94+
buildConfiguration = "Release"
95+
revealArchiveInOrganizer = "YES">
96+
</ArchiveAction>
97+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1620"
4+
wasCreatedForAppExtension = "YES"
5+
version = "2.0">
6+
<BuildAction
7+
parallelizeBuildables = "YES"
8+
buildImplicitDependencies = "YES"
9+
buildArchitectures = "Automatic">
10+
<BuildActionEntries>
11+
<BuildActionEntry
12+
buildForTesting = "YES"
13+
buildForRunning = "YES"
14+
buildForProfiling = "YES"
15+
buildForArchiving = "YES"
16+
buildForAnalyzing = "YES">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "6308C0F82D80A38200296239"
20+
BuildableName = "ExampleWidgetsExtension.appex"
21+
BlueprintName = "ExampleWidgetsExtension"
22+
ReferencedContainer = "container:AirshipExample.xcodeproj">
23+
</BuildableReference>
24+
</BuildActionEntry>
25+
<BuildActionEntry
26+
buildForTesting = "YES"
27+
buildForRunning = "YES"
28+
buildForProfiling = "YES"
29+
buildForArchiving = "YES"
30+
buildForAnalyzing = "YES">
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
34+
BuildableName = "AirshipExample.app"
35+
BlueprintName = "AirshipExample"
36+
ReferencedContainer = "container:AirshipExample.xcodeproj">
37+
</BuildableReference>
38+
</BuildActionEntry>
39+
</BuildActionEntries>
40+
</BuildAction>
41+
<TestAction
42+
buildConfiguration = "Debug"
43+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
44+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
45+
shouldUseLaunchSchemeArgsEnv = "YES"
46+
shouldAutocreateTestPlan = "YES">
47+
</TestAction>
48+
<LaunchAction
49+
buildConfiguration = "Debug"
50+
selectedDebuggerIdentifier = ""
51+
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
52+
launchStyle = "0"
53+
askForAppToLaunch = "Yes"
54+
useCustomWorkingDirectory = "NO"
55+
ignoresPersistentStateOnLaunch = "NO"
56+
debugDocumentVersioning = "YES"
57+
debugServiceExtension = "internal"
58+
allowLocationSimulation = "YES"
59+
launchAutomaticallySubstyle = "2">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
65+
BuildableName = "AirshipExample.app"
66+
BlueprintName = "AirshipExample"
67+
ReferencedContainer = "container:AirshipExample.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
<EnvironmentVariables>
71+
<EnvironmentVariable
72+
key = "_XCWidgetKind"
73+
value = ""
74+
isEnabled = "YES">
75+
</EnvironmentVariable>
76+
<EnvironmentVariable
77+
key = "_XCWidgetDefaultView"
78+
value = "timeline"
79+
isEnabled = "YES">
80+
</EnvironmentVariable>
81+
<EnvironmentVariable
82+
key = "_XCWidgetFamily"
83+
value = "systemMedium"
84+
isEnabled = "YES">
85+
</EnvironmentVariable>
86+
</EnvironmentVariables>
87+
</LaunchAction>
88+
<ProfileAction
89+
buildConfiguration = "Release"
90+
shouldUseLaunchSchemeArgsEnv = "YES"
91+
savedToolIdentifier = ""
92+
useCustomWorkingDirectory = "NO"
93+
debugDocumentVersioning = "YES"
94+
askForAppToLaunch = "Yes"
95+
launchAutomaticallySubstyle = "2">
96+
<BuildableProductRunnable
97+
runnableDebuggingMode = "0">
98+
<BuildableReference
99+
BuildableIdentifier = "primary"
100+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
101+
BuildableName = "AirshipExample.app"
102+
BlueprintName = "AirshipExample"
103+
ReferencedContainer = "container:AirshipExample.xcodeproj">
104+
</BuildableReference>
105+
</BuildableProductRunnable>
106+
</ProfileAction>
107+
<AnalyzeAction
108+
buildConfiguration = "Debug">
109+
</AnalyzeAction>
110+
<ArchiveAction
111+
buildConfiguration = "Release"
112+
revealArchiveInOrganizer = "YES">
113+
</ArchiveAction>
114+
</Scheme>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1620"
4+
wasCreatedForAppExtension = "YES"
5+
version = "2.0">
6+
<BuildAction
7+
parallelizeBuildables = "YES"
8+
buildImplicitDependencies = "YES"
9+
buildArchitectures = "Automatic">
10+
<BuildActionEntries>
11+
<BuildActionEntry
12+
buildForTesting = "YES"
13+
buildForRunning = "YES"
14+
buildForProfiling = "YES"
15+
buildForArchiving = "YES"
16+
buildForAnalyzing = "YES">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "6308BFF72D80999200296239"
20+
BuildableName = "LiveActivityExtension.appex"
21+
BlueprintName = "LiveActivityExtension"
22+
ReferencedContainer = "container:AirshipExample.xcodeproj">
23+
</BuildableReference>
24+
</BuildActionEntry>
25+
<BuildActionEntry
26+
buildForTesting = "YES"
27+
buildForRunning = "YES"
28+
buildForProfiling = "YES"
29+
buildForArchiving = "YES"
30+
buildForAnalyzing = "YES">
31+
<BuildableReference
32+
BuildableIdentifier = "primary"
33+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
34+
BuildableName = "AirshipExample.app"
35+
BlueprintName = "AirshipExample"
36+
ReferencedContainer = "container:AirshipExample.xcodeproj">
37+
</BuildableReference>
38+
</BuildActionEntry>
39+
</BuildActionEntries>
40+
</BuildAction>
41+
<TestAction
42+
buildConfiguration = "Debug"
43+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
44+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
45+
shouldUseLaunchSchemeArgsEnv = "YES"
46+
shouldAutocreateTestPlan = "YES">
47+
</TestAction>
48+
<LaunchAction
49+
buildConfiguration = "Debug"
50+
selectedDebuggerIdentifier = ""
51+
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
52+
launchStyle = "0"
53+
askForAppToLaunch = "Yes"
54+
useCustomWorkingDirectory = "NO"
55+
ignoresPersistentStateOnLaunch = "NO"
56+
debugDocumentVersioning = "YES"
57+
debugServiceExtension = "internal"
58+
allowLocationSimulation = "YES"
59+
launchAutomaticallySubstyle = "2">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
65+
BuildableName = "AirshipExample.app"
66+
BlueprintName = "AirshipExample"
67+
ReferencedContainer = "container:AirshipExample.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
<EnvironmentVariables>
71+
<EnvironmentVariable
72+
key = "_XCWidgetKind"
73+
value = ""
74+
isEnabled = "YES">
75+
</EnvironmentVariable>
76+
<EnvironmentVariable
77+
key = "_XCWidgetDefaultView"
78+
value = "timeline"
79+
isEnabled = "YES">
80+
</EnvironmentVariable>
81+
<EnvironmentVariable
82+
key = "_XCWidgetFamily"
83+
value = "systemMedium"
84+
isEnabled = "YES">
85+
</EnvironmentVariable>
86+
</EnvironmentVariables>
87+
</LaunchAction>
88+
<ProfileAction
89+
buildConfiguration = "Release"
90+
shouldUseLaunchSchemeArgsEnv = "YES"
91+
savedToolIdentifier = ""
92+
useCustomWorkingDirectory = "NO"
93+
debugDocumentVersioning = "YES"
94+
askForAppToLaunch = "Yes"
95+
launchAutomaticallySubstyle = "2">
96+
<BuildableProductRunnable
97+
runnableDebuggingMode = "0">
98+
<BuildableReference
99+
BuildableIdentifier = "primary"
100+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
101+
BuildableName = "AirshipExample.app"
102+
BlueprintName = "AirshipExample"
103+
ReferencedContainer = "container:AirshipExample.xcodeproj">
104+
</BuildableReference>
105+
</BuildableProductRunnable>
106+
</ProfileAction>
107+
<AnalyzeAction
108+
buildConfiguration = "Debug">
109+
</AnalyzeAction>
110+
<ArchiveAction
111+
buildConfiguration = "Release"
112+
revealArchiveInOrganizer = "YES">
113+
</ArchiveAction>
114+
</Scheme>
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.application-groups</key>
6+
<array>
7+
<string>group.com.urbanairship.reactnative</string>
8+
</array>
9+
</dict>
10+
</plist>

Diff for: example/ios/AirshipExample/AppDelegate.swift

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import UIKit
22
import React
33
import React_RCTAppDelegate
44
import ReactAppDependencyProvider
5+
import ActivityKit
56

67
@main
78
class AppDelegate: RCTAppDelegate {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.application-groups</key>
6+
<array>
7+
<string>group.com.urbanairship.reactnative</string>
8+
</array>
9+
</dict>
10+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSExtension</key>
6+
<dict>
7+
<key>NSExtensionPointIdentifier</key>
8+
<string>com.apple.usernotifications.service</string>
9+
<key>NSExtensionPrincipalClass</key>
10+
<string>$(PRODUCT_MODULE_NAME).NotificationService</string>
11+
</dict>
12+
</dict>
13+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//import UserNotifications
2+
//import AirshipServiceExtension
3+
//
4+
//class NotificationService: UANotificationServiceExtension {}

Diff for: example/ios/ExampleWidgets/AppIntent.swift

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// AppIntent.swift
3+
// ExampleWidgets
4+
//
5+
// Created by Ryan Lepinski on 9/26/24.
6+
//
7+
8+
import WidgetKit
9+
import AppIntents
10+
11+
struct ConfigurationAppIntent: WidgetConfigurationIntent {
12+
static var title: LocalizedStringResource { "Configuration" }
13+
static var description: IntentDescription { "This is an example widget." }
14+
15+
// An example configurable parameter.
16+
@Parameter(title: "Favorite Emoji", default: "😃")
17+
var favoriteEmoji: String
18+
}

0 commit comments

Comments
 (0)