deniza / app_tracking_transparency

A Flutter plugin to show ios 14+ tracking authorization dialog.
https://pub.dev/packages/app_tracking_transparency/
MIT License
86 stars 29 forks source link

Import Error #16

Closed giorgio-borghetto closed 2 years ago

giorgio-borghetto commented 3 years ago

Good morning,

Once I build into Flutter, I receive this error:

Command CompileSwift failed with a nonzero exit code /Users/borghettogi/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/app_tracking_transparency-1.1.0+1/ios/Classes/SwiftAppTrackingTransparencyPlugin.swift:3:8: error: no such module 'AppTrackingTransparencyPlugin' import AppTrackingTransparencyPlugin

untp commented 3 years ago

Can you please try the latest version of this package? (app_tracking_transparency: ^2.0.0)

giorgio-borghetto commented 3 years ago

I've upgraded to the latest version, but the error is the same:

/Users/borghettogi/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/app_tracking_transparency-2.0.0+1/ios/Classes/SwiftAppTrackingTransparencyPlugin.swift:3:8: error: no such module 'AppTrackingTransparency' import AppTrackingTransparency

untp commented 3 years ago

Is your Xcode version 12.0+? Because AppTrackingTransparency is available on Xcode 12.

nektar95 commented 3 years ago

same error, xcode version 12.5

111110100 commented 3 years ago

Fixed mine by making sure the platform line in my Podfile is '9.0'. Also added AppTransparency.framework to Frameworks, Libraries, and Embedded Content under Targets/Runner/General.

Mapk26 commented 2 years ago

I had the same problem with iOS versions 12.5

Fixed with solution found on stackoverflow: https://stackoverflow.com/questions/64472144/ios-13-library-not-loaded-apptrackingtransparency-framework-apptrackingtransp

I didnt need to embed content, keeping it as "Do Not Embed"