Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example does not compile for ios #106

Closed
peter-meemo opened this issue May 30, 2019 · 2 comments · Fixed by #108
Closed

Example does not compile for ios #106

peter-meemo opened this issue May 30, 2019 · 2 comments · Fixed by #108

Comments

@peter-meemo
Copy link

Compiling from Android Studio 3.4, xcode 10.1

Launching lib/main.dart on iPhone XR in debug mode...
Running pod install...
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Fetching external sources
    -> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
    -> Fetching podspec for `flutter_inappbrowser` from `.symlinks/plugins/flutter_inappbrowser/ios`

    Resolving dependencies of `Podfile`

    Comparing resolved specification to the sandbox manifest
      A Flutter
      A flutter_inappbrowser

    Downloading dependencies

    -> Installing Flutter (1.0.0)

    -> Installing flutter_inappbrowser (0.0.1)
      - Running pre install hooks

    Generating Pods project
      - Creating Pods project
      - Adding source files to Pods project
      - Adding frameworks to Pods project
      - Adding libraries to Pods project
      - Adding resources to Pods project
      - Adding development pod helper files to Pods project
      - Linking headers
      - Installing targets
        - Installing target `Flutter` iOS 8.0
        - Installing target `flutter_inappbrowser` iOS 8.0
          - Generating module map file at `Pods/Target Support Files/flutter_inappbrowser/flutter_inappbrowser.modulemap`
          - Generating umbrella header at `Pods/Target Support Files/flutter_inappbrowser/flutter_inappbrowser-umbrella.h`
          - Generating Info.plist file at `Pods/Target Support Files/flutter_inappbrowser/flutter_inappbrowser-Info.plist`
          - Generating dummy source at `Pods/Target Support Files/flutter_inappbrowser/flutter_inappbrowser-dummy.m`
        - Installing target `Pods-Runner` iOS 9.0
          - Generating Info.plist file at `Pods/Target Support Files/Pods-Runner/Pods-Runner-Info.plist`
          - Generating module map file at `Pods/Target Support Files/Pods-Runner/Pods-Runner.modulemap`
          - Generating umbrella header at `Pods/Target Support Files/Pods-Runner/Pods-Runner-umbrella.h`
          - Generating dummy source at `Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m`
      - Running post install hooks
    [!] An error occurred while processing the post-install hook of the Podfile.

    undefined method `headers_build_phase' for <PBXAggregateTarget name=`Flutter` UUID=`000000000360`>:Xcodeproj::Project::Object::PBXAggregateTarget

    /Users/peter/Documents/dev/repo/flutter_inappbrowser/example/ios/Podfile:62:in `block (3 levels) in from_ruby'
    /Users/peter/Documents/dev/repo/flutter_inappbrowser/example/ios/Podfile:61:in `each'
    /Users/peter/Documents/dev/repo/flutter_inappbrowser/example/ios/Podfile:61:in `block (2 levels) in from_ruby'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-core-1.6.1/lib/cocoapods-core/podfile.rb:179:in `post_install!'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:701:in `run_podfile_post_install_hook'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:689:in `block in run_podfile_post_install_hooks'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:145:in `message'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:688:in `run_podfile_post_install_hooks'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:211:in `block in generate_pods_project'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:208:in `generate_pods_project'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:139:in `install!'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
    /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'

    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:703:in `rescue in run_podfile_post_install_hook'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:700:in `run_podfile_post_install_hook'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:689:in `block in run_podfile_post_install_hooks'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:145:in `message'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:688:in `run_podfile_post_install_hooks'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:211:in `block in generate_pods_project'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:208:in `generate_pods_project'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:139:in `install!'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
    /Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
    /usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'

Error running pod install
Error launching application on iPhone XR.

@robsonmeemo
Copy link
Contributor

Remove:
target.headers_build_phase.files.each do |file|
file.settings = { 'ATTRIBUTES' => ['Public'] }
end

and it builds fine

Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants