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

Commit 2c92b3f

Browse files
authored
[battery] Update and migrate iOS example project (#2089)
1 parent 16e916c commit 2c92b3f

File tree

4 files changed

+41
-45
lines changed

4 files changed

+41
-45
lines changed

packages/battery/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.1+4
2+
3+
* Update and migrate iOS example project.
4+
15
## 0.3.1+3
26

37
* Remove AndroidX warning.

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

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,16 @@
99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12-
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
1312
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
1413
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1514
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
1615
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17-
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
18-
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
1916
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
2017
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
2118
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
2219
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
2320
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
24-
EA987CF1DD05781B010B5D39 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B1E864018968B8D5FA44E86 /* Pods_Runner.framework */; };
21+
CC33A11108F15DB5F0C6C7AD /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E2CD29898079A0E658445A5 /* libPods-Runner.a */; };
2522
/* End PBXBuildFile section */
2623

2724
/* Begin PBXCopyFilesBuildPhase section */
@@ -42,10 +39,10 @@
4239
/* Begin PBXFileReference section */
4340
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4441
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
42+
1E2CD29898079A0E658445A5 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4543
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
46-
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
4744
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
48-
4B1E864018968B8D5FA44E86 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
45+
5F92487ECF695372E82D90C5 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
4946
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
5047
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
5148
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -58,6 +55,7 @@
5855
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
5956
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
6057
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
58+
BF850F5DC44F7AE2B245B994 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
6159
/* End PBXFileReference section */
6260

