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

Commit 5fe1d16

Browse files
committed
Added RunnerTests target to macos example.
1 parent ce96eae commit 5fe1d16

File tree

5 files changed

+216
-4
lines changed

5 files changed

+216
-4
lines changed

packages/in_app_purchase/in_app_purchase_storekit/example/macos/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
platform :osx, '10.11'
1+
platform :osx, '10.15'
22

33
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
44
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

packages/in_app_purchase/in_app_purchase_storekit/example/macos/Runner.xcodeproj/project.pbxproj

+166-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
2828
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
2929
A2C6CD5797E6A6721FDBCA1C /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 36DEEA66738F64D983F76848 /* Pods_Runner.framework */; };
30+
F700DD0528E652A10004836B /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F700DD0428E652A10004836B /* RunnerTests.swift */; };
3031
/* End PBXBuildFile section */
3132

3233
/* Begin PBXContainerItemProxy section */
@@ -37,6 +38,13 @@
3738
remoteGlobalIDString = 33CC111A2044C6BA0003C045;
3839
remoteInfo = FLX;
3940
};
41+
F700DD0628E652A10004836B /* PBXContainerItemProxy */ = {
42+
isa = PBXContainerItemProxy;
43+
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
44+
proxyType = 1;
45+
remoteGlobalIDString = 33CC10EC2044A3C60003C045;
46+
remoteInfo = Runner;
47+
};
4048
/* End PBXContainerItemProxy section */
4149

4250
/* Begin PBXCopyFilesBuildPhase section */
@@ -73,6 +81,8 @@
7381
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
7482
9A4FEABF1DEF0D106FEB7974 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
7583
B6C8FD76BB3278AA51FED870 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
84+
F700DD0228E652A10004836B /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
85+
F700DD0428E652A10004836B /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
7686
/* End PBXFileReference section */
7787

7888
/* Begin PBXFrameworksBuildPhase section */
@@ -84,6 +94,13 @@
8494
);
8595
runOnlyForDeploymentPostprocessing = 0;
8696
};
97+
F700DCFF28E652A10004836B /* Frameworks */ = {
98+
isa = PBXFrameworksBuildPhase;
99+
buildActionMask = 2147483647;
100+
files = (
101+
);
102+
runOnlyForDeploymentPostprocessing = 0;
103+
};
87104
/* End PBXFrameworksBuildPhase section */
88105

89106
/* Begin PBXGroup section */
@@ -94,7 +111,6 @@
94111
9A4FEABF1DEF0D106FEB7974 /* Pods-Runner.release.xcconfig */,
95112
62F1680C5AE033907C1DF7AB /* Pods-Runner.profile.xcconfig */,
96113
);
97-
name = Pods;
98114
path = Pods;
99115
sourceTree = "<group>";
100116
};
@@ -114,6 +130,7 @@
114130
children = (
115131
33FAB671232836740065AC1E /* Runner */,
116132
33CEB47122A05771004F2AC0 /* Flutter */,
133+
F700DD0328E652A10004836B /* RunnerTests */,
117134
33CC10EE2044A3C60003C045 /* Products */,
118135
D73912EC22F37F3D000D13A0 /* Frameworks */,
119136
09D47623A8E19B84FF0453EE /* Pods */,
@@ -124,6 +141,7 @@
124141
isa = PBXGroup;
125142
children = (
126143
33CC10ED2044A3C60003C045 /* example.app */,
144+
F700DD0228E652A10004836B /* RunnerTests.xctest */,
127145
);
128146
name = Products;
129147
sourceTree = "<group>";
@@ -171,6 +189,14 @@
171189
name = Frameworks;
172190
sourceTree = "<group>";
173191
};
192+
F700DD0328E652A10004836B /* RunnerTests */ = {
193+
isa = PBXGroup;
194+
children = (
195+
F700DD0428E652A10004836B /* RunnerTests.swift */,
196+
);
197+
path = RunnerTests;
198+
sourceTree = "<group>";
199+
};
174200
/* End PBXGroup section */
175201

176202
/* Begin PBXNativeTarget section */
@@ -196,13 +222,31 @@
196222
productReference = 33CC10ED2044A3C60003C045 /* example.app */;
197223
productType = "com.apple.product-type.application";
198224
};
225+
F700DD0128E652A10004836B /* RunnerTests */ = {
226+
isa = PBXNativeTarget;
227+
buildConfigurationList = F700DD0B28E652A10004836B /* Build configuration list for PBXNativeTarget "RunnerTests" */;
228+
buildPhases = (
229+
F700DCFE28E652A10004836B /* Sources */,
230+
F700DCFF28E652A10004836B /* Frameworks */,
231+
F700DD0028E652A10004836B /* Resources */,
232+
);
233+
buildRules = (
234+
);
235+
dependencies = (
236+
F700DD0728E652A10004836B /* PBXTargetDependency */,
237+
);
238+
name = RunnerTests;
239+
productName = RunnerTests;
240+
productReference = F700DD0228E652A10004836B /* RunnerTests.xctest */;
241+
productType = "com.apple.product-type.bundle.unit-test";
242+
};
199243
/* End PBXNativeTarget section */
200244

