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

Build error in Xcode 14 with square_in_app_payments-sqip_flutter_resource #200

Closed
jannisnikoy opened this issue Sep 29, 2022 · 9 comments
Closed
Labels
bug Something isn't working

Comments

@jannisnikoy
Copy link

jannisnikoy commented Sep 29, 2022

With Xcode 14, it seems that the sqip_flutter_resource pod needs signing when building to a device, resulting in the follow error:

Signing for "square_in_app_payments-sqip_flutter_resource" requires a development team. Select a development team in the Signing & Capabilities editor.  

Not sure if this is an issue that can/should be fixed within the Square SDK or if there is another way to deal with this. Never encountered this issue in Xcode 13.

I'm using the latest version of the Flutter plugin (1.7.5) in Xcode 14.0 (14A309)

@jannisnikoy jannisnikoy added the bug Something isn't working label Sep 29, 2022
@ElAdrixHD
Copy link

Try to put this in your podfile

if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
        target.build_configurations.each do |config|
            config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
           end
        end

inside of:
target.build_configurations.each do |config|

@jannisnikoy
Copy link
Author

@ElAdrixHD Thanks, this does seem to fix the build issues!

@CharmisG
Copy link
Collaborator

@ElAdrixHD Thank you !!
@jannisnikoy Is problem resolved ???

@jannisnikoy
Copy link
Author

@CharmisG Yeah, the solution provided by @ElAdrixHD resolves the problem for me 👍

@AbdrahumanFikry
Copy link

