kmcgill88 / admob_flutter

Admob Flutter plugin that shows banner ads using native platform views.
https://pub.dartlang.org/packages/admob_flutter
ISC License
435 stars 151 forks source link

App wont run after adding admob_flutter in pubspec.yaml #236

Open josephfeleke opened 3 years ago

josephfeleke commented 3 years ago

after adding admob_flutter in pubspec.yaml my app doesn't run and i get this error

`Launching lib/main.dart on iPhone 8 in debug mode... Running Xcode build... Xcode build done. 114.5s Failed to build iOS app Error output from Xcode build: ↳ BUILD FAILED

Xcode's output: ↳ 8 warnings generated. /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_native_image-0.0.5+2/ios/Classes/FlutterNativeImagePlugin.m:77:19: warning: unused variable 'fileName' [-Wunused-variable] NSString fileName = [[fileArgument lastPathComponent] stringByDeletingPathExtension]; ^ 1 warning generated. /Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/libwebp/src/enc/backward_references_enc.c:663:12: warning: variable 'best_offset' may be uninitialized when used here [-Wconditional-uninitialized] (best_offset << MAX_LENGTH_BITS) | (uint32_t)best_length; ^~~ /Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/libwebp/src/enc/backward_references_enc.c:595:20: note: initialize the variable 'best_offset' to silence this warning int best_offset; ^ = 0 1 warning generated. /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:35:65: warning: 'kCGImagePropertyTIFFTileWidth' is only available on iOS 9.0 or newer [-Wunguarded-availability] SYStringSel(tileWidth): (NSString )kCGImagePropertyTIFFTileWidth, ^~~~~~~~~ In module 'ImageIO' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:10: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:147:34: note: 'kCGImagePropertyTIFFTileWidth' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0 IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFTileWidth IMAGEIO_AVAILABLE_STARTING(10.11, 9.0); ^ /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:35:65: note: enclose 'kCGImagePropertyTIFFTileWidth' in an @available check to silence this warning SYStringSel(tileWidth): (NSString )kCGImagePropertyTIFFTileWidth, ^~~~~~~~~ /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:36:65: warning: 'kCGImagePropertyTIFFTileLength' is only available on iOS 9.0 or newer [-Wunguarded-availability] SYStringSel(tileLength): (NSString )kCGImagePropertyTIFFTileLength, ^~~~~~~~~~ In module 'ImageIO' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:10: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:148:34: note: 'kCGImagePropertyTIFFTileLength' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0 IMAGEIO_EXTERN const CFStringRef kCGImagePropertyTIFFTileLength IMAGEIO_AVAILABLE_STARTING(10.11, 9.0); ^ /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataTIFF.m:36:65: note: enclose 'kCGImagePropertyTIFFTileLength' in an @available check to silence this warning SYStringSel(tileLength): (NSString )kCGImagePropertyTIFFTileLength, ^~~~~~~~~~ 2 warnings generated. /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataPNG.m:32:61: warning: 'kCGImagePropertyPNGCompressionFilter' is only available on iOS 9.0 or newer [-Wunguarded-availability] SYStringSel(compressionFilter): (NSString )kCGImagePropertyPNGCompressionFilter, ^~~~~~~~ In module 'ImageIO' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataPNG.h:10: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/ImageIO.framework/Headers/CGImageProperties.h:764:34: note: 'kCGImagePropertyPNGCompressionFilter' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0 IMAGEIO_EXTERN const CFStringRef kCGImagePropertyPNGCompressionFilter IMAGEIO_AVAILABLE_STARTING(10.11, 9.0); ^ /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataPNG.m:32:61: note: enclose 'kCGImagePropertyPNGCompressionFilter' in an @available check to silence this warning SYStringSel(compressionFilter): (NSString *)kCGImagePropertyPNGCompressionFilter, ^~~~~~~~ 1 warning generated. /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-0.7.0/ios/Classes/SYPictureMetadata/SYMetadataExif.m:9:9: warning: non-portable path to file '"SYMetadataExif.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]

import "SYMetadataEXIF.h"

        ^~~~~~~~~~~~~~~~~~
        "SYMetadataExif.h"
1 warning generated.
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.m:309:42: warning: comparison of distinct pointer types ('NSString *' and 'NSNull * _Nonnull') [-Wcompare-distinct-pointer-types]
    if (_stripeAccount && _stripeAccount != [NSNull null]) {
                          ~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.m:731:42: warning: 'startPollingSourceWithId:clientSecret:timeout:completion:' is deprecated: You should poll your own backend to update based on source status change webhook events it may receive. [-Wdeprecated-declarations]
                        [stripeAPIClient startPollingSourceWithId:sourceID clientSecret:clientSecret timeout:10 completion:^(STPSource *source, NSError *error) {
                                         ^
In module 'Stripe' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:11:
/Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/Stripe/Stripe/PublicHeaders/STPAPIClient.h:370:243: note: 'startPollingSourceWithId:clientSecret:timeout:completion:' has been explicitly marked deprecated here
- (void)startPollingSourceWithId:(NSString *)identifier clientSecret:(NSString *)secret timeout:(NSTimeInterval)timeout completion:(STPSourceCompletionBlock)completion NS_EXTENSION_UNAVAILABLE("Source polling is not available in extensions") DEPRECATED_MSG_ATTRIBUTE("You should poll your own backend to update based on source status change webhook events it may receive.");
                                                                                                                                                                                                                                                  ^
In module 'Foundation' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/AvailabilityMacros.h:182:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
            #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                               ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.m:798:20: warning: 'setPublishableKey:' is deprecated: If you used [STPPaymentConfiguration sharedConfiguration].publishableKey, use [STPAPIClient sharedClient].publishableKey instead. If you passed a STPPaymentConfiguration instance to an SDK component, create an STPAPIClient, set publishableKey on it, and set the SDK component's APIClient property. [-Wdeprecated-declarations]
    [configuration setPublishableKey:nextPublishableKey];
                   ^
In module 'Stripe' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:11:
/Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/Stripe/Stripe/PublicHeaders/STPPaymentConfiguration.h:126:50: note: property 'publishableKey' is declared deprecated here
@property (nonatomic, copy, readwrite) NSString *publishableKey DEPRECATED_MSG_ATTRIBUTE("If you used [STPPaymentConfiguration sharedConfiguration].publishableKey, use [STPAPIClient sharedClient].publishableKey instead. If you passed a STPPaymentConfiguration instance to an SDK component, create an STPAPIClient, set publishableKey on it, and set the SDK component's APIClient property.");
                                                 ^
/Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/Stripe/Stripe/PublicHeaders/STPPaymentConfiguration.h:126:65: note: 'setPublishableKey:' has been explicitly marked deprecated here
@property (nonatomic, copy, readwrite) NSString *publishableKey DEPRECATED_MSG_ATTRIBUTE("If you used [STPPaymentConfiguration sharedConfiguration].publishableKey, use [STPAPIClient sharedClient].publishableKey instead. If you passed a STPPaymentConfiguration instance to an SDK component, create an STPAPIClient, set publishableKey on it, and set the SDK component's APIClient property.");
                                                                ^
In module 'Foundation' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/AvailabilityMacros.h:182:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
            #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                               ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.m:1101:23: warning: 'metadata' is deprecated: Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead. [-Wdeprecated-declarations]
             TPSEntry(metadata),
                      ^
In module 'Stripe' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:11:
/Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/Stripe/Stripe/PublicHeaders/STPPaymentMethod.h:138:89: note: 'metadata' has been explicitly marked deprecated here
@property (nonatomic, nullable, readonly) NSDictionary<NSString*, NSString *> *metadata DEPRECATED_MSG_ATTRIBUTE("Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead.");
                                                                                        ^
In module 'Foundation' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/AvailabilityMacros.h:182:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
            #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                               ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.m:1374:16: warning: 'metadata' is deprecated: Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead. [-Wdeprecated-declarations]
    if (source.metadata) {
               ^
In module 'Stripe' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:11:
/Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/Stripe/Stripe/PublicHeaders/STPSource.h:143:89: note: 'metadata' has been explicitly marked deprecated here
@property (nonatomic, nullable, readonly) NSDictionary<NSString*, NSString *> *metadata DEPRECATED_MSG_ATTRIBUTE("Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead.");
                                                                                        ^
In module 'Foundation' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/AvailabilityMacros.h:182:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
            #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                               ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.m:1375:33: warning: 'metadata' is deprecated: Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead. [-Wdeprecated-declarations]
        [result setValue:source.metadata forKey:@"metadata"];
                                ^
In module 'Stripe' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:11:
/Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/Stripe/Stripe/PublicHeaders/STPSource.h:143:89: note: 'metadata' has been explicitly marked deprecated here
@property (nonatomic, nullable, readonly) NSDictionary<NSString*, NSString *> *metadata DEPRECATED_MSG_ATTRIBUTE("Metadata is no longer returned to clients using publishable keys. Retrieve them on your server using yoursecret key instead.");
                                                                                        ^
In module 'Foundation' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Darwin' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.6.sdk/usr/include/AvailabilityMacros.h:182:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
            #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                               ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.m:1728:16: warning: 'STPBillingAddressFieldsZip' is deprecated: Use STPBillingAddressFieldsPostalCode [-Wdeprecated-declarations]
        return STPBillingAddressFieldsZip;
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
               STPBillingAddressFieldsPostalCode
In module 'Stripe' imported from /Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/stripe_payment-1.0.7/ios/Classes/TPSStripeManager.h:11:
/Users/josephfeleke/Documents/Zaremart_1.7/ios/Pods/Stripe/Stripe/PublicHeaders/STPAddress.h:48:47: note: 'STPBillingAddressFieldsZip' has been explicitly marked deprecated here
    STPBillingAddressFieldsZip __attribute__((deprecated("Use STPBillingAddressFieldsPostalCode", "STPBillingAddressFieldsPostalCode"))) = STPBillingAddressFieldsPostalCode,
                                              ^
7 warnings generated.
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/admob_flutter-1.0.1/ios/Classes/SwiftAdmobFlutterPlugin.swift:21:8: error: no such module 'AppTrackingTransparency'
import AppTrackingTransparency
       ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/admob_flutter-1.0.1/ios/Classes/SwiftAdmobFlutterPlugin.swift:21:8: error: no such module 'AppTrackingTransparency'
import AppTrackingTransparency
       ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/admob_flutter-1.0.1/ios/Classes/SwiftAdmobFlutterPlugin.swift:21:8: error: no such module 'AppTrackingTransparency'
import AppTrackingTransparency
       ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/admob_flutter-1.0.1/ios/Classes/SwiftAdmobFlutterPlugin.swift:21:8: error: no such module 'AppTrackingTransparency'
import AppTrackingTransparency
       ^
/Users/josephfeleke/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/admob_flutter-1.0.1/ios/Classes/SwiftAdmobFlutterPlugin.swift:21:8: error: no such module 'AppTrackingTransparency'
import AppTrackingTransparency
       ^
Command CompileSwift failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description

Could not build the application for the simulator. Error launching application on iPhone 8. `

zmeggyesi commented 3 years ago

Do you have any customizations in your Podfile? Did your build do a pod install beforehand?

I've found that usually these come down to some CocoaPods screwups, and can usually be fixed by one of:

One of these usually fix similar errors for me, though I haven't seen your specific issue in my app.

josephfeleke commented 3 years ago

Ok thank you let me try that and ill let you know.

shimaatech commented 3 years ago

I had the same issue. It disappeared after updating to xcode 12