Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 642290b

Browse files
author
Chris Yang
authored
[share] Fix bug on iPad where origin is null and enable XCUITests in the repo (#3210)
* enable xctest in .cirrus.yml (#3189) * [share] Fix bug on iPad where `origin` is null and enable XCUITests (#3188)
1 parent 81bbcd4 commit 642290b

File tree

10 files changed

+229
-107
lines changed

10 files changed

+229
-107
lines changed

.cirrus.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ task:
163163
- name: build-ipas+drive-examples
164164
env:
165165
PATH: $PATH:/usr/local/bin
166+
PLUGINS_TO_SKIP_XCTESTS: "battery/battery,camera,connectivity/connectivity,device_info/device_info,espresso,google_maps_flutter/google_maps_flutter,google_sign_in/google_sign_in,image_picker/image_picker,in_app_purchase,integration_test,ios_platform_images,local_auth,package_info,path_provider/path_provider,quick_actions,sensors,shared_preferences/shared_preferences,url_launcher/url_launcher,video_player/video_player,webview_flutter,wifi_info_flutter/wifi_info_flutter"
166167
matrix:
167168
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
168169
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
@@ -179,6 +180,7 @@ task:
179180
- flutter channel $CHANNEL
180181
- ./script/incremental_build.sh build-examples --ipa
181182
- ./script/incremental_build.sh drive-examples
183+
- ./script/incremental_build.sh xctest --target RunnerUITests --skip $PLUGINS_TO_SKIP_XCTESTS
182184
task:
183185
# don't run on release tags since it creates O(n^2) tasks where n is the number of plugins
184186
only_if: $CIRRUS_TAG == ''

packages/share/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.6.5+4
2+
3+
* Fix iPad share window not showing when `origin` is null.
4+
15
## 0.6.5+3
26

37
* Replace deprecated `Environment.getExternalStorageDirectory()` call on Android.

packages/share/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 137 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,31 @@
1010
28918A213BCB94C5470742D8 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 85392794417D70A970945C83 /* libPods-Runner.a */; };
1111
2D9222511EC45DE6007564B0 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D9222501EC45DE6007564B0 /* GeneratedPluginRegistrant.m */; };
1212
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13-
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14-
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15-
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16-
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
13+
683426AE2538D314009B194C /* FLTShareExampleUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 683426AD2538D314009B194C /* FLTShareExampleUITests.m */; };
1714
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
1815
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
1916
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
2017
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
2118
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
2219
/* End PBXBuildFile section */
2320

21+
/* Begin PBXContainerItemProxy section */
22+
683426B02538D314009B194C /* PBXContainerItemProxy */ = {
23+
isa = PBXContainerItemProxy;
24+
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
25+
proxyType = 1;
26+
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
27+
remoteInfo = Runner;
28+
};
29+
/* End PBXContainerItemProxy section */
30+
2431
/* Begin PBXCopyFilesBuildPhase section */
2532
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
2633
isa = PBXCopyFilesBuildPhase;
2734
buildActionMask = 2147483647;
2835
dstPath = "";
2936
dstSubfolderSpec = 10;
3037
files = (
31-
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
32-
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
3338
);
3439
name = "Embed Frameworks";
3540
runOnlyForDeploymentPostprocessing = 0;
@@ -42,14 +47,15 @@
4247
2D92224F1EC45DE6007564B0 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4348
2D9222501EC45DE6007564B0 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4449
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
45-
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
50+
683426AB2538D314009B194C /* RunnerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
51+
683426AD2538D314009B194C /* FLTShareExampleUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FLTShareExampleUITests.m; sourceTree = "<group>"; };
52+
683426AF2538D314009B194C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4653
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4754
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4855
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
4956
85392794417D70A970945C83 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
5057
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
5158
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
52-
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
5359
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
5460
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
5561
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
@@ -59,12 +65,17 @@
5965
/* End PBXFileReference section */
6066

