Skip to content

Commit

Permalink
[example][ios] Fix build example failed with xcode 15 (#1418)
Browse files Browse the repository at this point in the history
The user reports that it's failed to build the example with xcode 15
```
Error (Xcode): Cycle inside Runner; building could produce unreliable results.
Cycle details:
→ Target 'Runner': CodeSign /Users/joepritchard/Downloads/Agora-Flutter-SDK-main/example/build/ios/Debug-iphoneos/Runner.app

...
```
To fix it, we need to change the order in `Build Phases`. See 
- flutter/flutter#135739
-
flutter/flutter#135056 (comment)

I added a new job to cover this case and retained the old `build_ios`
job to ensure this change does not affect the user with xcode version <
15.
  • Loading branch information
littleGnAl authored Nov 1, 2023
1 parent 407494d commit 64dbdad
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 12 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,32 @@ jobs:
run: flutter build ios --no-codesign
working-directory: example

# This job aim to cover https://github.com/flutter/flutter/issues/135739
build_ios_xcode_15:
name: Build iOS with xcode 15.x
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
strategy:
matrix:
version: ['3.13.6']
runs-on: macos-13
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.version }}
cache: true
- run: | # https://github.com/actions/runner-images/issues/6746#issuecomment-1380042553
# set xcode version to use for build
sudo xcode-select -switch /Applications/Xcode_15.0.1.app
# Print used xCode version
xcode-select -print-path
xcodebuild -version
- run: flutter pub get
- name: Run flutter build ios --no-codesign
run: flutter build ios --no-codesign
working-directory: example

build_web:
name: Build Web
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
23 changes: 13 additions & 10 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -221,14 +221,14 @@
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
7E1B0C30D51B77496A1AE2E1 /* [CP] Check Pods Manifest.lock */,
39CD36047290E845D66DC420 /* [CP] Embed Pods Frameworks */,
71BBA3C328AB50E2007B0DBC /* Embed App Extensions */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
39CD36047290E845D66DC420 /* [CP] Embed Pods Frameworks */,
71BBA3C328AB50E2007B0DBC /* Embed App Extensions */,
);
buildRules = (
);
Expand All @@ -246,7 +246,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
71BBA3B728AB50E2007B0DBC = {
Expand Down Expand Up @@ -317,10 +317,12 @@
};
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand Down Expand Up @@ -353,6 +355,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -479,7 +482,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -534,7 +537,7 @@
INFOPLIST_FILE = ScreenSharing/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ScreenSharing;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -571,7 +574,7 @@
INFOPLIST_FILE = ScreenSharing/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ScreenSharing;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -607,7 +610,7 @@
INFOPLIST_FILE = ScreenSharing/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ScreenSharing;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -671,7 +674,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -720,7 +723,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 2 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>

0 comments on commit 64dbdad

Please sign in to comment.