gskinnerTeam / flutter-folio

A platform adaptive Flutter app for desktop, mobile and web.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not build on macOS

hffmnn opened this issue · comments

Running flutter run -d macos gives:

error: No signing certificate "Developer ID Application" found: No "Developer ID Application" signing certificate matching team ID "S3TL5AY6Y3" with a private key was found. (in target 'Runner' from project 'Runner')
** BUILD FAILED **  

I changed the Team in Xcode to None and the Signing Certificate to Sign to run locally. After that a flutter run -d macos gives the following:

Running pod install...                                             14.0s
ld: warning: dylib (/Users/christian/workspace/self/flutter/examples/flutter-folio/build/macos/Build/Products/Debug/FMDB/FMDB.framework/FMDB) was built for newer macOS version (10.12) than being linked (10.11)
ld: warning: dylib (/Users/christian/workspace/self/flutter/examples/flutter-folio/build/macos/Build/Products/Debug/BoringSSL-GRPC/openssl_grpc.framework/openssl_grpc) was built for newer macOS version (10.12) than being linked (10.9)
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:1111:7: Error: Struct 'ENUMLOGFONTEX' is empty. Empty structs are undefined behavior.
class ENUMLOGFONTEX extends Struct {                                    
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2835:7: Error: Struct 'BLUETOOTH_PIN_INFO' is empty. Empty structs are undefined behavior.
class BLUETOOTH_PIN_INFO extends Struct {                               
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2960:7: Error: Struct 'EXCEPINFO' is empty. Empty structs are undefined behavior.
class EXCEPINFO extends Struct {}                                       
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2966:7: Error: Struct 'PROPERTYKEY' is empty. Empty structs are undefined behavior.
class PROPERTYKEY extends Struct {}                                     
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2973:7: Error: Struct 'PROPVARIANT' is empty. Empty structs are undefined behavior.
class PROPVARIANT extends Struct {}                                     
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2978:7: Error: Struct 'SAFEARRAY' is empty. Empty structs are undefined behavior.
class SAFEARRAY extends Struct {}                                       
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2985:7: Error: Struct 'CLSID' is empty. Empty structs are undefined behavior.
class CLSID extends Struct {}                                           
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2992:7: Error: Struct 'STATSTG' is empty. Empty structs are undefined behavior.
class STATSTG extends Struct {}                                         
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/win32-1.7.4+1/lib/src/structs.dart:2999:7: Error: Struct 'NLM_SIMULATED_PROFILE_INFO' is empty. Empty structs are undefined behavior.
class NLM_SIMULATED_PROFILE_INFO extends Struct {}                      
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct 'Utf8' is empty. Empty structs are undefined behavior.
class Utf8 extends Struct {                                             
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error: Struct 'Utf16' is empty. Empty structs are undefined behavior.
class Utf16 extends Struct {                                            
      ^                                                                 
../../sdks/flutter_macos_2.0.0-stable/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error: Expected type 'T' to be a valid and instantiated subtype of 'NativeType'.
  final int totalSize = count * sizeOf<T>();                            
                                ^                                       
                                                                        
Command PhaseScriptExecution failed with a nonzero exit code            
note: Using new build system                                            
note: Building targets in parallel                                      
note: Planning build                                                    
note: Constructing build description                                    
** BUILD FAILED **                                                      
                                                                        
Building macOS application...                                           
Exception: Build process failed

Here's my flutter doctor output

❯ flutter doctor                                                                                                                                                                                                    
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, 2.1.0-10.0.pre, on macOS 11.2.1 20D74 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.54.0)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

Any ideas?

I have also encountered:

error: No signing certificate "Developer ID Application" found: No "Developer ID Application" signing certificate matching team ID "S3TL5AY6Y3" with a private key was found. (in target 'Runner' from project 'Runner')
** BUILD FAILED ** 

So I edited this file project.pbxproj,

diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj
index 7ddf124..1b61191 100644
--- a/macos/Runner.xcodeproj/project.pbxproj
+++ b/macos/Runner.xcodeproj/project.pbxproj
@@ -211,6 +211,7 @@
 					33CC10EC2044A3C60003C045 = {
 						CreatedOnToolsVersion = 9.2;
 						LastSwiftMigration = 1100;
+						ProvisioningStyle = Automatic;
 						SystemCapabilities = {
 							com.apple.Sandbox = {
 								enabled = 1;
@@ -437,8 +438,7 @@
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
 				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CODE_SIGN_IDENTITY = "Apple Development";
-				CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
+				CODE_SIGN_IDENTITY = "-";
 				COPY_PHASE_STRIP = NO;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				ENABLE_NS_ASSERTIONS = NO;
@@ -452,7 +452,6 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_CODE_SIGN_FLAGS = "--timestamp";
 				SDKROOT = macosx;
 				SWIFT_COMPILATION_MODE = wholemodule;
 				SWIFT_OPTIMIZATION_LEVEL = "-O";
@@ -466,22 +465,13 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
-				CODE_SIGN_IDENTITY = "Developer ID Application";
-				CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
-				CODE_SIGN_STYLE = Manual;
+				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
-				DEVELOPMENT_TEAM = S3TL5AY6Y3;
-				ENABLE_HARDENED_RUNTIME = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(PROJECT_DIR)/Flutter/ephemeral",
-				);
 				INFOPLIST_FILE = Runner/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/../Frameworks",
 				);
-				OTHER_CODE_SIGN_FLAGS = "--timestamp";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SWIFT_VERSION = 5.0;
 			};
@@ -521,8 +511,7 @@
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
 				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CODE_SIGN_IDENTITY = "Apple Development";
-				CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
+				CODE_SIGN_IDENTITY = "-";
 				COPY_PHASE_STRIP = NO;
 				DEBUG_INFORMATION_FORMAT = dwarf;
 				ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -543,7 +532,6 @@
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MTL_ENABLE_DEBUG_INFO = YES;
 				ONLY_ACTIVE_ARCH = YES;
-				OTHER_CODE_SIGN_FLAGS = "--timestamp";
 				SDKROOT = macosx;
 				SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -576,8 +564,7 @@
 				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
 				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
 				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CODE_SIGN_IDENTITY = "Apple Development";
-				CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
+				CODE_SIGN_IDENTITY = "-";
 				COPY_PHASE_STRIP = NO;
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
 				ENABLE_NS_ASSERTIONS = NO;
@@ -591,7 +578,6 @@
 				GCC_WARN_UNUSED_VARIABLE = YES;
 				MACOSX_DEPLOYMENT_TARGET = 10.11;
 				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_CODE_SIGN_FLAGS = "--timestamp";
 				SDKROOT = macosx;
 				SWIFT_COMPILATION_MODE = wholemodule;
 				SWIFT_OPTIMIZATION_LEVEL = "-O";
@@ -605,22 +591,13 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
-				CODE_SIGN_IDENTITY = "Developer ID Application";
-				CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
-				CODE_SIGN_STYLE = Manual;
+				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
-				DEVELOPMENT_TEAM = S3TL5AY6Y3;
-				ENABLE_HARDENED_RUNTIME = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(PROJECT_DIR)/Flutter/ephemeral",
-				);
 				INFOPLIST_FILE = Runner/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/../Frameworks",
 				);
-				OTHER_CODE_SIGN_FLAGS = "--timestamp";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
 				SWIFT_VERSION = 5.0;
@@ -634,22 +611,13 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
-				CODE_SIGN_IDENTITY = "Developer ID Application";
-				CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO;
-				CODE_SIGN_STYLE = Manual;
+				CODE_SIGN_STYLE = Automatic;
 				COMBINE_HIDPI_IMAGES = YES;
-				DEVELOPMENT_TEAM = S3TL5AY6Y3;
-				ENABLE_HARDENED_RUNTIME = YES;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"$(PROJECT_DIR)/Flutter/ephemeral",
-				);
 				INFOPLIST_FILE = Runner/Info.plist;
 				LD_RUNPATH_SEARCH_PATHS = (
 					"$(inherited)",
 					"@executable_path/../Frameworks",
 				);
