appodeal / appodeal-ios-demo

Appodeal iOS SDK Demo Project
13 stars 7 forks source link

xCode 16 validation issue #72

Open r-andreyenko-bgapps opened 1 week ago

r-andreyenko-bgapps commented 1 week ago
image

Appstore Connect could not be able validate IPA, that was built with xCode 16:

"Invalid Executable. The executable 'StyleMe.app/Frameworks/OMSDK_Appodeal.framework/OMSDK_Appodeal' contains bitcode"

There is discussion thread over there: https://forums.developer.apple.com/forums/thread/763562, where Apple engineer suggest to rebuild framework with disabled BITCODE flag. Looking forward for resolving of this issue.

Podfile that is used for build:

platform :ios, '16.0'

use_frameworks! inhibit_all_warnings!

source 'https://github.com/appodeal/CocoaPods.git' source 'https://cdn.cocoapods.org/'

install! 'cocoapods', :deterministic_uuids => false, :warn_for_multiple_pod_sources => false

def appodeal pod 'Appodeal', '3.3.2' pod 'APDAmazonAdapter', '3.3.2.0' pod 'APDAppLovinAdapter', '3.3.2.0' pod 'APDAppLovinMAXAdapter', '3.3.2.0' pod 'APDBidMachineAdapter', '3.3.2.0' pod 'APDBidonAdapter', '3.3.2.0' pod 'APDBigoAdsAdapter', '3.3.2.0' pod 'APDDTExchangeAdapter', '3.3.2.0' pod 'APDGoogleAdMobAdapter', '3.3.2.0' pod 'APDIABAdapter', '3.3.2.0' pod 'APDInMobiAdapter', '3.3.2.0' pod 'APDIronSourceAdapter', '3.3.2.0' pod 'APDMetaAudienceNetworkAdapter', '3.3.2.0' pod 'APDMintegralAdapter', '3.3.2.0' pod 'APDPangleAdapter', '3.3.2.0' pod 'APDUnityAdapter', '3.3.2.0' pod 'APDVungleAdapter', '3.3.2.0' pod 'APDYandexAdapter', '3.3.2.0' pod 'AmazonPublisherServicesSDK', '4.9.2' pod 'AppLovinMediationAmazonAdMarketplaceAdapter', '4.9.2.0' pod 'AppLovinMediationBidMachineAdapter', '2.6.0.0' pod 'AppLovinMediationFacebookAdapter', '6.15.0.0' pod 'AppLovinMediationFyberAdapter', '8.3.1.0' pod 'AppLovinMediationGoogleAdManagerAdapter', '11.5.0.0' pod 'AppLovinMediationGoogleAdapter', '11.5.0.0' pod 'AppLovinMediationInMobiAdapter', '10.7.2.0' pod 'AppLovinMediationIronSourceAdapter', '8.1.0.0.1' pod 'AppLovinMediationMintegralAdapter', '7.6.1.0.0' pod 'AppLovinMediationUnityAdsAdapter', '4.11.3.2' pod 'AppLovinMediationVungleAdapter', '7.3.0.0' pod 'AppLovinMediationYandexAdapter', '5.2.1.0' pod 'BidMachineAmazonAdapter', '2.6.0.1' pod 'BidMachineMetaAudienceAdapter', '2.6.0.0' pod 'BidMachineMintegralAdapter', '2.6.0.0' pod 'BidMachinePangleAdapter', '2.6.0.0' pod 'BidMachineVungleAdapter', '2.6.0.0' pod 'BidonAdapterAmazon', '0.6.0.0' pod 'BidonAdapterAppLovin', '0.6.0.0' pod 'BidonAdapterBidMachine', '0.6.0.0' pod 'BidonAdapterBigoAds', '0.6.0.0' pod 'BidonAdapterDTExchange', '0.6.0.0' pod 'BidonAdapterGoogleAdManager', '0.6.0.0' pod 'BidonAdapterGoogleMobileAds', '0.6.0.0' pod 'BidonAdapterInMobi', '0.6.0.0' pod 'BidonAdapterMetaAudienceNetwork', '0.6.0.0' pod 'BidonAdapterMintegral', '0.6.0.0' pod 'BidonAdapterUnityAds', '0.6.0.0' pod 'BidonAdapterVungle', '0.6.0.0' pod 'bigo-ads-max-adapter', '4.3.0.0' end

target 'StyleMe' do appodeal end

Thank you in advance!

EvgeniaGorbacheva commented 1 week ago

Hello! You can add post-install hook to the project Podfile, which strips bitcode from OMSDK_Appodeal binary, as a temporary solution. Also we will soon release a new version of the Appodeal SDK with full support for iOS 18.

post_install do |installer|
  xcframework_path = "#{installer.sandbox.root}/OMSDK_Appodeal"

  Dir.glob("#{xcframework_path}/**/*.framework/OMSDK_Appodeal").each do |binary|
    if File.exist?(binary)
      puts "Stripping bitcode from: #{binary}"
      system("xcrun bitcode_strip #{binary} -r -o #{binary}")
    end
  end
end
Boburshoh commented 1 week ago

Issue Description:

When adding the AppLovinMediationBidMachineAdapter pod to my Podfile in a Flutter project, I encountered the following error during the archiving process for TestFlight distribution:

Asset validation failed

Invalid Executable. The executable 'Runner.app/Frameworks/OMSDK_Appodeal.framework/OMSDK_Appodeal' contains bitcode.

Environment:

Steps to Reproduce:

  1. Add the following line to your Podfile: pod 'AppLovinMediationBidMachineAdapter'
  2. Run flutter pub get to fetch dependencies.
  3. Run pod install in the ios directory.
  4. Attempt to archive the project using Xcode for TestFlight submission.
  5. Observe the error message during the archiving process.

Solution:

To fix this issue, I added a post_install script to the Podfile that strips the bitcode from the OMSDK_Appodeal.framework after the pods are installed. Here is the code added to the Podfile:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'OMSDK_Appodeal'
      `xcrun -sdk iphoneos bitcode_strip -r Pods/OMSDK_Appodeal/OMSDK_Appodeal.xcframework/ios-arm64/OMSDK_Appodeal.framework/OMSDK_Appodeal -o Pods/OMSDK_Appodeal/OMSDK_Appodeal.xcframework/ios-arm64/OMSDK_Appodeal.framework/OMSDK_Appodeal`
    end
    flutter_additional_ios_build_settings(target)
  end
end