Skip to content

Commit b818af8

Browse files
authored
Merge pull request #286 from immutable/feature/sdk-3266-name-clash
[SDK-3266] fix Gree webview clash
2 parents 4173eb5 + c4f5018 commit b818af8

File tree

19 files changed

+109
-107
lines changed

19 files changed

+109
-107
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ jobs:
2525
projectPath: './sample'
2626
githubToken: ${{ secrets.GITHUB_TOKEN }}
2727
testMode: 'EditMode'
28-
- uses: actions/upload-artifact@v2
28+
- uses: actions/upload-artifact@v4
2929
if: always()
3030
with:
3131
name: Test results
3232
path: ${{ steps.passportTest.outputs.artifactsPath }}
3333

34-
- uses: actions/upload-artifact@v2
34+
- uses: actions/upload-artifact@v4
3535
if: always()
3636
with:
3737
name: Coverage results

Plugins/Mac/WebView.xcodeproj/project.pbxproj renamed to Plugins/Mac/ImmutableWebView.xcodeproj/project.pbxproj

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
81B8C535151078DB000C56DC /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81B8C534151078DB000C56DC /* WebKit.framework */; };
1313
81B8C53815108B89000C56DC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81B8C53715108B89000C56DC /* Carbon.framework */; };
1414
81E2C20C14C5684A004CE5C2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81E2C20B14C5684A004CE5C2 /* Cocoa.framework */; };
15-
81F4B4D914C6888B001B4465 /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 81F4B4D814C6888B001B4465 /* WebView.mm */; };
15+
81F4B4D914C6888B001B4465 /* ImmutableWebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 81F4B4D814C6888B001B4465 /* ImmutableWebView.mm */; };
1616
/* End PBXBuildFile section */
1717

1818
/* Begin PBXFileReference section */
@@ -23,11 +23,11 @@
2323
8102525614C569D80022296D /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = Resources/Prefix.pch; sourceTree = SOURCE_ROOT; };
2424
81B8C534151078DB000C56DC /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
2525
81B8C53715108B89000C56DC /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
26-
81E2C20814C5684A004CE5C2 /* WebView.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WebView.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
26+
81E2C20814C5684A004CE5C2 /* ImmutableWebView.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ImmutableWebView.bundle; sourceTree = BUILT_PRODUCTS_DIR; };
2727
81E2C20B14C5684A004CE5C2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
2828
81E2C20E14C5684A004CE5C2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
2929
81E2C21014C5684A004CE5C2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
30-
81F4B4D814C6888B001B4465 /* WebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebView.mm; path = Sources/WebView.mm; sourceTree = "<group>"; };
30+
81F4B4D814C6888B001B4465 /* ImmutableWebView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ImmutableWebView.mm; path = Sources/ImmutableWebView.mm; sourceTree = "<group>"; };
3131
81F81AEC14D76D2400845D4C /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
3232
/* End PBXFileReference section */
3333