201245
/* Begin PBXProject section */
202246
33CC10E52044A3C60003C045 /* Project object */ = {
203247
isa = PBXProject;
204248
attributes = {
205-
LastSwiftUpdateCheck = 0920;
249+
LastSwiftUpdateCheck = 1400;
206250
LastUpgradeCheck = 1300;
207251
ORGANIZATIONNAME = "";
208252
TargetAttributes = {
@@ -220,6 +264,10 @@
220264
CreatedOnToolsVersion = 9.2;
221265
ProvisioningStyle = Manual;
222266
};
267+
F700DD0128E652A10004836B = {
268+
CreatedOnToolsVersion = 14.0.1;
269+
TestTargetID = 33CC10EC2044A3C60003C045;
270+
};
223271
};
224272
};
225273
buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
@@ -237,6 +285,7 @@
237285
targets = (
238286
33CC10EC2044A3C60003C045 /* Runner */,
239287
33CC111A2044C6BA0003C045 /* Flutter Assemble */,
288+
F700DD0128E652A10004836B /* RunnerTests */,
240289
);
241290
};
242291
/* End PBXProject section */
@@ -251,6 +300,13 @@
251300
);
252301
runOnlyForDeploymentPostprocessing = 0;
253302
};
303+
F700DD0028E652A10004836B /* Resources */ = {
304+
isa = PBXResourcesBuildPhase;
305+
buildActionMask = 2147483647;
306+
files = (
307+
);
308+
runOnlyForDeploymentPostprocessing = 0;
309+
};
254310
/* End PBXResourcesBuildPhase section */
255311

256312
/* Begin PBXShellScriptBuildPhase section */
@@ -343,6 +399,14 @@
343399
);
344400
runOnlyForDeploymentPostprocessing = 0;
345401
};
402+
F700DCFE28E652A10004836B /* Sources */ = {
403+
isa = PBXSourcesBuildPhase;
404+
buildActionMask = 2147483647;
405+
files = (
406+
F700DD0528E652A10004836B /* RunnerTests.swift in Sources */,
407+
);
408+
runOnlyForDeploymentPostprocessing = 0;
409+
};
346410
/* End PBXSourcesBuildPhase section */
347411

348412
/* Begin PBXTargetDependency section */
@@ -351,6 +415,11 @@
351415
target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
352416
targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
353417
};
418+
F700DD0728E652A10004836B /* PBXTargetDependency */ = {
419+
isa = PBXTargetDependency;
420+
target = 33CC10EC2044A3C60003C045 /* Runner */;
421+
targetProxy = F700DD0628E652A10004836B /* PBXContainerItemProxy */;
422+
};
354423
/* End PBXTargetDependency section */
355424