-				OTHER_CODE_SIGN_FLAGS = "--timestamp";
 				PROVISIONING_PROFILE_SPECIFIER = "";
 				SWIFT_VERSION = 5.0;
 			};

Here is the error I am getting after that

/Users/a/Desktop/PL/flutter-folio/macos/Pods/BoringSSL-GRPC/src/ssl/t1_lib.cc:3319:9: error: use of undeclared identifier 'SSL_get_secure_renegotiation_support'; did you mean 'GRPC_SHADOW_SSL_get_secure_renegotiation_support'?
      !(SSL_get_secure_renegotiation_support(ssl) &&
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        GRPC_SHADOW_SSL_get_secure_renegotiation_support
In file included from /Users/aivan/Desktop/PL/flutter-folio/macos/Pods/BoringSSL-GRPC/src/ssl/t1_lib.cc:109:
/Users/a/Desktop/PL/flutter-folio/macos/Pods/BoringSSL-GRPC/src/include/openssl/ssl.h:4662:5: note: expanded from macro 'SSL_get_secure_renegotiation_support'
    SSL_get_secure_renegotiation_support
    ^
/Users/a/Desktop/PL/flutter-folio/macos/Pods/BoringSSL-GRPC/src/include/openssl/ssl.h:1590:20: note: 'GRPC_SHADOW_SSL_get_secure_renegotiation_support' declared here
OPENSSL_EXPORT int SSL_get_secure_renegotiation_support(const SSL *ssl);
                   ^
In file included from <built-in>:1:
/Users/a/Desktop/PL/flutter-folio/macos/Pods/Target Support Files/BoringSSL-GRPC/BoringSSL-GRPC-prefix.pch:2489:46: note: expanded from macro 'SSL_get_secure_renegotiation_support'
#define SSL_get_secure_renegotiation_support GRPC_SHADOW_SSL_get_secure_renegotiation_support
                                             ^
1 error generated.
note: Using new build system
note: Planning build
note: Constructing build description
** BUILD FAILED **

Here is my dev environment

[✓] Flutter (Channel stable, 2.0.1, on Mac OS X 10.14.6 18G8022 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[!] Xcode - develop for iOS and macOS
    ! Xcode 11.3.1 out of date (12.0.1 is recommended).
      Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.54.1)
[✓] Connected device (2 available)

! Doctor found issues in 1 category.

I also get the same errors and more, help, please...

I just forked the repo and followed all the necessary step but here is what I get 👇
Screenshot 2021-05-10 at 15 16 18

@esDotDev @cenomla

commented

If you open the project in Xcode, switch to automatic signing, choose your own development team, should work?

If you open the project in Xcode, switch to automatic signing, choose your own development team, should work?

I tried but this is what I get 👇👇👇👇 @esDotDev

Screenshot 2021-05-12 at 21 32 54

Screenshot 2021-05-12 at 21 35 57