-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Recreate Podfile to start fix macOS build. #64
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not able to build for macOS from this branch:
2021-12-05 21:26:48.934 xcodebuild[53479:6180733] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-19450/DTDeviceKitBase/DTDKRemoteDeviceData.m:373
Details: (null) deviceType from 00008110-00043848366A801E was NULL when -platform called.
Object: <DTDKMobileDeviceToken: 0x7f7a0e754df0>
Method: -platform
Thread: <NSThread: 0x6000004b7a40>{number = 2, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:x86_64, id:8A753909-8D24-51E5-B3BB-8190B9B7B920 }
{ platform:macOS, name:Any Mac }
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:26:6: error: enum cases with associated values cannot be marked potentially unavailable with '@available'
@available(iOS 13.0, macOS 10.15, *)
^
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:30:6: error: enum cases with associated values cannot be marked potentially unavailable with '@available'
@available(iOS 13.0, macOS 10.15, *)
^
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:36:6: error: enum cases with associated values cannot be marked potentially unavailable with '@available'
@available(iOS 13.0, macOS 10.15, *)
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:82:13: warning: switch must be exhaustive
switch code {
^
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:82:13: note: do you want to add missing cases?
switch code {
^
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
/Users/nils/Desktop/Projects/sharezone/sharezone-app/app/macos/Pods/Pods.xcodeproj: warning: The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET' is set to 10.6, but the range of supported deployment target versions is 10.9 to 12.0.99. (in target 'FMDB' from project 'Pods')
** BUILD FAILED **
When I add this lines in the macos/Podfile
:
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
target.build_configurations.each do |bc|
bc.build_settings['MACOSX_DEPLOYMENT_TARGET'] = '10.14'
end
end
end
I'm getting a different error:
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:x86_64, id:8A753909-8D24-51E5-B3BB-8190B9B7B920 }
{ platform:macOS, name:Any Mac }
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:26:6: error: enum cases with associated values cannot be marked potentially unavailable with '@available'
@available(iOS 13.0, macOS 10.15, *)
^
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:30:6: error: enum cases with associated values cannot be marked potentially unavailable with '@available'
@available(iOS 13.0, macOS 10.15, *)
^
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:36:6: error: enum cases with associated values cannot be marked potentially unavailable with '@available'
@available(iOS 13.0, macOS 10.15, *)
^
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:42:6: error: enum cases with associated values cannot be marked potentially unavailable with '@available'
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:82:13: warning: switch must be exhaustive
switch code {
^
/Users/nils/.pub-cache/hosted/pub.dartlang.org/sign_in_with_apple-2.5.4/macos/Classes/SignInWithAppleError.swift:82:13: note: do you want to add missing cases?
switch code {
^
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
Command CompileSwiftSources failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
** BUILD FAILED **
Exception: Build process failed
I had a slimier issue with the fix-ios-build
. An upgrade to the newest sign_in_with_apple
fixed it for me. But I think I will come into another error loop, similar to iOS, where I need to upgrade other packages. So I think I will continue the work on the fix-ios-build
branch (upgrading the packages) and then try again to build for macOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
After merging main
into this branch, it's working again for me :)
@nilsreichardt Can you check again if it works for you? I updated the podfile.lock Right now I get this error: firebase/flutterfire#7558 btw just out of nowhere... If it works for you then you can merge this PR. |
I tried it but, got an error with |
d5d6b04
to
4436b70
Compare
Visit the preview URL for this PR (updated for commit 720dc5f): https://sharezone-test--pr64-fix-macos-build-dk3v9218.web.app (expires Mon, 16 May 2022 14:47:13 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
For it's working again 👍 But the macoOS instantly crashes after opening:
Reading through firebase/firebase-ios-sdk#5423 I think this is an issue with M1. I would suggest fixing in another PR (I would try to update all of our Firebase Packages). @Jonas-Sander Can you try, if you can build for macOS with Intel? |
It builds, the application Sharezone app window shows up but the app itself is not shown. The window content stays gray though. Additionally the "Building macOS application...." dialog in VS Code never disappears. I get these logs: First try
Second try
|
@nilsreichardt Look at the |
sdk: flutter | ||
firebase_crashlytics: ^2.0.7 | ||
firebase_crashlytics: ^2.5.1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is not compatible with our Flutter version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's looks like that. I needed to upgrade firebase_crashlytics
, because they fixed in 2.5.1
a macOS bug. Should I open a new PR where we upgrade to the latest Flutter version (if possible)?
We are also facing this same issue. We are running a Firebase App and users apps are crashing in our latest iOS release.
Did updating the |
@MatthewCoetzee No, at the moment couldn't solve the issue yet 😞 My plan is to first merge this PR (scope of this PR to get our macOS app building again without build errors) and then I want to try to fix this issue in a different PR the Firestore issue. |
@nilsreichardt Awesome! 👍 |
@MatthewCoetzee I just saw that we have two different issues with Firestore (see error message). My issue just gone by running @Jonas-Sander So my previous comment is out to date. I can build for macOS and use the app (no instant crash) 👍 |
So you don't face the same problem as me? Does |
Our app is in production. Is it possible that the released version was built with an outdated library? |
@Jonas-Sander After merging #153 this branch now passes the CI :) I think we can merge this branch |
Somehow I still had the same errors when building again but after trying it more times time it worked.... Idk 🤷♂️. |
Maybe I will get the same error when continue working on #162. Let's see |
Building macOS on
main
resulted in the following errorThis seems to come from an old macOS Podfile. When Flutter creates a new Podfile many lines of code are not existing that we had in the Podfile in main.
With this PR I:
flutter pub get
).pod install
)With these fixes I can now build the
macOS
version again on my MacBook.