Skip to content

Unable to archive with Xcode14.3. #123920

Closed
Closed
@hukusuke1007

Description

@hukusuke1007

Is there an existing issue for this?

  • I have searched the existing issues
    I have read the guide to filing a bug

Steps to reproduce

  1. Run flutter build ipa --release --target lib/main.dart

Actual results

Cannot archive. But, I was able to archive in Xcode 14.2. I use M2 Mac.

Logs

Logs
    mkdir -p
    /Users/my_account/Library/Developer/Xcode/DerivedData/Runner-fmlhccukvdybtifbzbangdmvqxwz/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/Runner.app/Framework
    s
    Symlinked...
    rsync --delete -av --filter P .*.?????? --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules"
    "../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework"
    "/Users/my_account/Library/Developer/Xcode/DerivedData/Runner-fmlhccukvdybtifbzbangdmvqxwz/Build/Intermediates.noindex/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.
    app/Frameworks"
    building file list ... rsync: link_stat "/Users/my_account/project/linkpocket/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework" failed: No such file or directory (2)
    done

    sent 29 bytes  received 20 bytes  98.00 bytes/sec
    total size is 0  speedup is 0.00
    rsync error: some files could not be transferred (code 23) at /AppleInternal/Library/BuildRoots/9e200cfa-7d96-11ed-886f-a23c4f261b56/Library/Caches/com.apple.xbs/Sources/rsync/rsync/main.c(996)
    [sender=2.6.9]
    Command PhaseScriptExecution failed with a nonzero exit code
    note: Building targets in dependency order
    note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project
    'Runner')
    note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project
    'Runner')

    Result bundle written to path:
        /var/folders/5j/stvmgp9n7034vl1rg74k9gtm0000gn/T/flutter_tools.EUZenq/flutter_ios_build_temp_dirxSM3Fb/temporary_xcresult_bundle


Encountered error while archiving for device.


Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.9, on macOS 13.2.1 22D68 darwin-arm64, locale
    ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.76.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

Activity

hukusuke1007

hukusuke1007 commented on Apr 1, 2023

@hukusuke1007
Author

The path is wrong🤔

 building file list ... rsync: link_stat "/Users/my_account/project/linkpocket/ios/../../../IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework" failed: No such file or directory (2)

These files exist here.

/Users/my_account/Library/Developer/Xcode/DerivedData/Runner-fmlhccukvdybtifbzbangdmvqxwz/Build/Intermediates.noindex/ArchiveIntermediates/Runner/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/FMDB.framework
hukusuke1007

hukusuke1007 commented on Apr 1, 2023

@hukusuke1007
Author

It appears to be perhaps the following problem.
CocoaPods/CocoaPods#11808

virtualmarc

virtualmarc commented on Apr 1, 2023

@virtualmarc

There are workarounds in #123852 you can use until it's officially fixed and some discussion in #123857

cerberodev

cerberodev commented on Apr 3, 2023

@cerberodev

this works for me

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    end
    installer.generated_projects.each do |project|
      project.targets.each do |target|
          target.build_configurations.each do |config|
            if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
              config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
              config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
                '$(inherited)',
              # dart: [PermissionGroup.location, PermissionGroup.locationAlways, PermissionGroup.locationWhenInUse]
              'PERMISSION_LOCATION=1',
              # dart: PermissionGroup.notification
              'PERMISSION_NOTIFICATIONS=1',
              # dart: PermissionGroup.appTrackingTransparency
              'PERMISSION_APP_TRACKING_TRANSPARENCY=1',
              # dart: PermissionGroup.contacts
              'PERMISSION_CONTACTS=1',
              ]
            end
           end
      end
end
end
darshankawar

darshankawar commented on Apr 3, 2023

@darshankawar
Member

The cocoapods issue seem to have been fixed but a new version is not out yet I think, so keep an eye on it and until that time, you may try to use workaround as mentioned here to get it working.

added
waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds
on Apr 3, 2023
jmagman

jmagman commented on Apr 3, 2023

@jmagman
Member

@darshankawar let's duplicate all of these CocoaPods/CocoaPods#11808 reports to #123890.

While this is a CocoaPods issue and has been fixed there, the Flutter team will investigate a workaround. Please follow along in #123890 for updates.

added
r: duplicateIssue is closed as a duplicate of an existing issue
and removed
waiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds
in triagePresently being triaged by the triage team
on Apr 4, 2023
ChegeBryan

ChegeBryan commented on Apr 8, 2023

@ChegeBryan

This #123852 worked for me for both iOS Target and Watch Target.

locked as resolved and limited conversation to collaborators on Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: duplicateIssue is closed as a duplicate of an existing issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jmagman@virtualmarc@hukusuke1007@ChegeBryan@cerberodev

        Issue actions

          Unable to archive with Xcode14.3. · Issue #123920 · flutter/flutter