@@ -49,7 +49,7 @@
4949
8102525914C573EB0022296D /* Sources */ = {
5050
isa = PBXGroup;
5151
children = (
52-
81F4B4D814C6888B001B4465 /* WebView.mm */,
52+
81F4B4D814C6888B001B4465 /* ImmutableWebView.mm */,
5353
);
5454
name = Sources;
5555
sourceTree = "<group>";
@@ -67,7 +67,7 @@
6767
81E2C20914C5684A004CE5C2 /* Products */ = {
6868
isa = PBXGroup;
6969
children = (
70-
81E2C20814C5684A004CE5C2 /* WebView.bundle */,
70+
81E2C20814C5684A004CE5C2 /* ImmutableWebView.bundle */,
7171
);
7272
name = Products;
7373
sourceTree = "<group>";
@@ -101,9 +101,9 @@
101101
/* End PBXGroup section */
102102

103103
/* Begin PBXNativeTarget section */
104-
81E2C20714C5684A004CE5C2 /* WebView */ = {
104+
81E2C20714C5684A004CE5C2 /* ImmutableWebView */ = {
105105
isa = PBXNativeTarget;
106-
buildConfigurationList = 81E2C21A14C5684A004CE5C2 /* Build configuration list for PBXNativeTarget "WebView" */;
106+
buildConfigurationList = 81E2C21A14C5684A004CE5C2 /* Build configuration list for PBXNativeTarget "ImmutableWebView" */;
107107
buildPhases = (
108108
81E2C20414C5684A004CE5C2 /* Sources */,
109109
81E2C20514C5684A004CE5C2 /* Frameworks */,
@@ -113,9 +113,9 @@
113113
);
114114
dependencies = (
115115
);
116-
name = WebView;
116+
name = ImmutableWebView;
117117
productName = WebView;
118-
productReference = 81E2C20814C5684A004CE5C2 /* WebView.bundle */;
118+
productReference = 81E2C20814C5684A004CE5C2 /* ImmutableWebView.bundle */;
119119
productType = "com.apple.product-type.bundle";
120120
};
121121
/* End PBXNativeTarget section */
@@ -127,7 +127,7 @@
127127
BuildIndependentTargetsInParallel = YES;
128128
LastUpgradeCheck = 1200;
129129
};
130-
buildConfigurationList = 81E2C20214C5684A004CE5C2 /* Build configuration list for PBXProject "WebView" */;
130+
buildConfigurationList = 81E2C20214C5684A004CE5C2 /* Build configuration list for PBXProject "ImmutableWebView" */;
131131
compatibilityVersion = "Xcode 8.0";
132132
developmentRegion = en;
133133
hasScannedForEncodings = 0;
@@ -140,7 +140,7 @@
140140
projectDirPath = "";
141141
projectRoot = "";
142142
targets = (
143-
81E2C20714C5684A004CE5C2 /* WebView */,
143+
81E2C20714C5684A004CE5C2 /* ImmutableWebView */,
144144
);
145145
};
146146
/* End PBXProject section */
@@ -161,7 +161,7 @@
161161
isa = PBXSourcesBuildPhase;
162162
buildActionMask = 2147483647;
163163
files = (
164-
81F4B4D914C6888B001B4465 /* WebView.mm in Sources */,
164+
81F4B4D914C6888B001B4465 /* ImmutableWebView.mm in Sources */,
165165
);
166166
runOnlyForDeploymentPostprocessing = 0;
167167
};
@@ -280,7 +280,8 @@
280280
LD_RUNPATH_SEARCH_PATHS = "";
281281
LIBRARY_SEARCH_PATHS = "$(inherited)";
282282
MACOSX_DEPLOYMENT_TARGET = 12.4;
283-
PRODUCT_BUNDLE_IDENTIFIER = "net.gree.unitywebview.${PRODUCT_NAME:rfc1034identifier}";
283+
PRODUCT_BUNDLE_IDENTIFIER = "Immutable.Browser.--PRODUCT-NAME-rfc1034identifier-";
284+
"PRODUCT_BUNDLE_IDENTIFIER[sdk=macosx*]" = Immutable.Browser.WebView;
284285
PRODUCT_NAME = "$(TARGET_NAME)";
285286
USE_HEADERMAP = YES;
286287
WRAPPER_EXTENSION = bundle;
@@ -301,7 +302,8 @@
301302
LD_RUNPATH_SEARCH_PATHS = "";
302303
LIBRARY_SEARCH_PATHS = "$(inherited)";
303304
MACOSX_DEPLOYMENT_TARGET = 12.4;
304-
PRODUCT_BUNDLE_IDENTIFIER = "net.gree.unitywebview.${PRODUCT_NAME:rfc1034identifier}";
305+
PRODUCT_BUNDLE_IDENTIFIER = "Immutable.Browser.--PRODUCT-NAME-rfc1034identifier-";
306+
"PRODUCT_BUNDLE_IDENTIFIER[sdk=macosx*]" = Immutable.Browser.WebView;
305307
PRODUCT_NAME = "$(TARGET_NAME)";
306308
USE_HEADERMAP = YES;
307309
WRAPPER_EXTENSION = bundle;
@@ -311,7 +313,7 @@
311313
/* End XCBuildConfiguration section */
312314