6167
/* Begin PBXFrameworksBuildPhase section */
68+
683426A82538D314009B194C /* Frameworks */ = {
69+
isa = PBXFrameworksBuildPhase;
70+
buildActionMask = 2147483647;
71+
files = (
72+
);
73+
runOnlyForDeploymentPostprocessing = 0;
74+
};
6275
97C146EB1CF9000F007C117D /* Frameworks */ = {
6376
isa = PBXFrameworksBuildPhase;
6477
buildActionMask = 2147483647;
6578
files = (
66-
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
67-
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
6879
28918A213BCB94C5470742D8 /* libPods-Runner.a in Frameworks */,
6980
);
7081
runOnlyForDeploymentPostprocessing = 0;
@@ -81,6 +92,15 @@
8192
name = Pods;
8293
sourceTree = "<group>";
8394
};
95+
683426AC2538D314009B194C /* RunnerUITests */ = {
96+
isa = PBXGroup;
97+
children = (
98+
683426AD2538D314009B194C /* FLTShareExampleUITests.m */,
99+
683426AF2538D314009B194C /* Info.plist */,
100+
);
101+
path = RunnerUITests;
102+
sourceTree = "<group>";
103+
};
84104
8CA31EF57239BF20619316D9 /* Frameworks */ = {
85105
isa = PBXGroup;
86106
children = (
@@ -92,9 +112,7 @@
92112
9740EEB11CF90186004384FC /* Flutter */ = {
93113
isa = PBXGroup;
94114
children = (
95-
3B80C3931E831B6300D905FE /* App.framework */,
96115
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
97-
9740EEBA1CF902C7004384FC /* Flutter.framework */,
98116
9740EEB21CF90195004384FC /* Debug.xcconfig */,
99117
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
100118
9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -107,6 +125,7 @@
107125
children = (
108126
9740EEB11CF90186004384FC /* Flutter */,
109127
97C146F01CF9000F007C117D /* Runner */,
128+
683426AC2538D314009B194C /* RunnerUITests */,
110129
97C146EF1CF9000F007C117D /* Products */,
111130
16DDF472245BCC3E62219493 /* Pods */,
112131
8CA31EF57239BF20619316D9 /* Frameworks */,
@@ -117,6 +136,7 @@
117136
isa = PBXGroup;
118137
children = (
119138
97C146EE1CF9000F007C117D /* Runner.app */,
139+
683426AB2538D314009B194C /* RunnerUITests.xctest */,
120140
);
121141
name = Products;
122142
sourceTree = "<group>";
@@ -148,6 +168,24 @@
148168
/* End PBXGroup section */
149169

150170
/* Begin PBXNativeTarget section */
171+
683426AA2538D314009B194C /* RunnerUITests */ = {
172+
isa = PBXNativeTarget;
173+
buildConfigurationList = 683426B42538D314009B194C /* Build configuration list for PBXNativeTarget "RunnerUITests" */;
174+
buildPhases = (
175+
683426A72538D314009B194C /* Sources */,
176+
683426A82538D314009B194C /* Frameworks */,
177+
683426A92538D314009B194C /* Resources */,
178+
);
179+
buildRules = (
180+
);
181+
dependencies = (
182+
683426B12538D314009B194C /* PBXTargetDependency */,
183+
);
184+
name = RunnerUITests;
185+
productName = RunnerUITests;
186+
productReference = 683426AB2538D314009B194C /* RunnerUITests.xctest */;
187+
productType = "com.apple.product-type.bundle.ui-testing";
188+
};
151189
97C146ED1CF9000F007C117D /* Runner */ = {
152190
isa = PBXNativeTarget;
153191
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
@@ -179,6 +217,11 @@
179217
LastUpgradeCheck = 1100;
180218
ORGANIZATIONNAME = "The Chromium Authors";
181219
TargetAttributes = {
220+
683426AA2538D314009B194C = {
221+
CreatedOnToolsVersion = 11.7;
222+
ProvisioningStyle = Automatic;
223+
TestTargetID = 97C146ED1CF9000F007C117D;
224+
};
182225
97C146ED1CF9000F007C117D = {
183226
CreatedOnToolsVersion = 7.3.1;
184227
};
@@ -198,11 +241,19 @@
198241
projectRoot = "";
199242
targets = (
200243
97C146ED1CF9000F007C117D /* Runner */,
244+
683426AA2538D314009B194C /* RunnerUITests */,
201245
);
202246
};
203247
/* End PBXProject section */
204248

205249
/* Begin PBXResourcesBuildPhase section */
250+
683426A92538D314009B194C /* Resources */ = {
251+
isa = PBXResourcesBuildPhase;
252+
buildActionMask = 2147483647;
253+
files = (
254+
);
255+
runOnlyForDeploymentPostprocessing = 0;
256+
};
206257
97C146EC1CF9000F007C117D /* Resources */ = {
207258
isa = PBXResourcesBuildPhase;
208259
buildActionMask = 2147483647;
@@ -223,9 +274,12 @@
223274
files = (
224275
);
225276
inputPaths = (
277+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
278+
"${PODS_ROOT}/../Flutter/Flutter.framework",
226279
);
227280
name = "[CP] Embed Pods Frameworks";
228281
outputPaths = (
282+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
229283
);
230284
runOnlyForDeploymentPostprocessing = 0;
231285
shellPath = /bin/sh;
@@ -244,7 +298,7 @@
244298
);
245299
runOnlyForDeploymentPostprocessing = 0;
246300
shellPath = /bin/sh;
247-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
301+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
248302
};
249303
5F8AC0B5B699C537B657C107 /* [CP] Check Pods Manifest.lock */ = {
250304
isa = PBXShellScriptBuildPhase;
@@ -281,6 +335,14 @@
281335
/* End PBXShellScriptBuildPhase section */
282336

283337
/* Begin PBXSourcesBuildPhase section */
338+
683426A72538D314009B194C /* Sources */ = {
339+
isa = PBXSourcesBuildPhase;
340+
buildActionMask = 2147483647;
341+
files = (
342+
683426AE2538D314009B194C /* FLTShareExampleUITests.m in Sources */,
343+
);
344+
runOnlyForDeploymentPostprocessing = 0;
345+
};
284346
97C146EA1CF9000F007C117D /* Sources */ = {
285347
isa = PBXSourcesBuildPhase;
286348
buildActionMask = 2147483647;
@@ -293,6 +355,14 @@
293355
};
294356
/* End PBXSourcesBuildPhase section */
295357

358+
/* Begin PBXTargetDependency section */
359+
683426B12538D314009B194C /* PBXTargetDependency */ = {
360+
isa = PBXTargetDependency;
361+
target = 97C146ED1CF9000F007C117D /* Runner */;
362+
targetProxy = 683426B02538D314009B194C /* PBXContainerItemProxy */;
363+
};
364+
/* End PBXTargetDependency section */
365+
296366
/* Begin PBXVariantGroup section */
297367
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
298368
isa = PBXVariantGroup;
@@ -313,9 +383,53 @@
313383
/* End PBXVariantGroup section */
314384

315385
/* Begin XCBuildConfiguration section */
386+
683426B22538D314009B194C /* Debug */ = {
387+
isa = XCBuildConfiguration;
388+
buildSettings = {
389+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
390+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
391+
CLANG_ENABLE_OBJC_WEAK = YES;
392+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
393+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
394+
CODE_SIGN_STYLE = Automatic;
395+
DEVELOPMENT_TEAM = "";
396+
GCC_C_LANGUAGE_STANDARD = gnu11;
397+
INFOPLIST_FILE = RunnerUITests/Info.plist;
398+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
399+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
400+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
401+
MTL_FAST_MATH = YES;
402+
PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerUITests;
403+
PRODUCT_NAME = "$(TARGET_NAME)";
404+
TARGETED_DEVICE_FAMILY = "1,2";
405+
TEST_TARGET_NAME = Runner;
406+
};
407+
name = Debug;
408+
};
409+
683426B32538D314009B194C /* Release */ = {
410+
isa = XCBuildConfiguration;
411+
buildSettings = {
412+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
413+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
414+
CLANG_ENABLE_OBJC_WEAK = YES;
415+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
416+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
417+
CODE_SIGN_STYLE = Automatic;
418+
DEVELOPMENT_TEAM = "";
419+
GCC_C_LANGUAGE_STANDARD = gnu11;
420+
INFOPLIST_FILE = RunnerUITests/Info.plist;
421+
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
422+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
423+
MTL_FAST_MATH = YES;
424+
PRODUCT_BUNDLE_IDENTIFIER = com.google.RunnerUITests;
425+
PRODUCT_NAME = "$(TARGET_NAME)";
426+
TARGETED_DEVICE_FAMILY = "1,2";
427+
TEST_TARGET_NAME = Runner;
428+
};
429+
name = Release;
430+
};
316431
97C147031CF9000F007C117D /* Debug */ = {
317432
isa = XCBuildConfiguration;
318-
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
319433
buildSettings = {
320434
ALWAYS_SEARCH_USER_PATHS = NO;
321435
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
@@ -372,7 +486,6 @@
372486
};
373487
97C147041CF9000F007C117D /* Release */ = {
374488
isa = XCBuildConfiguration;
375-
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
376489
buildSettings = {
377490
ALWAYS_SEARCH_USER_PATHS = NO;
378491
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
@@ -466,6 +579,15 @@
466579
/* End XCBuildConfiguration section */
467580

468581
/* Begin XCConfigurationList section */
582+
683426B42538D314009B194C /* Build configuration list for PBXNativeTarget "RunnerUITests" */ = {
583+
isa = XCConfigurationList;
584+
buildConfigurations = (
585+
683426B22538D314009B194C /* Debug */,
586+
683426B32538D314009B194C /* Release */,
587+
);
588+
defaultConfigurationIsVisible = 0;
589+
defaultConfigurationName = Release;
590+
};
469591
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
470592
isa = XCConfigurationList;
471593
buildConfigurations = (

0 commit comments

Comments
 (0)