@javascriptcommon/react-native-carplay 2.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +633 -0
- package/ios/RCTConvert+RNCarPlay.h +19 -0
- package/ios/RCTConvert+RNCarPlay.m +95 -0
- package/ios/RNCPStore.h +22 -0
- package/ios/RNCPStore.m +68 -0
- package/ios/RNCarPlay.h +32 -0
- package/ios/RNCarPlay.m +1755 -0
- package/ios/RNCarPlay.xcodeproj/project.pbxproj +300 -0
- package/lib/CarPlay.js +146 -0
- package/lib/index.js +63 -0
- package/lib/interfaces/Action.js +2 -0
- package/lib/interfaces/AlertAction.js +2 -0
- package/lib/interfaces/BarButton.js +2 -0
- package/lib/interfaces/CarColor.js +2 -0
- package/lib/interfaces/GridButton.js +2 -0
- package/lib/interfaces/Header.js +2 -0
- package/lib/interfaces/ListItem.js +2 -0
- package/lib/interfaces/ListItemUpdate.js +2 -0
- package/lib/interfaces/ListSection.js +2 -0
- package/lib/interfaces/Maneuver.js +2 -0
- package/lib/interfaces/MapButton.js +2 -0
- package/lib/interfaces/NavigationAlert.js +9 -0
- package/lib/interfaces/NavigationInfo.js +2 -0
- package/lib/interfaces/NavigationStep.js +2 -0
- package/lib/interfaces/Pane.js +2 -0
- package/lib/interfaces/PauseReason.js +11 -0
- package/lib/interfaces/Place.js +2 -0
- package/lib/interfaces/TextConfiguration.js +2 -0
- package/lib/interfaces/TimeRemainingColor.js +2 -0
- package/lib/interfaces/TravelEstimates.js +2 -0
- package/lib/interfaces/VoiceControlState.js +2 -0
- package/lib/navigation/NavigationSession.js +53 -0
- package/lib/navigation/Trip.js +19 -0
- package/lib/templates/ActionSheetTemplate.js +15 -0
- package/lib/templates/AlertTemplate.js +15 -0
- package/lib/templates/ContactTemplate.js +15 -0
- package/lib/templates/GridTemplate.js +16 -0
- package/lib/templates/InformationTemplate.js +24 -0
- package/lib/templates/ListTemplate.js +67 -0
- package/lib/templates/MapTemplate.js +115 -0
- package/lib/templates/NowPlayingTemplate.js +17 -0
- package/lib/templates/PointOfInterestTemplate.js +16 -0
- package/lib/templates/SearchTemplate.js +41 -0
- package/lib/templates/TabBarTemplate.js +26 -0
- package/lib/templates/Template.js +74 -0
- package/lib/templates/VoiceControlTemplate.js +19 -0
- package/lib/templates/android/AndroidNavigationBaseTemplate.js +29 -0
- package/lib/templates/android/MessageTemplate.js +10 -0
- package/lib/templates/android/NavigationTemplate.js +16 -0
- package/lib/templates/android/PaneTemplate.js +10 -0
- package/lib/templates/android/PlaceListMapTemplate.js +18 -0
- package/lib/templates/android/PlaceListNavigationTemplate.js +19 -0
- package/lib/templates/android/RoutePreviewNavigationTemplate.js +22 -0
- package/package.json +71 -0
- package/react-native-carplay.podspec +21 -0
- package/src/CarPlay.ts +286 -0
- package/src/index.ts +50 -0
- package/src/interfaces/Action.ts +15 -0
- package/src/interfaces/AlertAction.ts +5 -0
- package/src/interfaces/BarButton.ts +41 -0
- package/src/interfaces/CarColor.ts +1 -0
- package/src/interfaces/GridButton.ts +25 -0
- package/src/interfaces/Header.ts +16 -0
- package/src/interfaces/ListItem.ts +84 -0
- package/src/interfaces/ListItemUpdate.ts +14 -0
- package/src/interfaces/ListSection.ts +21 -0
- package/src/interfaces/Maneuver.ts +30 -0
- package/src/interfaces/MapButton.ts +27 -0
- package/src/interfaces/NavigationAlert.ts +46 -0
- package/src/interfaces/NavigationInfo.ts +19 -0
- package/src/interfaces/NavigationStep.ts +17 -0
- package/src/interfaces/Pane.ts +29 -0
- package/src/interfaces/PauseReason.ts +7 -0
- package/src/interfaces/Place.ts +12 -0
- package/src/interfaces/TextConfiguration.ts +5 -0
- package/src/interfaces/TimeRemainingColor.ts +1 -0
- package/src/interfaces/TravelEstimates.ts +39 -0
- package/src/interfaces/VoiceControlState.ts +8 -0
- package/src/navigation/NavigationSession.ts +57 -0
- package/src/navigation/Trip.ts +36 -0
- package/src/templates/ActionSheetTemplate.ts +21 -0
- package/src/templates/AlertTemplate.ts +20 -0
- package/src/templates/ContactTemplate.ts +45 -0
- package/src/templates/GridTemplate.ts +45 -0
- package/src/templates/InformationTemplate.ts +42 -0
- package/src/templates/ListTemplate.ts +167 -0
- package/src/templates/MapTemplate.ts +231 -0
- package/src/templates/NowPlayingTemplate.ts +31 -0
- package/src/templates/PointOfInterestTemplate.ts +40 -0
- package/src/templates/SearchTemplate.ts +70 -0
- package/src/templates/TabBarTemplate.ts +56 -0
- package/src/templates/Template.ts +164 -0
- package/src/templates/VoiceControlTemplate.ts +25 -0
- package/src/templates/android/AndroidNavigationBaseTemplate.ts +46 -0
- package/src/templates/android/MessageTemplate.ts +19 -0
- package/src/templates/android/NavigationTemplate.ts +50 -0
- package/src/templates/android/PaneTemplate.ts +16 -0
- package/src/templates/android/PlaceListMapTemplate.ts +64 -0
- package/src/templates/android/PlaceListNavigationTemplate.ts +57 -0
- package/src/templates/android/RoutePreviewNavigationTemplate.ts +66 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
// !$*UTF8*$!
|
|
2
|
+
{
|
|
3
|
+
archiveVersion = 1;
|
|
4
|
+
classes = {
|
|
5
|
+
};
|
|
6
|
+
objectVersion = 50;
|
|
7
|
+
objects = {
|
|
8
|
+
|
|
9
|
+
/* Begin PBXBuildFile section */
|
|
10
|
+
E344BCC72249585C006FD80D /* RNCarPlay.m in Sources */ = {isa = PBXBuildFile; fileRef = E344BBF222494D53006FD80D /* RNCarPlay.m */; };
|
|
11
|
+
E344BCC82249585C006FD80D /* RNCPStore.m in Sources */ = {isa = PBXBuildFile; fileRef = E344BBF422494D9D006FD80D /* RNCPStore.m */; };
|
|
12
|
+
E35223EB224BD4E500623F30 /* RCTConvert+RNCarPlay.m in Sources */ = {isa = PBXBuildFile; fileRef = E35223EA224BD4E500623F30 /* RCTConvert+RNCarPlay.m */; };
|
|
13
|
+
/* End PBXBuildFile section */
|
|
14
|
+
|
|
15
|
+
/* Begin PBXCopyFilesBuildPhase section */
|
|
16
|
+
E344BCBC22495851006FD80D /* CopyFiles */ = {
|
|
17
|
+
isa = PBXCopyFilesBuildPhase;
|
|
18
|
+
buildActionMask = 2147483647;
|
|
19
|
+
dstPath = "include/$(PRODUCT_NAME)";
|
|
20
|
+
dstSubfolderSpec = 16;
|
|
21
|
+
files = (
|
|
22
|
+
);
|
|
23
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
24
|
+
};
|
|
25
|
+
/* End PBXCopyFilesBuildPhase section */
|
|
26
|
+
|
|
27
|
+
/* Begin PBXFileReference section */
|
|
28
|
+
E344BBEA22494CBD006FD80D /* RNCarPlay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNCarPlay.h; sourceTree = "<group>"; };
|
|
29
|
+
E344BBF222494D53006FD80D /* RNCarPlay.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNCarPlay.m; sourceTree = "<group>"; };
|
|
30
|
+
E344BBF422494D9D006FD80D /* RNCPStore.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNCPStore.m; sourceTree = "<group>"; };
|
|
31
|
+
E344BBF622494DAC006FD80D /* RNCPStore.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNCPStore.h; sourceTree = "<group>"; };
|
|
32
|
+
E344BCBE22495851006FD80D /* libRNCarPlay.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNCarPlay.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
33
|
+
E35223E9224BD4C400623F30 /* RCTConvert+RNCarPlay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+RNCarPlay.h"; sourceTree = "<group>"; };
|
|
34
|
+
E35223EA224BD4E500623F30 /* RCTConvert+RNCarPlay.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+RNCarPlay.m"; sourceTree = "<group>"; };
|
|
35
|
+
/* End PBXFileReference section */
|
|
36
|
+
|
|
37
|
+
/* Begin PBXFrameworksBuildPhase section */
|
|
38
|
+
E344BCBB22495851006FD80D /* Frameworks */ = {
|
|
39
|
+
isa = PBXFrameworksBuildPhase;
|
|
40
|
+
buildActionMask = 2147483647;
|
|
41
|
+
files = (
|
|
42
|
+
);
|
|
43
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
44
|
+
};
|
|
45
|
+
/* End PBXFrameworksBuildPhase section */
|
|
46
|
+
|
|
47
|
+
/* Begin PBXGroup section */
|
|
48
|
+
E344BBDD22494CBD006FD80D = {
|
|
49
|
+
isa = PBXGroup;
|
|
50
|
+
children = (
|
|
51
|
+
E35223EA224BD4E500623F30 /* RCTConvert+RNCarPlay.m */,
|
|
52
|
+
E35223E9224BD4C400623F30 /* RCTConvert+RNCarPlay.h */,
|
|
53
|
+
E344BBEA22494CBD006FD80D /* RNCarPlay.h */,
|
|
54
|
+
E344BBF222494D53006FD80D /* RNCarPlay.m */,
|
|
55
|
+
E344BBF622494DAC006FD80D /* RNCPStore.h */,
|
|
56
|
+
E344BBF422494D9D006FD80D /* RNCPStore.m */,
|
|
57
|
+
E344BBE822494CBD006FD80D /* Products */,
|
|
58
|
+
);
|
|
59
|
+
sourceTree = "<group>";
|
|
60
|
+
};
|
|
61
|
+
E344BBE822494CBD006FD80D /* Products */ = {
|
|
62
|
+
isa = PBXGroup;
|
|
63
|
+
children = (
|
|
64
|
+
E344BCBE22495851006FD80D /* libRNCarPlay.a */,
|
|
65
|
+
);
|
|
66
|
+
name = Products;
|
|
67
|
+
sourceTree = "<group>";
|
|
68
|
+
};
|
|
69
|
+
/* End PBXGroup section */
|
|
70
|
+
|
|
71
|
+
/* Begin PBXNativeTarget section */
|
|
72
|
+
E344BCBD22495851006FD80D /* RNCarPlay */ = {
|
|
73
|
+
isa = PBXNativeTarget;
|
|
74
|
+
buildConfigurationList = E344BCC422495851006FD80D /* Build configuration list for PBXNativeTarget "RNCarPlay" */;
|
|
75
|
+
buildPhases = (
|
|
76
|
+
E344BCBA22495851006FD80D /* Sources */,
|
|
77
|
+
E344BCBB22495851006FD80D /* Frameworks */,
|
|
78
|
+
E344BCBC22495851006FD80D /* CopyFiles */,
|
|
79
|
+
);
|
|
80
|
+
buildRules = (
|
|
81
|
+
);
|
|
82
|
+
dependencies = (
|
|
83
|
+
);
|
|
84
|
+
name = RNCarPlay;
|
|
85
|
+
productName = RNCarPlay;
|
|
86
|
+
productReference = E344BCBE22495851006FD80D /* libRNCarPlay.a */;
|
|
87
|
+
productType = "com.apple.product-type.library.static";
|
|
88
|
+
};
|
|
89
|
+
/* End PBXNativeTarget section */
|
|
90
|
+
|
|
91
|
+
/* Begin PBXProject section */
|
|
92
|
+
E344BBDE22494CBD006FD80D /* Project object */ = {
|
|
93
|
+
isa = PBXProject;
|
|
94
|
+
attributes = {
|
|
95
|
+
LastUpgradeCheck = 1010;
|
|
96
|
+
ORGANIZATIONNAME = "SOLID Mobile";
|
|
97
|
+
TargetAttributes = {
|
|
98
|
+
E344BCBD22495851006FD80D = {
|
|
99
|
+
CreatedOnToolsVersion = 10.1;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
buildConfigurationList = E344BBE122494CBD006FD80D /* Build configuration list for PBXProject "RNCarPlay" */;
|
|
104
|
+
compatibilityVersion = "Xcode 9.3";
|
|
105
|
+
developmentRegion = en;
|
|
106
|
+
hasScannedForEncodings = 0;
|
|
107
|
+
knownRegions = (
|
|
108
|
+
en,
|
|
109
|
+
);
|
|
110
|
+
mainGroup = E344BBDD22494CBD006FD80D;
|
|
111
|
+
productRefGroup = E344BBE822494CBD006FD80D /* Products */;
|
|
112
|
+
projectDirPath = "";
|
|
113
|
+
projectRoot = "";
|
|
114
|
+
targets = (
|
|
115
|
+
E344BCBD22495851006FD80D /* RNCarPlay */,
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
/* End PBXProject section */
|
|
119
|
+
|
|
120
|
+
/* Begin PBXSourcesBuildPhase section */
|
|
121
|
+
E344BCBA22495851006FD80D /* Sources */ = {
|
|
122
|
+
isa = PBXSourcesBuildPhase;
|
|
123
|
+
buildActionMask = 2147483647;
|
|
124
|
+
files = (
|
|
125
|
+
E35223EB224BD4E500623F30 /* RCTConvert+RNCarPlay.m in Sources */,
|
|
126
|
+
E344BCC72249585C006FD80D /* RNCarPlay.m in Sources */,
|
|
127
|
+
E344BCC82249585C006FD80D /* RNCPStore.m in Sources */,
|
|
128
|
+
);
|
|
129
|
+
runOnlyForDeploymentPostprocessing = 0;
|
|
130
|
+
};
|
|
131
|
+
/* End PBXSourcesBuildPhase section */
|
|
132
|
+
|
|
133
|
+
/* Begin XCBuildConfiguration section */
|
|
134
|
+
E344BBED22494CBD006FD80D /* Debug */ = {
|
|
135
|
+
isa = XCBuildConfiguration;
|
|
136
|
+
buildSettings = {
|
|
137
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
138
|
+
CLANG_ANALYZER_NONNULL = YES;
|
|
139
|
+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
|
140
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
|
141
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
142
|
+
CLANG_ENABLE_MODULES = YES;
|
|
143
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
144
|
+
CLANG_ENABLE_OBJC_WEAK = YES;
|
|
145
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
146
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
147
|
+
CLANG_WARN_COMMA = YES;
|
|
148
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
149
|
+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
150
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
151
|
+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
|
152
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
153
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
154
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
155
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
156
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
157
|
+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
158
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
159
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
160
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
161
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
162
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
163
|
+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
|
164
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
165
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
166
|
+
CODE_SIGN_IDENTITY = "iPhone Developer";
|
|
167
|
+
COPY_PHASE_STRIP = NO;
|
|
168
|
+
CURRENT_PROJECT_VERSION = 1;
|
|
169
|
+
DEBUG_INFORMATION_FORMAT = dwarf;
|
|
170
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
171
|
+
ENABLE_TESTABILITY = YES;
|
|
172
|
+
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
173
|
+
GCC_DYNAMIC_NO_PIC = NO;
|
|
174
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
175
|
+
GCC_OPTIMIZATION_LEVEL = 0;
|
|
176
|
+
GCC_PREPROCESSOR_DEFINITIONS = (
|
|
177
|
+
"DEBUG=1",
|
|
178
|
+
"$(inherited)",
|
|
179
|
+
);
|
|
180
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
181
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
182
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
183
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
184
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
185
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
186
|
+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
|
187
|
+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
|
188
|
+
MTL_FAST_MATH = YES;
|
|
189
|
+
ONLY_ACTIVE_ARCH = YES;
|
|
190
|
+
SDKROOT = iphoneos;
|
|
191
|
+
VERSIONING_SYSTEM = "apple-generic";
|
|
192
|
+
VERSION_INFO_PREFIX = "";
|
|
193
|
+
};
|
|
194
|
+
name = Debug;
|
|
195
|
+
};
|
|
196
|
+
E344BBEE22494CBD006FD80D /* Release */ = {
|
|
197
|
+
isa = XCBuildConfiguration;
|
|
198
|
+
buildSettings = {
|
|
199
|
+
ALWAYS_SEARCH_USER_PATHS = NO;
|
|
200
|
+
CLANG_ANALYZER_NONNULL = YES;
|
|
201
|
+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
|
202
|
+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
|
203
|
+
CLANG_CXX_LIBRARY = "libc++";
|
|
204
|
+
CLANG_ENABLE_MODULES = YES;
|
|
205
|
+
CLANG_ENABLE_OBJC_ARC = YES;
|
|
206
|
+
CLANG_ENABLE_OBJC_WEAK = YES;
|
|
207
|
+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
|
208
|
+
CLANG_WARN_BOOL_CONVERSION = YES;
|
|
209
|
+
CLANG_WARN_COMMA = YES;
|
|
210
|
+
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
|
211
|
+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
|
212
|
+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
|
213
|
+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
|
214
|
+
CLANG_WARN_EMPTY_BODY = YES;
|
|
215
|
+
CLANG_WARN_ENUM_CONVERSION = YES;
|
|
216
|
+
CLANG_WARN_INFINITE_RECURSION = YES;
|
|
217
|
+
CLANG_WARN_INT_CONVERSION = YES;
|
|
218
|
+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
|
219
|
+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
|
220
|
+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
|
221
|
+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
|
222
|
+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
|
223
|
+
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
|
224
|
+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
|
225
|
+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
|
226
|
+
CLANG_WARN_UNREACHABLE_CODE = YES;
|
|
227
|
+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
|
228
|
+
CODE_SIGN_IDENTITY = "iPhone Developer";
|
|
229
|
+
COPY_PHASE_STRIP = NO;
|
|
230
|
+
CURRENT_PROJECT_VERSION = 1;
|
|
231
|
+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
|
232
|
+
ENABLE_NS_ASSERTIONS = NO;
|
|
233
|
+
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
|
234
|
+
GCC_C_LANGUAGE_STANDARD = gnu11;
|
|
235
|
+
GCC_NO_COMMON_BLOCKS = YES;
|
|
236
|
+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
|
237
|
+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
|
238
|
+
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
|
239
|
+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
|
240
|
+
GCC_WARN_UNUSED_FUNCTION = YES;
|
|
241
|
+
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
242
|
+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
|
243
|
+
MTL_ENABLE_DEBUG_INFO = NO;
|
|
244
|
+
MTL_FAST_MATH = YES;
|
|
245
|
+
SDKROOT = iphoneos;
|
|
246
|
+
VALIDATE_PRODUCT = YES;
|
|
247
|
+
VERSIONING_SYSTEM = "apple-generic";
|
|
248
|
+
VERSION_INFO_PREFIX = "";
|
|
249
|
+
};
|
|
250
|
+
name = Release;
|
|
251
|
+
};
|
|
252
|
+
E344BCC522495851006FD80D /* Debug */ = {
|
|
253
|
+
isa = XCBuildConfiguration;
|
|
254
|
+
buildSettings = {
|
|
255
|
+
CODE_SIGN_STYLE = Automatic;
|
|
256
|
+
DEVELOPMENT_TEAM = 5PD7JU2FJC;
|
|
257
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
258
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
259
|
+
SKIP_INSTALL = YES;
|
|
260
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
261
|
+
};
|
|
262
|
+
name = Debug;
|
|
263
|
+
};
|
|
264
|
+
E344BCC622495851006FD80D /* Release */ = {
|
|
265
|
+
isa = XCBuildConfiguration;
|
|
266
|
+
buildSettings = {
|
|
267
|
+
CODE_SIGN_STYLE = Automatic;
|
|
268
|
+
DEVELOPMENT_TEAM = 5PD7JU2FJC;
|
|
269
|
+
OTHER_LDFLAGS = "-ObjC";
|
|
270
|
+
PRODUCT_NAME = "$(TARGET_NAME)";
|
|
271
|
+
SKIP_INSTALL = YES;
|
|
272
|
+
TARGETED_DEVICE_FAMILY = "1,2";
|
|
273
|
+
};
|
|
274
|
+
name = Release;
|
|
275
|
+
};
|
|
276
|
+
/* End XCBuildConfiguration section */
|
|
277
|
+
|
|
278
|
+
/* Begin XCConfigurationList section */
|
|
279
|
+
E344BBE122494CBD006FD80D /* Build configuration list for PBXProject "RNCarPlay" */ = {
|
|
280
|
+
isa = XCConfigurationList;
|
|
281
|
+
buildConfigurations = (
|
|
282
|
+
E344BBED22494CBD006FD80D /* Debug */,
|
|
283
|
+
E344BBEE22494CBD006FD80D /* Release */,
|
|
284
|
+
);
|
|
285
|
+
defaultConfigurationIsVisible = 0;
|
|
286
|
+
defaultConfigurationName = Release;
|
|
287
|
+
};
|
|
288
|
+
E344BCC422495851006FD80D /* Build configuration list for PBXNativeTarget "RNCarPlay" */ = {
|
|
289
|
+
isa = XCConfigurationList;
|
|
290
|
+
buildConfigurations = (
|
|
291
|
+
E344BCC522495851006FD80D /* Debug */,
|
|
292
|
+
E344BCC622495851006FD80D /* Release */,
|
|
293
|
+
);
|
|
294
|
+
defaultConfigurationIsVisible = 0;
|
|
295
|
+
defaultConfigurationName = Release;
|
|
296
|
+
};
|
|
297
|
+
/* End XCConfigurationList section */
|
|
298
|
+
};
|
|
299
|
+
rootObject = E344BBDE22494CBD006FD80D /* Project object */;
|
|
300
|
+
}
|
package/lib/CarPlay.js
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CarPlay = exports.CarPlayInterface = void 0;
|
|
4
|
+
const react_native_1 = require("react-native");
|
|
5
|
+
const { RNCarPlay } = react_native_1.NativeModules;
|
|
6
|
+
/**
|
|
7
|
+
* A controller that manages all user interface elements appearing on your map displayed on the CarPlay screen.
|
|
8
|
+
*/
|
|
9
|
+
class CarPlayInterface {
|
|
10
|
+
/**
|
|
11
|
+
* React Native bridge to the CarPlay interface
|
|
12
|
+
*/
|
|
13
|
+
bridge = RNCarPlay;
|
|
14
|
+
/**
|
|
15
|
+
* Boolean to denote if carplay is currently connected.
|
|
16
|
+
*/
|
|
17
|
+
connected = false;
|
|
18
|
+
window;
|
|
19
|
+
/**
|
|
20
|
+
* CarPlay Event Emitter
|
|
21
|
+
*/
|
|
22
|
+
emitter = new react_native_1.NativeEventEmitter(RNCarPlay);
|
|
23
|
+
onConnectCallbacks = new Set();
|
|
24
|
+
onDisconnectCallbacks = new Set();
|
|
25
|
+
constructor() {
|
|
26
|
+
this.emitter.addListener('didConnect', (window) => {
|
|
27
|
+
console.log('we are connected yes!');
|
|
28
|
+
this.connected = true;
|
|
29
|
+
this.window = window;
|
|
30
|
+
this.onConnectCallbacks.forEach(callback => {
|
|
31
|
+
callback(window);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
this.emitter.addListener('didDisconnect', () => {
|
|
35
|
+
this.connected = false;
|
|
36
|
+
this.window = undefined;
|
|
37
|
+
this.onDisconnectCallbacks.forEach(callback => {
|
|
38
|
+
callback();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
42
|
+
this.emitter.addListener('didPressMenuItem', e => {
|
|
43
|
+
if (e?.title === 'Reload Android Auto') {
|
|
44
|
+
this.bridge.reload();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
// check if already connected this will fire any 'didConnect' events
|
|
49
|
+
// if a connected is already present.
|
|
50
|
+
this.bridge.checkForConnection();
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Fired when CarPlay is connected to the device.
|
|
54
|
+
*/
|
|
55
|
+
registerOnConnect = (callback) => {
|
|
56
|
+
this.onConnectCallbacks.add(callback);
|
|
57
|
+
};
|
|
58
|
+
unregisterOnConnect = (callback) => {
|
|
59
|
+
this.onConnectCallbacks.delete(callback);
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Fired when CarPlay is disconnected from the device.
|
|
63
|
+
*/
|
|
64
|
+
registerOnDisconnect = (callback) => {
|
|
65
|
+
this.onDisconnectCallbacks.add(callback);
|
|
66
|
+
};
|
|
67
|
+
unregisterOnDisconnect = (callback) => {
|
|
68
|
+
this.onDisconnectCallbacks.delete(callback);
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Sets the root template, starting a new stack for the template navigation hierarchy.
|
|
72
|
+
* @param rootTemplate The root template. Replaces the current rootTemplate, if one exists.
|
|
73
|
+
* @param animated Set TRUE to animate the presentation of the root template; ignored if there isn't a current rootTemplate.
|
|
74
|
+
*/
|
|
75
|
+
setRootTemplate(rootTemplate, animated = true) {
|
|
76
|
+
return this.bridge.setRootTemplate(rootTemplate.id, animated);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Pushes a template onto the navigation stack and updates the display.
|
|
80
|
+
* @param templateToPush The template to push onto the navigation stack.
|
|
81
|
+
* @param animated Set TRUE to animate the presentation of the template.
|
|
82
|
+
*/
|
|
83
|
+
pushTemplate(templateToPush, animated = true) {
|
|
84
|
+
return this.bridge.pushTemplate(templateToPush.id, animated);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Pops templates until the specified template is at the top of the navigation stack.
|
|
88
|
+
* @param targetTemplate The template that you want at the top of the stack. The template must be on the navigation stack before calling this method.
|
|
89
|
+
* @param animated A Boolean value that indicates whether the system animates the display of transitioning templates.
|
|
90
|
+
*/
|
|
91
|
+
popToTemplate(targetTemplate, animated = true) {
|
|
92
|
+
return this.bridge.popToTemplate(targetTemplate.id, animated);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Pops all templates on the stack—except the root template—and updates the display.
|
|
96
|
+
* @param animated A Boolean value that indicates whether the system animates the display of transitioning templates.
|
|
97
|
+
*/
|
|
98
|
+
popToRootTemplate(animated = true) {
|
|
99
|
+
return this.bridge.popToRootTemplate(animated);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Pops the top template from the navigation stack and updates the display.
|
|
103
|
+
* @param animated A Boolean value that indicates whether the system animates the display of transitioning templates.
|
|
104
|
+
*/
|
|
105
|
+
popTemplate(animated = true) {
|
|
106
|
+
return this.bridge.popTemplate(animated);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* presents a presentable template, alert / action / voice
|
|
110
|
+
* @param templateToPresent The presentable template to present
|
|
111
|
+
* @param animated A Boolean value that indicates whether the system animates the display of transitioning templates.
|
|
112
|
+
*/
|
|
113
|
+
presentTemplate(templateToPresent, animated = true) {
|
|
114
|
+
return this.bridge.presentTemplate(templateToPresent.id, animated);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Dismisses the current presented template
|
|
118
|
+
* * @param animated A Boolean value that indicates whether the system animates the display of transitioning templates.
|
|
119
|
+
*/
|
|
120
|
+
dismissTemplate(animated = true) {
|
|
121
|
+
return this.bridge.dismissTemplate(animated);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* The current root template in the template navigation hierarchy.
|
|
125
|
+
* @todo Not implemented yet
|
|
126
|
+
*/
|
|
127
|
+
get rootTemplate() {
|
|
128
|
+
return Promise.resolve('');
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* The top-most template in the navigation hierarchy stack.
|
|
132
|
+
* @todo Not implemented yet
|
|
133
|
+
*/
|
|
134
|
+
get topTemplate() {
|
|
135
|
+
return Promise.resolve('');
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Control now playing template state
|
|
139
|
+
* @param enable A Boolean value that indicates whether the system use now playing template.
|
|
140
|
+
*/
|
|
141
|
+
enableNowPlaying(enable = true) {
|
|
142
|
+
return this.bridge.enableNowPlaying(enable);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
exports.CarPlayInterface = CarPlayInterface;
|
|
146
|
+
exports.CarPlay = new CarPlayInterface();
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// Templates
|
|
18
|
+
__exportStar(require("./templates/Template"), exports);
|
|
19
|
+
__exportStar(require("./templates/ActionSheetTemplate"), exports);
|
|
20
|
+
__exportStar(require("./templates/AlertTemplate"), exports);
|
|
21
|
+
__exportStar(require("./templates/ContactTemplate"), exports);
|
|
22
|
+
__exportStar(require("./templates/GridTemplate"), exports);
|
|
23
|
+
__exportStar(require("./templates/InformationTemplate"), exports);
|
|
24
|
+
__exportStar(require("./templates/ListTemplate"), exports);
|
|
25
|
+
__exportStar(require("./templates/MapTemplate"), exports);
|
|
26
|
+
__exportStar(require("./templates/NowPlayingTemplate"), exports);
|
|
27
|
+
__exportStar(require("./templates/PointOfInterestTemplate"), exports);
|
|
28
|
+
__exportStar(require("./templates/SearchTemplate"), exports);
|
|
29
|
+
__exportStar(require("./templates/TabBarTemplate"), exports);
|
|
30
|
+
__exportStar(require("./templates/VoiceControlTemplate"), exports);
|
|
31
|
+
// Android-only Templates
|
|
32
|
+
__exportStar(require("./templates/android/MessageTemplate"), exports);
|
|
33
|
+
__exportStar(require("./templates/android/NavigationTemplate"), exports);
|
|
34
|
+
__exportStar(require("./templates/android/PaneTemplate"), exports);
|
|
35
|
+
__exportStar(require("./templates/android/PlaceListMapTemplate"), exports);
|
|
36
|
+
__exportStar(require("./templates/android/PlaceListNavigationTemplate"), exports);
|
|
37
|
+
__exportStar(require("./templates/android/RoutePreviewNavigationTemplate"), exports);
|
|
38
|
+
// Others
|
|
39
|
+
__exportStar(require("./CarPlay"), exports);
|
|
40
|
+
__exportStar(require("./navigation/Trip"), exports);
|
|
41
|
+
__exportStar(require("./navigation/NavigationSession"), exports);
|
|
42
|
+
// Types
|
|
43
|
+
__exportStar(require("./interfaces/Action"), exports);
|
|
44
|
+
__exportStar(require("./interfaces/AlertAction"), exports);
|
|
45
|
+
__exportStar(require("./interfaces/BarButton"), exports);
|
|
46
|
+
__exportStar(require("./interfaces/CarColor"), exports);
|
|
47
|
+
__exportStar(require("./interfaces/GridButton"), exports);
|
|
48
|
+
__exportStar(require("./interfaces/Header"), exports);
|
|
49
|
+
__exportStar(require("./interfaces/ListItem"), exports);
|
|
50
|
+
__exportStar(require("./interfaces/ListItemUpdate"), exports);
|
|
51
|
+
__exportStar(require("./interfaces/ListSection"), exports);
|
|
52
|
+
__exportStar(require("./interfaces/Maneuver"), exports);
|
|
53
|
+
__exportStar(require("./interfaces/MapButton"), exports);
|
|
54
|
+
__exportStar(require("./interfaces/NavigationAlert"), exports);
|
|
55
|
+
__exportStar(require("./interfaces/NavigationInfo"), exports);
|
|
56
|
+
__exportStar(require("./interfaces/NavigationStep"), exports);
|
|
57
|
+
__exportStar(require("./interfaces/Pane"), exports);
|
|
58
|
+
__exportStar(require("./interfaces/PauseReason"), exports);
|
|
59
|
+
__exportStar(require("./interfaces/Place"), exports);
|
|
60
|
+
__exportStar(require("./interfaces/TextConfiguration"), exports);
|
|
61
|
+
__exportStar(require("./interfaces/TimeRemainingColor"), exports);
|
|
62
|
+
__exportStar(require("./interfaces/TravelEstimates"), exports);
|
|
63
|
+
__exportStar(require("./interfaces/VoiceControlState"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationAlertActionStyle = void 0;
|
|
4
|
+
var NavigationAlertActionStyle;
|
|
5
|
+
(function (NavigationAlertActionStyle) {
|
|
6
|
+
NavigationAlertActionStyle[NavigationAlertActionStyle["Default"] = 0] = "Default";
|
|
7
|
+
NavigationAlertActionStyle[NavigationAlertActionStyle["Cancel"] = 1] = "Cancel";
|
|
8
|
+
NavigationAlertActionStyle[NavigationAlertActionStyle["Destructive"] = 2] = "Destructive";
|
|
9
|
+
})(NavigationAlertActionStyle = exports.NavigationAlertActionStyle || (exports.NavigationAlertActionStyle = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PauseReason = void 0;
|
|
4
|
+
var PauseReason;
|
|
5
|
+
(function (PauseReason) {
|
|
6
|
+
PauseReason[PauseReason["Arrived"] = 1] = "Arrived";
|
|
7
|
+
PauseReason[PauseReason["Loading"] = 2] = "Loading";
|
|
8
|
+
PauseReason[PauseReason["Locating"] = 3] = "Locating";
|
|
9
|
+
PauseReason[PauseReason["Rerouting"] = 4] = "Rerouting";
|
|
10
|
+
PauseReason[PauseReason["ProceedToRoute"] = 5] = "ProceedToRoute";
|
|
11
|
+
})(PauseReason = exports.PauseReason || (exports.PauseReason = {}));
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NavigationSession = void 0;
|
|
4
|
+
const CarPlay_1 = require("../CarPlay");
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
class NavigationSession {
|
|
7
|
+
id;
|
|
8
|
+
trip;
|
|
9
|
+
mapTemplate;
|
|
10
|
+
maneuvers = [];
|
|
11
|
+
constructor(id, trip, mapTemplate) {
|
|
12
|
+
this.id = id;
|
|
13
|
+
this.trip = trip;
|
|
14
|
+
this.mapTemplate = mapTemplate;
|
|
15
|
+
}
|
|
16
|
+
updateManeuvers(maneuvers) {
|
|
17
|
+
this.maneuvers = maneuvers;
|
|
18
|
+
const windowScale = CarPlay_1.CarPlay.window?.scale ?? 1;
|
|
19
|
+
CarPlay_1.CarPlay.bridge.updateManeuversNavigationSession(this.id, maneuvers.map(maneuver => {
|
|
20
|
+
if (maneuver.symbolImage) {
|
|
21
|
+
const image = react_native_1.Image.resolveAssetSource(maneuver.symbolImage);
|
|
22
|
+
maneuver.symbolImage = image;
|
|
23
|
+
maneuver.symbolImageSize = maneuver.symbolImageSize ?? { width: 50, height: 50 };
|
|
24
|
+
const width = Math.floor((maneuver.symbolImageSize.width * windowScale) / image.scale);
|
|
25
|
+
const height = Math.floor((maneuver.symbolImageSize.height * windowScale) / image.scale);
|
|
26
|
+
maneuver.symbolImageSize = { width, height };
|
|
27
|
+
}
|
|
28
|
+
if (maneuver.junctionImage) {
|
|
29
|
+
maneuver.junctionImage = react_native_1.Image.resolveAssetSource(maneuver.junctionImage);
|
|
30
|
+
}
|
|
31
|
+
if (maneuver.tintSymbolImage && typeof maneuver.tintSymbolImage === 'string') {
|
|
32
|
+
maneuver.tintSymbolImage = (0, react_native_1.processColor)(maneuver.tintSymbolImage);
|
|
33
|
+
}
|
|
34
|
+
return maneuver;
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
updateTravelEstimates(maneuverIndex, travelEstimates) {
|
|
38
|
+
if (!travelEstimates.distanceUnits) {
|
|
39
|
+
travelEstimates.distanceUnits = 'kilometers';
|
|
40
|
+
}
|
|
41
|
+
CarPlay_1.CarPlay.bridge.updateTravelEstimatesNavigationSession(this.id, maneuverIndex, travelEstimates);
|
|
42
|
+
}
|
|
43
|
+
cancel() {
|
|
44
|
+
CarPlay_1.CarPlay.bridge.cancelNavigationSession(this.id);
|
|
45
|
+
}
|
|
46
|
+
finish() {
|
|
47
|
+
CarPlay_1.CarPlay.bridge.finishNavigationSession(this.id);
|
|
48
|
+
}
|
|
49
|
+
pause(reason, description) {
|
|
50
|
+
CarPlay_1.CarPlay.bridge.pauseNavigationSession(this.id, reason, description);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.NavigationSession = NavigationSession;
|