313315
/* Begin XCConfigurationList section */
314-
81E2C20214C5684A004CE5C2 /* Build configuration list for PBXProject "WebView" */ = {
316+
81E2C20214C5684A004CE5C2 /* Build configuration list for PBXProject "ImmutableWebView" */ = {
315317
isa = XCConfigurationList;
316318
buildConfigurations = (
317319
81E2C21814C5684A004CE5C2 /* Debug */,
@@ -320,7 +322,7 @@
320322
defaultConfigurationIsVisible = 0;
321323
defaultConfigurationName = Release;
322324
};
323-
81E2C21A14C5684A004CE5C2 /* Build configuration list for PBXNativeTarget "WebView" */ = {
325+
81E2C21A14C5684A004CE5C2 /* Build configuration list for PBXNativeTarget "ImmutableWebView" */ = {
324326
isa = XCConfigurationList;
325327
buildConfigurations = (
326328
81E2C21B14C5684A004CE5C2 /* Debug */,

Plugins/Mac/Sources/WebView.mm renamed to Plugins/Mac/Sources/ImmutableWebView.mm

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -374,26 +374,26 @@ - (nonnull ASPresentationAnchor)presentationAnchorForWebAuthenticationSession:(n
374374
@end
375375

376376
extern "C" {
377-
void *_CWebViewPlugin_Init(const char *ua);
378-
void _CWebViewPlugin_Destroy(void *instance);
379-
void _CWebViewPlugin_LoadURL(void *instance, const char *url);
380-
void _CWebViewPlugin_EvaluateJS(void *instance, const char *url);
381-
void _CWebViewPlugin_SetDelegate(DelegateCallbackFunction callback);
382-
void _CWebViewPlugin_LaunchAuthURL(void *instance, const char *url, const char *redirectUri);
377+
void *_CImmutableWebViewPlugin_Init(const char *ua);
378+
void _CImmutableWebViewPlugin_Destroy(void *instance);
379+
void _CImmutableWebViewPlugin_LoadURL(void *instance, const char *url);
380+
void _CImmutableWebViewPlugin_EvaluateJS(void *instance, const char *url);
381+
void _CImmutableWebViewPlugin_SetDelegate(DelegateCallbackFunction callback);
382+
void _CImmutableWebViewPlugin_LaunchAuthURL(void *instance, const char *url, const char *redirectUri);
383383
}
384384

385-
void _CWebViewPlugin_SetDelegate(DelegateCallbackFunction callback) {
385+
void _CImmutableWebViewPlugin_SetDelegate(DelegateCallbackFunction callback) {
386386
delegateCallback = callback;
387387
}
388388

389-
void *_CWebViewPlugin_Init(const char *ua)
389+
void *_CImmutableWebViewPlugin_Init(const char *ua)
390390
{
391391
CWebViewPlugin *webViewPlugin = [[CWebViewPlugin alloc] initWithUa:ua];
392392
[_instances addObject:webViewPlugin];
393393
return (__bridge_retained void *)webViewPlugin;
394394
}
395395

396-
void _CWebViewPlugin_Destroy(void *instance)
396+
void _CImmutableWebViewPlugin_Destroy(void *instance)
397397
{
398398
if (instance == NULL)
399399
return;
@@ -403,23 +403,23 @@ void _CWebViewPlugin_Destroy(void *instance)
403403
webViewPlugin = nil;
404404
}
405405

406-
void _CWebViewPlugin_LoadURL(void *instance, const char *url)
406+
void _CImmutableWebViewPlugin_LoadURL(void *instance, const char *url)
407407
{
408408
if (instance == NULL)
409409
return;
410410
CWebViewPlugin *webViewPlugin = (__bridge CWebViewPlugin *)instance;
411411
[webViewPlugin loadURL:url];
412412
}
413413

414-
void _CWebViewPlugin_EvaluateJS(void *instance, const char *js)
414+
void _CImmutableWebViewPlugin_EvaluateJS(void *instance, const char *js)
415415
{
416416
if (instance == NULL)
417417
return;
418418
CWebViewPlugin *webViewPlugin = (__bridge CWebViewPlugin *)instance;
419419
[webViewPlugin evaluateJS:js];
420420
}
421421

422-
void _CWebViewPlugin_LaunchAuthURL(void *instance, const char *url, const char *redirectUri)
422+
void _CImmutableWebViewPlugin_LaunchAuthURL(void *instance, const char *url, const char *redirectUri)
423423
{
424424
if (instance == NULL)
425425
return;

Plugins/Mac/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/bin/bash
22
DSTDIR="../../src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/"
33
rm -rf DerivedData
4-
xcodebuild -target WebView -configuration Release -arch x86_64 -arch arm64 build CONFIGURATION_BUILD_DIR='DerivedData' | xcbeautify
4+
xcodebuild -target ImmutableWebView -configuration Release -arch x86_64 -arch arm64 build CONFIGURATION_BUILD_DIR='DerivedData' | xcbeautify
55
mkdir -p $DSTDIR
66

7-
cp -r DerivedData/WebView.bundle $DSTDIR
7+
cp -r DerivedData/ImmutableWebView.bundle $DSTDIR
88
rm -rf DerivedData
99
cp *.bundle.meta $DSTDIR

src/Packages/Passport/Runtime/Scripts/Private/Immutable.Passport.Runtime.Private.asmdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"VoltstroStudios.UnityWebBrowser",
66
"UniTask",
77
"Immutable.Browser.Core",
8-
"unity-webview",
8+
"Immutable.Browser.Gree",
99
"Immutable.Passport.Core.Logging"
1010
],
1111
"includePlatforms": [

src/Packages/Passport/Runtime/Scripts/Public/Immutable.Passport.Runtime.asmdef

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"VoltstroStudios.UnityWebBrowser",
66
"UniTask",
77
"Immutable.Browser.Core",
8-
"unity-webview",
8+
"Immutable.Browser.Gree",
99
"Immutable.Passport.Runtime.Private",
1010
"Immutable.Passport.Core.Logging"
1111
],

src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/WebView.bundle/Contents/Info.plist renamed to src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/ImmutableWebView.bundle/Contents/Info.plist

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
<plist version="1.0">
44
<dict>
55
<key>BuildMachineOSBuild</key>
6-
<string>23B81</string>
6+
<string>23G93</string>
77
<key>CFBundleDevelopmentRegion</key>
88
<string>English</string>
99
<key>CFBundleExecutable</key>
10-
<string>WebView</string>
10+
<string>ImmutableWebView</string>
1111
<key>CFBundleIdentifier</key>
12-
<string>net.gree.unitywebview.WebView</string>
12+
<string>Immutable.Browser.WebView</string>
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleName</key>
16-
<string>WebView</string>
16+
<string>ImmutableWebView</string>
1717
<key>CFBundlePackageType</key>
1818
<string>BNDL</string>
1919
<key>CFBundleShortVersionString</key>
@@ -29,19 +29,19 @@
2929
<key>DTCompiler</key>
3030
<string>com.apple.compilers.llvm.clang.1_0</string>
3131
<key>DTPlatformBuild</key>
32-
<string></string>
32+
<string>24A336</string>
3333
<key>DTPlatformName</key>
3434
<string>macosx</string>
3535
<key>DTPlatformVersion</key>
36-
<string>14.0</string>
36+
<string>15.0</string>
3737
<key>DTSDKBuild</key>
38-
<string>23A334</string>
38+
<string>24A336</string>
3939
<key>DTSDKName</key>
40-
<string>macosx14.0</string>
40+
<string>macosx15.0</string>
4141
<key>DTXcode</key>
42-
<string>1501</string>
42+
<string>1600</string>
4343
<key>DTXcodeBuild</key>
44-
<string>15A507</string>
44+
<string>16A242d</string>
4545
<key>LSMinimumSystemVersion</key>
4646
<string>12.4</string>
4747
</dict>

0 commit comments

Comments
 (0)