`flutter run
Changing current working directory to: /Users/abdelrahumanfikry/development/IGearTrade
Cleaning Xcode workspace... 6.3s
Deleting build... 122ms
Deleting .dart_tool... 2ms
Deleting Generated.xcconfig... 0ms
Deleting flutter_export_environment.sh... 0ms
Deleting Flutter.podspec... 0ms
Deleting .flutter-plugins-dependencies... 0ms
Deleting .flutter-plugins... 0ms
Changing current working directory to: /Users/abdelrahumanfikry/development/IGearTrade
Running "flutter pub get" in IGearTrade... 5.5s
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Running pod install... 13.7s
Running Xcode build...
Xcode build done. 20.8s
Failed to build iOS app
Error output from Xcode build:

** BUILD FAILED **

Xcode's output:

Writing result bundle at path:
/var/folders/j5/320_vdy93g7_9kk9ln3n47200000gn/T/flutter_tools.hEyCBZ/flutter_ios_build_temp_dirANYwdw/temporary_xcresult_bundle

In file included from
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/SquareInAppPaymentsFlutterPlugin.m:
19:
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: note: insert
'_Nullable' if the pointer may be null
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
                                                     _Nullable
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: note: insert
'_Nonnull' if the pointer should never be null
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
                                                     _Nonnull
1 warning generated.
In file included from
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.m:17:
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: note: insert
'_Nullable' if the pointer may be null
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
                                                     _Nullable
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: note: insert
'_Nonnull' if the pointer should never be null
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
                                                     _Nonnull
1 warning generated.
In file included from
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/SquareInAppPaymentsFlutterPlugin.m:
19:
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: note: insert
'_Nullable' if the pointer may be null
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
                                                     _Nullable
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: note: insert
'_Nonnull' if the pointer should never be null
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
                                                     _Nonnull
1 warning generated.
In file included from
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.m:17:
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: warning:
pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: note: insert
'_Nullable' if the pointer may be null
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
                                                     _Nullable
/Users/abdelrahumanfikry/development/flutter/.pub-cache/hosted/pub.dartlang.org/square_in_app_payments-1.7.5/ios/Classes/FSQIPApplePay.h:23:53: note: insert
'_Nonnull' if the pointer should never be null
- (void)initWithMethodChannel:(FlutterMethodChannel *)channel;
                                                    ^
                                                     _Nonnull
1 warning generated.
ld: warning: ignoring file
/Users/abdelrahumanfikry/development/IGearTrade/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/SquareBuyerVerificationSDK/SquareBuyerVerificationS
DK.framework/SquareBuyerVerificationSDK, building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64
ld: warning: ignoring file
/Users/abdelrahumanfikry/development/IGearTrade/build/ios/Debug-iphonesimulator/XCFrameworkIntermediates/SquareInAppPaymentsSDK/SquareInAppPaymentsSDK.frame
work/SquareInAppPaymentsSDK, building for iOS Simulator-arm64 but attempting to link with file built for iOS Simulator-x86_64
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SQIPApplePayNonceRequest", referenced from:
      objc-class-ref in FSQIPApplePay.o
  "_OBJC_CLASS_$_SQIPBuyerAction", referenced from:
      objc-class-ref in FSQIPCardEntry.o
  "_OBJC_CLASS_$_SQIPBuyerVerificationSDK", referenced from:
      objc-class-ref in FSQIPCardEntry.o
  "_OBJC_CLASS_$_SQIPCard", referenced from:
      __OBJC_$_CATEGORY_SQIPCard_$_FSQIPAdditions in SQIPCard+FSQIPAdditions.o
  "_OBJC_CLASS_$_SQIPCardDetails", referenced from:
      __OBJC_$_CATEGORY_SQIPCardDetails_$_FSQIPAdditions in SQIPCardDetails+FSQIPAdditions.o
  "_OBJC_CLASS_$_SQIPCardEntryViewController", referenced from:
      objc-class-ref in FSQIPCardEntry.o
  "_OBJC_CLASS_$_SQIPContact", referenced from:
      objc-class-ref in FSQIPCardEntry.o
  "_OBJC_CLASS_$_SQIPInAppPaymentsSDK", referenced from:
      objc-class-ref in FSQIPApplePay.o
      objc-class-ref in SquareInAppPaymentsFlutterPlugin.o
  "_OBJC_CLASS_$_SQIPMoney", referenced from:
      objc-class-ref in FSQIPCardEntry.o
  "_OBJC_CLASS_$_SQIPSecureRemoteCommerce", referenced from:
      objc-class-ref in FSQIPSecureRemoteCommerce.o
  "_OBJC_CLASS_$_SQIPTheme", referenced from:
      objc-class-ref in FSQIPCardEntry.o
  "_OBJC_CLASS_$_SQIPVerificationParameters", referenced from:
      objc-class-ref in FSQIPCardEntry.o
  "_SQIPErrorDebugCodeKey", referenced from:
      ___80-[FSQIPApplePay paymentAuthorizationViewController:didAuthorizePayment:handler:]_block_invoke in FSQIPApplePay.o
      ___64-[FSQIPCardEntry cardEntryViewController:didCompleteWithStatus:]_block_invoke.21 in FSQIPCardEntry.o
      ___110-[FSQIPCardEntry startBuyerVerificationFlow:buyerActionString:moneyMap:locationId:contactMap:paymentSourceId:]_block_invoke.52 in
      FSQIPCardEntry.o
      ___62-[FSQIPSecureRemoteCommerce startSecureRemoteCommerce:amount:]_block_invoke in FSQIPSecureRemoteCommerce.o
  "_SQIPErrorDebugMessageKey", referenced from:
      ___80-[FSQIPApplePay paymentAuthorizationViewController:didAuthorizePayment:handler:]_block_invoke in FSQIPApplePay.o
      ___64-[FSQIPCardEntry cardEntryViewController:didCompleteWithStatus:]_block_invoke.21 in FSQIPCardEntry.o
      ___110-[FSQIPCardEntry startBuyerVerificationFlow:buyerActionString:moneyMap:locationId:contactMap:paymentSourceId:]_block_invoke.52 in
      FSQIPCardEntry.o
      ___62-[FSQIPSecureRemoteCommerce startSecureRemoteCommerce:amount:]_block_invoke in FSQIPSecureRemoteCommerce.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Building targets in dependency order
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'nanopb' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'SwiftyGif' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'SDWebImage' from project 'Pods')
warning: Run script build phase 'Run Script' will be run during every build because it does not specify any outputs. To address this warning, either add
output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target
'Runner' from project 'Runner')
warning: Run script build phase 'Thin Binary' will be run during every build because it does not specify any outputs. To address this warning, either add
output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target
'Runner' from project 'Runner')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'PromisesObjC' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'GoogleUtilities' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'GoogleDataTransport' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
10.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'FirebaseMessaging' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'FirebaseInstallations' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'FirebaseCoreInternal' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'FirebaseCore' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
8.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'FMDB' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'DKPhotoGallery-DKPhotoGallery' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'DKPhotoGallery' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'DKImagePickerController-DKImagePickerController' from project
'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
9.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'DKImagePickerController' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
10.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'FirebaseAnalytics' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
10.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'Firebase' from project 'Pods')
/Users/abdelrahumanfikry/development/IGearTrade/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to
10.0, but the range of supported deployment target versions is 11.0 to 16.0.99. (in target 'GoogleAppMeasurement' from project 'Pods')

Result bundle written to path:
    /var/folders/j5/320_vdy93g7_9kk9ln3n47200000gn/T/flutter_tools.hEyCBZ/flutter_ios_build_temp_dirANYwdw/temporary_xcresult_bundle

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPApplePayNonceRequest

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPBuyerAction

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPBuyerVerificationSDK

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPCard

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPCardDetails

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPCardEntryViewController

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPContact

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPInAppPaymentsSDK

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPMoney

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPSecureRemoteCommerce

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPTheme

Error (Xcode): Undefined symbol: OBJC_CLASS$_SQIPVerificationParameters

Error (Xcode): Undefined symbol: _SQIPErrorDebugCodeKey

Error (Xcode): Undefined symbol: _SQIPErrorDebugMessageKey

Could not build the application for the simulator.
Error launching application on iPhone 14 Pro Max.
`

@ElAdrixHD This issue happened in build

@drashti-teco
Copy link

drashti-teco commented Oct 28, 2022

Hello @ElAdrixHD
Can you please tell me how you solved above issue?
I have tried like below..

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    target.build_configurations.each do |config|
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
            target.build_configurations.each do |config|
                config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
               end
            end
    end
  end
end

But still getting error of Undefined symbol

@ElAdrixHD
Copy link

Try this:

target.build_configurations.each do |config|
      config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64" #add this line
    end

@drashti-teco
Copy link

drashti-teco commented Oct 28, 2022

Hey @ElAdrixHD
After applied above solution,

post_install do |installer|
    installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
       target.build_configurations.each do |config|
                config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
       end
  end
end

Now, I am getting only below errors. and others are solved.

Uncategorized (Xcode): Command CompileSwiftSources failed with a nonzero exit code

Error (Xcode): Undefined symbol: _FlutterMethodNotImplemented

Error (Xcode): Undefined symbol: OBJC_CLASS$_FlutterMethodChannel

Error (Xcode): Undefined symbol: OBJC_CLASS$_FlutterError

Do you have idea of these errors?

@ElAdrixHD
Copy link

I don't have any idea. Maybe this post could help you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants