GoogleAnalytics-IDFA xcframework
This is an xcframework
wrapper (SPM ready) around GoogleAnalytics.framework
and libAdIdAccessLibrary.a
.
The package contains both GoogleAnalytics.xcframework
and libAdIdAccessLibrary.xcframework
(if you would like your application to access the identifier for advertisers (IDFA), the libAdIdAccessLibrary
contains functions that call the AdSupport
framework).
How To for nerds
- Download
GoogleAnalytics
from here andlibAdIdAccessLibrary
from here. - Unzip the packages:
GoogleAnalytics
is already a.xcframework
, insteadlibAdIdAccessLibrary
is a (fat) static library (.a
) and it needs to be converted in.xcframework
as well. - Strip architectures from the fat framework:
iPhone Simulator
$ lipo libAdIdAccessLibrary.a -remove arm64 -remove armv7 -output iphonesimulator/libAdIdAccessLibrary.a
iPhone OS
$ lipo libAdIdAccessLibrary.a -remove i386 -remove x86_64 -output iphoneos/libAdIdAccessLibrary.a
Tip, check the correct archs using:
$ lipo -info iphonesimulator/libAdIdAccessLibrary.a
Architectures in the fat file: libAdIdAccessLibrary.a are: i386 x86_64
- Build the
.xcframework
:
$ xcodebuild -create-xcframework \
-library iphoneos/libAdIdAccessLibrary.a \
-library iphonesimulator/libAdIdAccessLibrary.a \
-output libAdIdAccessLibrary.xcframework
- Here we go..
libAdIdAccessLibrary.xcframework
has been created and it's ready to be used in the project/package (alongsideGoogleAnalytics.xcframework
)!
Specs
GoogleAnalytics.xcframework
├── Info.plist
├── ios-arm64_armv7
│ └── GoogleAnalytics.framework
│ ├── GoogleAnalytics
│ ├── Headers
│ │ ├── GAI.h
│ │ ├── GAIDictionaryBuilder.h
│ │ ├── GAIEcommerceFields.h
│ │ ├── GAIEcommerceProduct.h
│ │ ├── GAIEcommerceProductAction.h
│ │ ├── GAIEcommercePromotion.h
│ │ ├── GAIFields.h
│ │ ├── GAILogger.h
│ │ ├── GAITrackedViewController.h
│ │ ├── GAITracker.h
│ │ └── GoogleAnalytics-umbrella.h
│ ├── Info.plist
│ └── Modules
│ └── module.modulemap
├── ios-arm64_i386_x86_64-simulator
│ └── GoogleAnalytics.framework
│ ├── GoogleAnalytics
│ ├── Headers
│ │ ├── GAI.h
│ │ ├── GAIDictionaryBuilder.h
│ │ ├── GAIEcommerceFields.h
│ │ ├── GAIEcommerceProduct.h
│ │ ├── GAIEcommerceProductAction.h
│ │ ├── GAIEcommercePromotion.h
│ │ ├── GAIFields.h
│ │ ├── GAILogger.h
│ │ ├── GAITrackedViewController.h
│ │ ├── GAITracker.h
│ │ └── GoogleAnalytics-umbrella.h
│ ├── Info.plist
│ └── Modules
│ └── module.modulemap
└── ios-arm64_x86_64-maccatalyst
└── GoogleAnalytics.framework
├── GoogleAnalytics
├── Headers
│ ├── GAI.h
│ ├── GAIDictionaryBuilder.h
│ ├── GAIEcommerceFields.h
│ ├── GAIEcommerceProduct.h
│ ├── GAIEcommerceProductAction.h
│ ├── GAIEcommercePromotion.h
│ ├── GAIFields.h
│ ├── GAILogger.h
│ ├── GAITrackedViewController.h
│ ├── GAITracker.h
│ └── GoogleAnalytics-umbrella.h
├── Info.plist
└── Modules
└── module.modulemap
13 directories, 43 files
libAdIdAccessLibrary.xcframework
├── Info.plist
├── ios-arm64_armv7
│ └── libAdIdAccessLibrary.a
└── ios-i386_x86_64-simulator
└── libAdIdAccessLibrary.a
3 directories, 3 files
Versions
GoogleAnalytics
- 3.21.0 (latest available via CocoaPods)
libAdIdAccessLibrary
- 3.14.0 (latest available via CocoaPods)