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

Fix long iOS build times #19

Closed
nickmeinhold opened this issue Apr 12, 2020 · 0 comments · Fixed by #20
Closed

Fix long iOS build times #19

nickmeinhold opened this issue Apr 12, 2020 · 0 comments · Fixed by #20

Comments

@nickmeinhold
Copy link
Contributor

nickmeinhold commented Apr 12, 2020

The long build times are apparently due to cloud_firestore:
[cloud_firestore] Xcode build extremely slow · Issue #349 · FirebaseExtended/flutterfire

As suggested, I changed to using incremental installation but then was getting build errors as described here:
Could not access pods_project on post_install hooks when incremental_installation is enabled · Issue #8604 · CocoaPods/CocoaPods

When incremental_installation is enabled, CocoaPods doesn't generate Pods.xcodeproj when there are nothing changes between cached project.
In this case PodsProjectGeneratorResult#project become nil.

So installer#pods_project also become nil.

So my workaround was just to check that pods_project is not null, ie:

post_install do |installer|
  if installer.pods_project
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['ENABLE_BITCODE'] = 'NO'
      end
    end
  end
end

This seems to work but I don't know enough to be confident this is a good approach. We should be on the lookout for problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant