Skip to content

Commit 3aaa867

Browse files
authored
Update App Clip for Xcode 15 and iOS 16+ (#2162)
1. Run `flutter run` on the project to pick up project automigrations. 2. Set min version to iOS 16 to take advantage of the 15MB size limit (see flutter/flutter#71098 (comment)) 3. Other updates needed to avoid Xcode errors and warnings. First introduced in #538 See also flutter/website#10145
1 parent 307f982 commit 3aaa867

File tree

8 files changed

+48
-50
lines changed

8 files changed

+48
-50
lines changed

ios_app_clip/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ios_app_clip
22

3-
A sample project demonstrating integration with iOS 14's App Clip.
3+
A sample project demonstrating integration with iOS App Clip.
44

55
The App Clip target is rendered by Flutter and uses a plugin.
66

@@ -15,13 +15,12 @@ The App Clip target is rendered by Flutter and uses a plugin.
1515

1616
In order to run.
1717

18-
1. `cd ios`
19-
2. `pod install`
20-
3. `open Runner.xcworkspace`
21-
4. Inside Xcode, select the `AppClip` target from the scheme dropdown
22-
5. Select an iOS 14 device
23-
6. Select a development team as needed
24-
7. Press run in Xcode to run
18+
1. `flutter build ios --config-only`
19+
1. `open Runner.xcworkspace`
20+
1. Inside Xcode, select the `AppClip` target from the scheme dropdown
21+
1. Select an iOS 16 or higher device
22+
1. Select a development team as needed
23+
1. Press run in Xcode to run
2524

2625
## Questions/issues
2726

ios_app_clip/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>9.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

ios_app_clip/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# platform :ios, '12.0'
33

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

ios_app_clip/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 51;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -197,6 +197,7 @@
197197
0A48A2562508B57F0036A529 /* Frameworks */,
198198
0A48A2572508B57F0036A529 /* Resources */,
199199
0A48A2792508C8F70036A529 /* Embed Flutter */,
200+
1999EAF6C873AB834CA4DC07 /* [CP] Embed Pods Frameworks */,
200201
);
201202
buildRules = (
202203
);
@@ -217,8 +218,8 @@
217218
97C146EB1CF9000F007C117D /* Frameworks */,
218219
97C146EC1CF9000F007C117D /* Resources */,
219220
9705A1C41CF9048500538489 /* Embed Frameworks */,
220-
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
221221
0A48A26E2508B57F0036A529 /* Embed App Clips */,
222+
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
222223
CF23DA206BDE2D699E40B8E8 /* [CP] Embed Pods Frameworks */,
223224
);
224225
buildRules = (
@@ -238,7 +239,7 @@
238239
isa = PBXProject;
239240
attributes = {
240241
LastSwiftUpdateCheck = 1200;
241-
LastUpgradeCheck = 1020;
242+
LastUpgradeCheck = 1530;
242243
ORGANIZATIONNAME = "";
243244
TargetAttributes = {
244245
0A48A2582508B57F0036A529 = {
@@ -296,6 +297,7 @@
296297
/* Begin PBXShellScriptBuildPhase section */
297298
0A48A2782508C8E40036A529 /* Build Flutter */ = {
298299
isa = PBXShellScriptBuildPhase;
300+
alwaysOutOfDate = 1;
299301
buildActionMask = 2147483647;
300302
files = (
301303
);
@@ -314,6 +316,7 @@
314316
};
315317
0A48A2792508C8F70036A529 /* Embed Flutter */ = {
316318
isa = PBXShellScriptBuildPhase;
319+
alwaysOutOfDate = 1;
317320
buildActionMask = 2147483647;
318321
files = (
319322
);
@@ -330,12 +333,31 @@
330333
shellPath = /bin/sh;
331334
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin\n";
332335
};
336+
1999EAF6C873AB834CA4DC07 /* [CP] Embed Pods Frameworks */ = {
337+
isa = PBXShellScriptBuildPhase;
338+
buildActionMask = 2147483647;
339+
files = (
340+
);
341+
inputFileListPaths = (
342+
"${PODS_ROOT}/Target Support Files/Pods-AppClip/Pods-AppClip-frameworks-${CONFIGURATION}-input-files.xcfilelist",
343+
);
344+
name = "[CP] Embed Pods Frameworks";
345+
outputFileListPaths = (
346+
"${PODS_ROOT}/Target Support Files/Pods-AppClip/Pods-AppClip-frameworks-${CONFIGURATION}-output-files.xcfilelist",
347+
);
348+
runOnlyForDeploymentPostprocessing = 0;
349+
shellPath = /bin/sh;
350+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AppClip/Pods-AppClip-frameworks.sh\"\n";
351+
showEnvVarsInLog = 0;
352+
};
333353
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
334354
isa = PBXShellScriptBuildPhase;
355+
alwaysOutOfDate = 1;
335356
buildActionMask = 2147483647;
336357
files = (
337358
);
338359
inputPaths = (
360+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
339361
);
340362
name = "Thin Binary";
341363
outputPaths = (
@@ -390,6 +412,7 @@
390412
};
391413
9740EEB61CF901F6004384FC /* Run Script */ = {
392414
isa = PBXShellScriptBuildPhase;
415+
alwaysOutOfDate = 1;
393416
buildActionMask = 2147483647;
394417
files = (
395418
);
@@ -400,7 +423,7 @@
400423
);
401424
runOnlyForDeploymentPostprocessing = 0;
402425
shellPath = /bin/sh;
403-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
426+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
404427
};
405428
CF23DA206BDE2D699E40B8E8 /* [CP] Embed Pods Frameworks */ = {
406429
isa = PBXShellScriptBuildPhase;
@@ -475,7 +498,6 @@
475498
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
476499
buildSettings = {
477500
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
478-
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
479501
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
480502
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
481503
CLANG_ENABLE_OBJC_WEAK = YES;
@@ -484,15 +506,9 @@
484506
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
485507
CODE_SIGN_ENTITLEMENTS = AppClip/AppClip.entitlements;
486508
CODE_SIGN_STYLE = Automatic;
487-
DEVELOPMENT_TEAM = "";
488509
ENABLE_BITCODE = NO;
489-
FRAMEWORK_SEARCH_PATHS = (
490-
"$(PROJECT_DIR)/Flutter",
491-
"$(inherited)",
492-
);
493510
GCC_C_LANGUAGE_STANDARD = gnu11;
494511
INFOPLIST_FILE = AppClip/Info.plist;
495-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
496512
LD_RUNPATH_SEARCH_PATHS = (
497513
"$(inherited)",
498514
"@executable_path/Frameworks",
@@ -514,7 +530,6 @@
514530
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
515531
buildSettings = {
516532
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
517-
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
518533
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
519534
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
520535
CLANG_ENABLE_OBJC_WEAK = YES;
@@ -523,15 +538,9 @@
523538
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
524539
CODE_SIGN_ENTITLEMENTS = AppClip/AppClip.entitlements;
525540
CODE_SIGN_STYLE = Automatic;
526-
DEVELOPMENT_TEAM = "";
527541
ENABLE_BITCODE = NO;
528-
FRAMEWORK_SEARCH_PATHS = (
529-
"$(PROJECT_DIR)/Flutter",
530-
"$(inherited)",
531-
);
532542
GCC_C_LANGUAGE_STANDARD = gnu11;
533543
INFOPLIST_FILE = AppClip/Info.plist;
534-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
535544
LD_RUNPATH_SEARCH_PATHS = (
536545
"$(inherited)",
537546
"@executable_path/Frameworks",
@@ -550,7 +559,6 @@
550559
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
551560
buildSettings = {
552561
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
553-
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
554562
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
555563
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
556564
CLANG_ENABLE_OBJC_WEAK = YES;
@@ -559,15 +567,9 @@
559567
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
560568
CODE_SIGN_ENTITLEMENTS = AppClip/AppClip.entitlements;
561569
CODE_SIGN_STYLE = Automatic;
562-
DEVELOPMENT_TEAM = "";
563570
ENABLE_BITCODE = NO;
564-
FRAMEWORK_SEARCH_PATHS = (
565-
"$(PROJECT_DIR)/Flutter",
566-
"$(inherited)",
567-
);
568571
GCC_C_LANGUAGE_STANDARD = gnu11;
569572
INFOPLIST_FILE = AppClip/Info.plist;
570-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
571573
LD_RUNPATH_SEARCH_PATHS = (
572574
"$(inherited)",
573575
"@executable_path/Frameworks",
@@ -622,7 +624,7 @@
622624
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
623625
GCC_WARN_UNUSED_FUNCTION = YES;
624626
GCC_WARN_UNUSED_VARIABLE = YES;
625-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
627+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
626628
MTL_ENABLE_DEBUG_INFO = NO;
627629
SDKROOT = iphoneos;
628630
SUPPORTED_PLATFORMS = iphoneos;
@@ -640,7 +642,6 @@
640642
CLANG_ENABLE_MODULES = YES;
641643
CODE_SIGN_ENTITLEMENTS = Runner/AppClip.entitlements;
642644
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
643-
DEVELOPMENT_TEAM = "";
644645
ENABLE_BITCODE = NO;
645646
FRAMEWORK_SEARCH_PATHS = (
646647
"$(inherited)",
@@ -710,7 +711,7 @@
710711
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
711712
GCC_WARN_UNUSED_FUNCTION = YES;
712713
GCC_WARN_UNUSED_VARIABLE = YES;
713-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
714+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
714715
MTL_ENABLE_DEBUG_INFO = YES;
715716
ONLY_ACTIVE_ARCH = YES;
716717
SDKROOT = iphoneos;
@@ -759,7 +760,7 @@
759760
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
760761
GCC_WARN_UNUSED_FUNCTION = YES;
761762
GCC_WARN_UNUSED_VARIABLE = YES;
762-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
763+
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
763764
MTL_ENABLE_DEBUG_INFO = NO;
764765
SDKROOT = iphoneos;
765766
SUPPORTED_PLATFORMS = iphoneos;
@@ -779,7 +780,6 @@
779780
CLANG_ENABLE_MODULES = YES;
780781
CODE_SIGN_ENTITLEMENTS = Runner/AppClip.entitlements;
781782
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
782-
DEVELOPMENT_TEAM = "";
783783
ENABLE_BITCODE = NO;
784784
FRAMEWORK_SEARCH_PATHS = (
785785
"$(inherited)",
@@ -812,7 +812,6 @@
812812
CLANG_ENABLE_MODULES = YES;
813813
CODE_SIGN_ENTITLEMENTS = Runner/AppClip.entitlements;
814814
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
815-
DEVELOPMENT_TEAM = "";
816815
ENABLE_BITCODE = NO;
817816
FRAMEWORK_SEARCH_PATHS = (
818817
"$(inherited)",

ios_app_clip/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios_app_clip/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 = "1020"
3+
LastUpgradeVersion = "1530"
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 = "Profile"

ios_app_clip/ios/Runner/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22
import Flutter
33

4-
@UIApplicationMain
4+
@main
55
@objc class AppDelegate: FlutterAppDelegate {
66
override func application(
77
_ application: UIApplication,

ios_app_clip/ios/Runner/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>$(DEVELOPMENT_LANGUAGE)</string>
79
<key>CFBundleExecutable</key>
@@ -22,6 +24,8 @@
2224
<string>$(FLUTTER_BUILD_NUMBER)</string>
2325
<key>LSRequiresIPhoneOS</key>
2426
<true/>
27+
<key>UIApplicationSupportsIndirectInputEvents</key>
28+
<true/>
2529
<key>UILaunchStoryboardName</key>
2630
<string>LaunchScreen</string>
2731
<key>UIMainStoryboardFile</key>

0 commit comments

Comments
 (0)