6361
/* Begin PBXFrameworksBuildPhase section */
@@ -67,7 +65,7 @@
6765
files = (
6866
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
6967
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
70-
EA987CF1DD05781B010B5D39 /* Pods_Runner.framework in Frameworks */,
68+
CC33A11108F15DB5F0C6C7AD /* libPods-Runner.a in Frameworks */,
7169
);
7270
runOnlyForDeploymentPostprocessing = 0;
7371
};
@@ -77,14 +75,16 @@
7775
1C99224A167BC35DA0CD0913 /* Frameworks */ = {
7876
isa = PBXGroup;
7977
children = (
80-
4B1E864018968B8D5FA44E86 /* Pods_Runner.framework */,
78+
1E2CD29898079A0E658445A5 /* libPods-Runner.a */,
8179
);
8280
name = Frameworks;
8381
sourceTree = "<group>";
8482
};
8583
571753FC2D526E56A295E627 /* Pods */ = {
8684
isa = PBXGroup;
8785
children = (
86+
5F92487ECF695372E82D90C5 /* Pods-Runner.debug.xcconfig */,
87+
BF850F5DC44F7AE2B245B994 /* Pods-Runner.release.xcconfig */,
8888
);
8989
name = Pods;
9090
sourceTree = "<group>";
@@ -94,7 +94,6 @@
9494
children = (
9595
3B80C3931E831B6300D905FE /* App.framework */,
9696
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
97-
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
9897
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9998
9740EEB21CF90195004384FC /* Debug.xcconfig */,
10099
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
@@ -161,7 +160,6 @@
161160
9705A1C41CF9048500538489 /* Embed Frameworks */,
162161
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
163162
4096151B6BA12D6D4D7DD96A /* [CP] Embed Pods Frameworks */,
164-
7C9CC6394B25E69B476E302B /* [CP] Copy Pods Resources */,
165163
);
166164
buildRules = (
167165
);
@@ -178,18 +176,17 @@
178176
97C146E61CF9000F007C117D /* Project object */ = {
179177
isa = PBXProject;
180178
attributes = {
181-
LastUpgradeCheck = 0830;
179+
LastUpgradeCheck = 1100;
182180
ORGANIZATIONNAME = "The Chromium Authors";
183181
TargetAttributes = {
184182
97C146ED1CF9000F007C117D = {
185183
CreatedOnToolsVersion = 7.3.1;
186-
DevelopmentTeam = 3GRKCVVJ22;
187184
};
188185
};
189186
};
190187
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
191188
compatibilityVersion = "Xcode 3.2";
192-
developmentRegion = English;
189+
developmentRegion = en;
193190
hasScannedForEncodings = 0;
194191
knownRegions = (
195192
en,
@@ -211,10 +208,7 @@
211208
buildActionMask = 2147483647;
212209
files = (
213210
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
214-
9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
215211
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
216-
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
217-
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
218212
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
219213
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
220214
);
@@ -249,22 +243,7 @@
249243
);
250244
runOnlyForDeploymentPostprocessing = 0;
251245
shellPath = /bin/sh;
252-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
253-
showEnvVarsInLog = 0;
254-
};
255-
7C9CC6394B25E69B476E302B /* [CP] Copy Pods Resources */ = {
256-
isa = PBXShellScriptBuildPhase;
257-
buildActionMask = 2147483647;
258-
files = (
259-
);
260-
inputPaths = (
261-
);
262-
name = "[CP] Copy Pods Resources";
263-
outputPaths = (
264-
);
265-
runOnlyForDeploymentPostprocessing = 0;
266-
shellPath = /bin/sh;
267-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
246+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
268247
showEnvVarsInLog = 0;
269248
};
270249
9740EEB61CF901F6004384FC /* Run Script */ = {
@@ -287,13 +266,16 @@
287266
files = (
288267
);
289268
inputPaths = (
269+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
270+
"${PODS_ROOT}/Manifest.lock",
290271
);
291272
name = "[CP] Check Pods Manifest.lock";
292273
outputPaths = (
274+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
293275
);
294276
runOnlyForDeploymentPostprocessing = 0;
295277
shellPath = /bin/sh;
296-
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
278+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
297279
showEnvVarsInLog = 0;
298280
};
299281
/* End PBXShellScriptBuildPhase section */
@@ -336,19 +318,28 @@
336318
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
337319
buildSettings = {
338320
ALWAYS_SEARCH_USER_PATHS = NO;
321+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
339322
CLANG_ANALYZER_NONNULL = YES;
340323
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
341324
CLANG_CXX_LIBRARY = "libc++";
342325
CLANG_ENABLE_MODULES = YES;
343326
CLANG_ENABLE_OBJC_ARC = YES;
327+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
344328
CLANG_WARN_BOOL_CONVERSION = YES;
329+
CLANG_WARN_COMMA = YES;
345330
CLANG_WARN_CONSTANT_CONVERSION = YES;
331+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
346332
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347333
CLANG_WARN_EMPTY_BODY = YES;
348334
CLANG_WARN_ENUM_CONVERSION = YES;
349335
CLANG_WARN_INFINITE_RECURSION = YES;
350336
CLANG_WARN_INT_CONVERSION = YES;
337+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
338+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
339+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
351340
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
341+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
342+
CLANG_WARN_STRICT_PROTOTYPES = YES;
352343
CLANG_WARN_SUSPICIOUS_MOVE = YES;
353344
CLANG_WARN_UNREACHABLE_CODE = YES;
354345
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -384,19 +375,28 @@
384375
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
385376
buildSettings = {
386377
ALWAYS_SEARCH_USER_PATHS = NO;
378+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
387379
CLANG_ANALYZER_NONNULL = YES;
388380
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
389381
CLANG_CXX_LIBRARY = "libc++";
390382
CLANG_ENABLE_MODULES = YES;
391383
CLANG_ENABLE_OBJC_ARC = YES;
384+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
392385
CLANG_WARN_BOOL_CONVERSION = YES;
386+
CLANG_WARN_COMMA = YES;
393387
CLANG_WARN_CONSTANT_CONVERSION = YES;
388+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
394389
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
395390
CLANG_WARN_EMPTY_BODY = YES;
396391
CLANG_WARN_ENUM_CONVERSION = YES;
397392
CLANG_WARN_INFINITE_RECURSION = YES;
398393
CLANG_WARN_INT_CONVERSION = YES;
394+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
395+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
396+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
399397
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
398+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
399+
CLANG_WARN_STRICT_PROTOTYPES = YES;
400400
CLANG_WARN_SUSPICIOUS_MOVE = YES;
401401
CLANG_WARN_UNREACHABLE_CODE = YES;
402402
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -425,9 +425,7 @@
425425
isa = XCBuildConfiguration;
426426
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
427427
buildSettings = {
428-
ARCHS = arm64;
429428
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
430-
DEVELOPMENT_TEAM = 3GRKCVVJ22;
431429
ENABLE_BITCODE = NO;
432430
FRAMEWORK_SEARCH_PATHS = (
433431
"$(inherited)",
@@ -448,9 +446,7 @@
448446
isa = XCBuildConfiguration;
449447
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
450448
buildSettings = {
451-
ARCHS = arm64;
452449
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
453-
DEVELOPMENT_TEAM = 3GRKCVVJ22;
454450
ENABLE_BITCODE = NO;
455451
FRAMEWORK_SEARCH_PATHS = (
456452
"$(inherited)",

packages/battery/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0830"
3+
LastUpgradeVersion = "1100"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,8 +27,6 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30-
<Testables>
31-
</Testables>
3230
<MacroExpansion>
3331
<BuildableReference
3432
BuildableIdentifier = "primary"
@@ -38,8 +36,8 @@
3836
ReferencedContainer = "container:Runner.xcodeproj">
3937
</BuildableReference>
4038
</MacroExpansion>
41-
<AdditionalOptions>
42-
</AdditionalOptions>
39+
<Testables>
40+
</Testables>
4341
</TestAction>
4442
<LaunchAction
4543
buildConfiguration = "Debug"
@@ -61,8 +59,6 @@
6159
ReferencedContainer = "container:Runner.xcodeproj">
6260
</BuildableReference>
6361
</BuildableProductRunnable>
64-
<AdditionalOptions>
65-
</AdditionalOptions>
6662
</LaunchAction>
6763
<ProfileAction
6864
buildConfiguration = "Release"

packages/battery/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for accessing information about the battery state
33
(full, charging, discharging) on Android and iOS.
44
author: Flutter Team <[email protected]>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
6-
version: 0.3.1+3
6+
version: 0.3.1+4
77

88
flutter:
99
plugin:

0 commit comments

Comments
 (0)