356425
/* Begin PBXVariantGroup section */
@@ -596,6 +665,91 @@
596665
};
597666
name = Release;
598667
};
668+
F700DD0828E652A10004836B /* Debug */ = {
669+
isa = XCBuildConfiguration;
670+
buildSettings = {
671+
BUNDLE_LOADER = "$(TEST_HOST)";
672+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
673+
CLANG_ENABLE_OBJC_WEAK = YES;
674+
CLANG_WARN_COMMA = YES;
675+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
676+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
677+
CLANG_WARN_STRICT_PROTOTYPES = YES;
678+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
679+
CLANG_WARN_UNREACHABLE_CODE = YES;
680+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
681+
CODE_SIGN_STYLE = Automatic;
682+
CURRENT_PROJECT_VERSION = 1;
683+
GCC_WARN_UNDECLARED_SELECTOR = YES;
684+
GENERATE_INFOPLIST_FILE = YES;
685+
MACOSX_DEPLOYMENT_TARGET = 10.11;
686+
MARKETING_VERSION = 1.0;
687+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
688+
MTL_FAST_MATH = YES;
689+
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests.RunnerTests;
690+
PRODUCT_NAME = "$(TARGET_NAME)";
691+
SWIFT_EMIT_LOC_STRINGS = NO;
692+
SWIFT_VERSION = 5.0;
693+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example";
694+
};
695+
name = Debug;
696+
};
697+
F700DD0928E652A10004836B /* Release */ = {
698+
isa = XCBuildConfiguration;
699+
buildSettings = {
700+
BUNDLE_LOADER = "$(TEST_HOST)";
701+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
702+
CLANG_ENABLE_OBJC_WEAK = YES;
703+
CLANG_WARN_COMMA = YES;
704+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
705+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
706+
CLANG_WARN_STRICT_PROTOTYPES = YES;
707+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
708+
CLANG_WARN_UNREACHABLE_CODE = YES;
709+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
710+
CODE_SIGN_STYLE = Automatic;
711+
CURRENT_PROJECT_VERSION = 1;
712+
GCC_WARN_UNDECLARED_SELECTOR = YES;
713+
GENERATE_INFOPLIST_FILE = YES;
714+
MACOSX_DEPLOYMENT_TARGET = 10.11;
715+
MARKETING_VERSION = 1.0;
716+
MTL_FAST_MATH = YES;
717+
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests.RunnerTests;
718+
PRODUCT_NAME = "$(TARGET_NAME)";
719+
SWIFT_EMIT_LOC_STRINGS = NO;
720+
SWIFT_VERSION = 5.0;
721+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example";
722+
};
723+
name = Release;
724+
};
725+
F700DD0A28E652A10004836B /* Profile */ = {
726+
isa = XCBuildConfiguration;
727+
buildSettings = {
728+
BUNDLE_LOADER = "$(TEST_HOST)";
729+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
730+
CLANG_ENABLE_OBJC_WEAK = YES;
731+
CLANG_WARN_COMMA = YES;
732+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
733+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
734+
CLANG_WARN_STRICT_PROTOTYPES = YES;
735+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
736+
CLANG_WARN_UNREACHABLE_CODE = YES;
737+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
738+
CODE_SIGN_STYLE = Automatic;
739+
CURRENT_PROJECT_VERSION = 1;
740+
GCC_WARN_UNDECLARED_SELECTOR = YES;
741+
GENERATE_INFOPLIST_FILE = YES;
742+
MACOSX_DEPLOYMENT_TARGET = 10.11;
743+
MARKETING_VERSION = 1.0;
744+
MTL_FAST_MATH = YES;
745+
PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.RunnerTests.RunnerTests;
746+
PRODUCT_NAME = "$(TARGET_NAME)";
747+
SWIFT_EMIT_LOC_STRINGS = NO;
748+
SWIFT_VERSION = 5.0;
749+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example";
750+
};
751+
name = Profile;
752+
};
599753
/* End XCBuildConfiguration section */
600754

601755
/* Begin XCConfigurationList section */
@@ -629,6 +783,16 @@
629783
defaultConfigurationIsVisible = 0;
630784
defaultConfigurationName = Release;
631785
};
786+
F700DD0B28E652A10004836B /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
787+
isa = XCConfigurationList;
788+
buildConfigurations = (
789+
F700DD0828E652A10004836B /* Debug */,
790+
F700DD0928E652A10004836B /* Release */,
791+
F700DD0A28E652A10004836B /* Profile */,
792+
);
793+
defaultConfigurationIsVisible = 0;
794+
defaultConfigurationName = Release;
795+
};
632796
/* End XCConfigurationList section */
633797
};
634798
rootObject = 33CC10E52044A3C60003C045 /* Project object */;

packages/in_app_purchase/in_app_purchase_storekit/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+11
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@
3737
</BuildableReference>
3838
</MacroExpansion>
3939
<Testables>
40+
<TestableReference
41+
skipped = "NO"
42+
parallelizable = "YES">
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "F700DD0128E652A10004836B"
46+
BuildableName = "RunnerTests.xctest"
47+
BlueprintName = "RunnerTests"
48+
ReferencedContainer = "container:Runner.xcodeproj">
49+
</BuildableReference>
50+
</TestableReference>
4051
</Testables>
4152
</TestAction>
4253
<LaunchAction
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//
2+
// RunnerTests.swift
3+
// RunnerTests
4+
//
5+
// Copyright 2013 The Flutter Authors. All rights reserved.
6+
// Use of this source code is governed by a BSD-style license that can be
7+
// found in the LICENSE file.
8+
//
9+
10+
import XCTest
11+
12+
final class RunnerTests: XCTestCase {
13+
14+
override func setUpWithError() throws {
15+
// Put setup code here. This method is called before the invocation of each test method in the class.
16+
}
17+
18+
override func tearDownWithError() throws {
19+
// Put teardown code here. This method is called after the invocation of each test method in the class.
20+
}
21+
22+
func testExample() throws {
23+
// This is an example of a functional test case.
24+
// Use XCTAssert and related functions to verify your tests produce the correct results.
25+
// Any test you write for XCTest can be annotated as throws and async.
26+
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error.
27+
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards.
28+
}
29+
30+
func testPerformanceExample() throws {
31+
// This is an example of a performance test case.
32+
measure {
33+
// Put the code you want to measure the time of here.
34+
}
35+
}
36+
37+
}

packages/in_app_purchase/in_app_purchase_storekit/shared/in_app_purchase_storekit.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ Downloaded by pub (not CocoaPods).
2121
s.ios.dependency 'Flutter'
2222
s.osx.dependency 'FlutterMacOS'
2323
s.ios.deployment_target = '9.0'
24-
s.osx.deployment_target = '10.11'
24+
s.osx.deployment_target = '10.15'
2525
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2626
end

0 commit comments

Comments
 (0)