Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Unity framework in xcode gives build errors

Discussion in 'Unity Mediation' started by hawken, Aug 4, 2022.

  1. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    I get the following errors on a clean build after installing mediation, Xcode can't build. Any advice welcome.

    Unity 2019.4.40f1
    Mac osx 11.3.1
    Xcode 13.2.1

    minimum build target ios 13

    Screen Shot 2022-08-04 at 23.38.56.png
     
    Last edited: Aug 4, 2022
  2. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey @hawken,

    1. Could you also provide your Podfile and Podfile.lock files from your generated Xcode project?
    2. What version of EDM4U are you using?

    In essence what is happening, is that you have something that requires swift dependencies, but you are missing the project configuration to actually support swift.

    Thanks for reaching out, let us know.
     
  3. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    Hi @DeclanMcPartlin thanks for the reply,

    I checked in Unity for the Play services resolver version and it sent me here https://github.com/googlesamples/unity-jar-resolver

    I made a new project to test this:
    Unity 2019.4.40f1 & Unity 2020.3.36f1
    Mac osx 11.3.1
    Xcode 13.2.1
    CocoaPods 1.10.2

    Without mediation, it builds fine.

    After I install mediation, install the following adaptors:
    Unity Ads
    Admob
    Meta
    AdColony
    IronSource
    Applovin
    Vungle

    and build, Xcode give the same errors.

    Here is the podfile:
    Code (CSharp):
    1. source 'https://github.com/CocoaPods/Specs.git'
    2. platform :ios, '13.0'
    3.  
    4. target 'UnityFramework' do
    5.   pod 'Protobuf'
    6.   pod 'UnityMediationAdColonyAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    7.   pod 'UnityMediationAdmobAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    8.   pod 'UnityMediationAppLovinAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    9.   pod 'UnityMediationFacebookAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    10.   pod 'UnityMediationIronSourceAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    11.   pod 'UnityMediationSdk', '~> 0.5.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    12.   pod 'UnityMediationUnityAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    13.   pod 'UnityMediationVungleAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    14. end
    15.  
    16.  
    17. use_frameworks!
    18.  
    19. target 'Unity-iPhone' do
    20. end
    21.  
    22. post_install do |installer|
    23.   applicationTargets = [
    24.     'Pods-Unity-iPhone',
    25.   ]
    26.   libraryTargets = [
    27.     'Pods-UnityFramework',
    28.   ]
    29.  
    30.   embedded_targets = installer.aggregate_targets.select { |aggregate_target|
    31.     libraryTargets.include? aggregate_target.name
    32.   }
    33.   embedded_pod_targets = embedded_targets.flat_map { |embedded_target| embedded_target.pod_targets }
    34.   host_targets = installer.aggregate_targets.select { |aggregate_target|
    35.     applicationTargets.include? aggregate_target.name
    36.   }
    37.  
    38.   host_targets.each do |host_target|
    39.     host_target.xcconfigs.each do |config_name, config_file|
    40.       host_target.pod_targets.each do |pod_target|
    41.         if embedded_pod_targets.include? pod_target
    42.           pod_target.specs.each do |spec|
    43.             if spec.attributes_hash['ios'] != nil
    44.               frameworkPaths = spec.attributes_hash['ios']['vendored_frameworks']
    45.             else
    46.               frameworkPaths = spec.attributes_hash['vendored_frameworks']
    47.             end
    48.             if frameworkPaths != nil
    49.               frameworkNames = Array(frameworkPaths).map(&:to_s).map do |filename|
    50.                 extension = File.extname filename
    51.                 File.basename filename, extension
    52.               end
    53.               frameworkNames.each do |name|
    54.                 puts "Removing #{name} from OTHER_LDFLAGS of target #{host_target.name}"
    55.                 config_file.frameworks.delete(name)
    56.               end
    57.             end
    58.           end
    59.         end
    60.       end
    61.       xcconfig_path = host_target.xcconfig_path(config_name)
    62.       config_file.save_as(xcconfig_path)
    63.     end
    64.   end
    65. end
    66.  
    and the podfile lock

    Code (CSharp):
    1. PODS:
    2.   - AdColony (4.9.0)
    3.   - AppLovinSDK (11.4.3)
    4.   - FBAudienceNetwork (6.11.2)
    5.   - Google-Mobile-Ads-SDK (9.9.0):
    6.     - GoogleAppMeasurement (< 10.0, >= 7.0)
    7.     - GoogleUserMessagingPlatform (>= 1.1)
    8.   - GoogleAppMeasurement (9.4.0):
    9.     - GoogleAppMeasurement/AdIdSupport (= 9.4.0)
    10.     - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    11.     - GoogleUtilities/MethodSwizzler (~> 7.7)
    12.     - GoogleUtilities/Network (~> 7.7)
    13.     - "GoogleUtilities/NSData+zlib (~> 7.7)"
    14.     - nanopb (< 2.30910.0, >= 2.30908.0)
    15.   - GoogleAppMeasurement/AdIdSupport (9.4.0):
    16.     - GoogleAppMeasurement/WithoutAdIdSupport (= 9.4.0)
    17.     - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    18.     - GoogleUtilities/MethodSwizzler (~> 7.7)
    19.     - GoogleUtilities/Network (~> 7.7)
    20.     - "GoogleUtilities/NSData+zlib (~> 7.7)"
    21.     - nanopb (< 2.30910.0, >= 2.30908.0)
    22.   - GoogleAppMeasurement/WithoutAdIdSupport (9.4.0):
    23.     - GoogleUtilities/AppDelegateSwizzler (~> 7.7)
    24.     - GoogleUtilities/MethodSwizzler (~> 7.7)
    25.     - GoogleUtilities/Network (~> 7.7)
    26.     - "GoogleUtilities/NSData+zlib (~> 7.7)"
    27.     - nanopb (< 2.30910.0, >= 2.30908.0)
    28.   - GoogleUserMessagingPlatform (2.0.0)
    29.   - GoogleUtilities/AppDelegateSwizzler (7.7.0):
    30.     - GoogleUtilities/Environment
    31.     - GoogleUtilities/Logger
    32.     - GoogleUtilities/Network
    33.   - GoogleUtilities/Environment (7.7.0):
    34.     - PromisesObjC (< 3.0, >= 1.2)
    35.   - GoogleUtilities/Logger (7.7.0):
    36.     - GoogleUtilities/Environment
    37.   - GoogleUtilities/MethodSwizzler (7.7.0):
    38.     - GoogleUtilities/Logger
    39.   - GoogleUtilities/Network (7.7.0):
    40.     - GoogleUtilities/Logger
    41.     - "GoogleUtilities/NSData+zlib"
    42.     - GoogleUtilities/Reachability
    43.   - "GoogleUtilities/NSData+zlib (7.7.0)"
    44.   - GoogleUtilities/Reachability (7.7.0):
    45.     - GoogleUtilities/Logger
    46.   - IronSourceSDK (7.2.4.0)
    47.   - nanopb (2.30909.0):
    48.     - nanopb/decode (= 2.30909.0)
    49.     - nanopb/encode (= 2.30909.0)
    50.   - nanopb/decode (2.30909.0)
    51.   - nanopb/encode (2.30909.0)
    52.   - PromisesObjC (2.1.1)
    53.   - Protobuf (3.12.0)
    54.   - UnityAds (4.3.0)
    55.   - UnityMediationAdapter (3.0.1):
    56.     - UnityMediationLogging (~> 1.0)
    57.   - UnityMediationAdColonyAdapter (0.5.1):
    58.     - AdColony (~> 4.8)
    59.     - UnityMediationAdapter (~> 3.0)
    60.     - UnityMediationSdk (>= 0.5)
    61.   - UnityMediationAdmobAdapter (0.5.1):
    62.     - Google-Mobile-Ads-SDK (~> 9.0)
    63.     - UnityMediationAdapter (~> 3.0)
    64.     - UnityMediationSdk (>= 0.5)
    65.   - UnityMediationAppLovinAdapter (0.5.1):
    66.     - AppLovinSDK (~> 11.0)
    67.     - UnityMediationAdapter (~> 3.0)
    68.     - UnityMediationSdk (>= 0.5)
    69.   - UnityMediationFacebookAdapter (0.5.1):
    70.     - FBAudienceNetwork (~> 6.9)
    71.     - UnityMediationAdapter (~> 3.0)
    72.     - UnityMediationSdk (>= 0.5)
    73.   - UnityMediationIronSourceAdapter (0.5.0):
    74.     - IronSourceSDK (~> 7.1)
    75.     - UnityMediationAdapter (~> 3.0)
    76.     - UnityMediationSdk (>= 0.5)
    77.   - UnityMediationLogging (1.0.0)
    78.   - UnityMediationSdk (0.5.1):
    79.     - Protobuf (~> 3.12.0)
    80.     - UnityMediationAdapter (~> 3.0)
    81.     - UnityMediationLogging (~> 1.0)
    82.   - UnityMediationUnityAdapter (0.5.0):
    83.     - UnityAds (~> 4.1)
    84.     - UnityMediationAdapter (~> 3.0)
    85.     - UnityMediationSdk (>= 0.5)
    86.   - UnityMediationVungleAdapter (0.5.1):
    87.     - UnityMediationAdapter (~> 3.0)
    88.     - UnityMediationSdk (>= 0.5)
    89.     - VungleSDK-iOS (~> 6.11)
    90.   - VungleSDK-iOS (6.12.0)
    91.  
    92. DEPENDENCIES:
    93.   - Protobuf
    94.   - UnityMediationAdColonyAdapter
    95.   - UnityMediationAdmobAdapter
    96.   - UnityMediationAppLovinAdapter
    97.   - UnityMediationFacebookAdapter
    98.   - UnityMediationIronSourceAdapter
    99.   - UnityMediationSdk (~> 0.5.0)
    100.   - UnityMediationUnityAdapter
    101.   - UnityMediationVungleAdapter
    102.  
    103. SPEC REPOS:
    104.   https://github.com/CocoaPods/Specs:
    105.     - AdColony
    106.     - AppLovinSDK
    107.     - FBAudienceNetwork
    108.     - Google-Mobile-Ads-SDK
    109.     - GoogleAppMeasurement
    110.     - GoogleUserMessagingPlatform
    111.     - GoogleUtilities
    112.     - IronSourceSDK
    113.     - nanopb
    114.     - PromisesObjC
    115.     - Protobuf
    116.     - UnityAds
    117.     - VungleSDK-iOS
    118.   https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git:
    119.     - UnityMediationAdapter
    120.     - UnityMediationAdColonyAdapter
    121.     - UnityMediationAdmobAdapter
    122.     - UnityMediationAppLovinAdapter
    123.     - UnityMediationFacebookAdapter
    124.     - UnityMediationIronSourceAdapter
    125.     - UnityMediationLogging
    126.     - UnityMediationSdk
    127.     - UnityMediationUnityAdapter
    128.     - UnityMediationVungleAdapter
    129.  
    130. SPEC CHECKSUMS:
    131.   AdColony: 4f3738dc633d7aaa8ec60729df973076cc8e97ed
    132.   AppLovinSDK: 221dfbdff620be0ff227ed5b018b97b1f3d15713
    133.   FBAudienceNetwork: 4600bc7fa9bd925b1e397b7c9bbef02923062bbc
    134.   Google-Mobile-Ads-SDK: 8822993da940ab920bad131b5bffce7eb3f62c6a
    135.   GoogleAppMeasurement: 5d69e04287fc2c10cc43724bfa4bf31fc12c3dff
    136.   GoogleUserMessagingPlatform: ab890ce5f6620f293a21b6bdd82e416a2c73aeca
    137.   GoogleUtilities: e0913149f6b0625b553d70dae12b49fc62914fd1
    138.   IronSourceSDK: 7cc4c28187764dfdf900dbf3dbd063ba22296bab
    139.   nanopb: b552cce312b6c8484180ef47159bc0f65a1f0431
    140.   PromisesObjC: ab77feca74fa2823e7af4249b8326368e61014cb
    141.   Protobuf: 2793fcd0622a00b546c60e7cbbcc493e043e9bb9
    142.   UnityAds: 53f7a71da8a16b3eedb57d3930e672687939f643
    143.   UnityMediationAdapter: ea2a9f5510b4991ef981ea53469d32eeccd400a2
    144.   UnityMediationAdColonyAdapter: e880b4f43cbd41a469edfaade5503669603ca0fb
    145.   UnityMediationAdmobAdapter: 22a8d1996d67c4c76a777ad0a84045b35e46f51c
    146.   UnityMediationAppLovinAdapter: 3cfbd09e15245f7e109273aba1e38add050f7a09
    147.   UnityMediationFacebookAdapter: fbe09670da4399ea7339e32659713eb5f45ec746
    148.   UnityMediationIronSourceAdapter: cb75743d415a35a17801f151d6c2a1c2cb0f24fd
    149.   UnityMediationLogging: af0274f8b544950228abd302e793d5f43404b770
    150.   UnityMediationSdk: 44880c02548f05b0026a502440049c71159ce802
    151.   UnityMediationUnityAdapter: e606aba74a994abb9aa0bac674b6aaaa4e0699d4
    152.   UnityMediationVungleAdapter: 654aedbf2f740e6c4d554364cb9f3b1d9e0c5510
    153.   VungleSDK-iOS: 1936f966dd5828d171fc514343741480bf219496
    154.  
    155. PODFILE CHECKSUM: b8531429e3ff845c9acaf4341f23d8ab5f1d3d82
    156.  
    157. COCOAPODS: 1.10.2
     
    Last edited: Aug 12, 2022
  4. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey @hawken,

    Thank you for providing these files, all looks good on that end, so Podfile generation is not the issue. Looking at your cocoapods version, the issue might lie there. With the steps you provided, I'm able to build, the difference being that I'm using version 1.11.3, there have been swift specific fixes between the two versions (more info).

    I'd recommend updating cocoapods on your machine to v1.11.3 and let us know if you are still facing the same issues, thanks again for bringing this up!
     
    hawken likes this.
  5. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    Thanks for the reply, I'm going to try this out. For some reason I had to revert cocoapods a while back.
     
  6. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    Hi @DeclanMcPartlin

    I uninstalled my old cocoapods and installed 1.11.3 in terminal.

    Unity says pods are installed via the iOS resolver. When I build in Unity I get this error:

    Code (CSharp):
    1. iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.
    2.  
    3. After the failure, "pod repo update" was executed and succeeded. "pod install" was then attempted again, and still failed. This may be due to a broken CocoaPods installation. See: https://guides.cocoapods.org/using/troubleshooting.html for potential solutions.
    4.  
    5. pod install output:
    6.  
    7.  
    8.  
    9.     [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    10.     Consider adding the following to ~/.profile:
    11.  
    12.     export LANG=en_US.UTF-8
    13.     [0m
    14. /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    15.    from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `unicode_normalize'
    16.     from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `installation_root'
    17.    from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:226:in `podfile_path'
    18.     from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
    19.    from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:30:in `report'
    20.     from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
    21.    from /usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
    22.     from /usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
    23.    from /usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
    24.     from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    25.    from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    26.     from /usr/local/bin/pod:23:in `load'
    27.    from /usr/local/bin/pod:23:in `<main>'
    28. /usr/local/Cellar/ruby/2.7.2/lib/ruby/2.7.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    29.    from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `unicode_normalize'
    30.     from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:166:in `installation_root'
    31.    from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:226:in `podfile_path'
    32.     from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/config.rb:205:in `podfile'
    33.    from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
    34.     from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:46:in `run'
    35.    from /usr/local/lib/ruby/gems/2.7.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    36.     from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    37.    from /usr/local/lib/ruby/gems/2.7.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    38.     from /usr/local/bin/pod:23:in `load'
    39.    from /usr/local/bin/pod:23:in `<main>'
    40.  
    41.  
    42.  
    43. pod repo update output:
    44.  
    45.  
    46.  
    47.     [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    48.     Consider adding the following to ~/.profile:
    49.  
    50.     export LANG=en_US.UTF-8
    51.     [0m
    52.  
    53. UnityEngine.Debug:LogError (object)
    54. Google.Logger:Log (string,Google.LogLevel)
    55. Google.IOSResolver:Log (string,bool,Google.LogLevel)
    56. Google.IOSResolver:OnPostProcessInstallPods (UnityEditor.BuildTarget,string)
    57. UnityEditor.EditorApplication:Internal_CallGlobalEventHandler () (at /Users/bokken/buildslave/unity/build/Editor/Mono/EditorApplication.cs:442)
    58.  
    So I navigated to my xcode project folder in terminal and manually added these with:


    Code (CSharp):
    1. Mac-mini:~ me$ cd /project folder name
    2. Mac-mini:project folder name me$ pod repo update
    3. Mac-mini:project folder name me$ pod install
    4. Analyzing dependencies
    5. Cloning spec repo `cocoapods` from `https://github.com/CocoaPods/Specs.git`
    6. Cloning spec repo `unity-technologies-unity-mediation-cocoapods-prod` from `https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git`
    7. Downloading dependencies
    8. Installing AdColony (4.9.0)
    9. Installing AppLovinSDK (11.4.3)
    10. Installing FBAudienceNetwork (6.11.2)
    11. Installing Google-Mobile-Ads-SDK (9.9.0)
    12. Installing GoogleAppMeasurement (9.4.0)
    13. Installing GoogleUserMessagingPlatform (2.0.0)
    14. Installing GoogleUtilities (7.7.0)
    15. Installing IronSourceSDK (7.2.4.0)
    16. Installing PromisesObjC (2.1.1)
    17. Installing Protobuf (3.12.0)
    18. Installing UnityAds (4.3.0)
    19. Installing UnityMediationAdColonyAdapter (0.5.1)
    20. Installing UnityMediationAdapter (3.0.1)
    21. Installing UnityMediationAdmobAdapter (0.5.1)
    22. Installing UnityMediationAppLovinAdapter (0.5.1)
    23. Installing UnityMediationFacebookAdapter (0.5.1)
    24. Installing UnityMediationIronSourceAdapter (0.5.0)
    25. Installing UnityMediationLogging (1.0.0)
    26. Installing UnityMediationSdk (0.5.1)
    27. Installing UnityMediationUnityAdapter (0.5.0)
    28. Installing UnityMediationVungleAdapter (0.5.1)
    29. Installing VungleSDK-iOS (6.12.0)
    30. Installing nanopb (2.30909.0)
    31. Generating Pods project
    32. Removing AdColony from OTHER_LDFLAGS of target Pods-Unity-iPhone
    33. Removing AppLovinSDK from OTHER_LDFLAGS of target Pods-Unity-iPhone
    34. Removing FBAudienceNetwork from OTHER_LDFLAGS of target Pods-Unity-iPhone
    35. Removing GoogleAppMeasurementIdentitySupport from OTHER_LDFLAGS of target Pods-Unity-iPhone
    36. Removing GoogleAppMeasurement from OTHER_LDFLAGS of target Pods-Unity-iPhone
    37. Removing UserMessagingPlatform from OTHER_LDFLAGS of target Pods-Unity-iPhone
    38. Removing IronSource from OTHER_LDFLAGS of target Pods-Unity-iPhone
    39. Removing UnityAds from OTHER_LDFLAGS of target Pods-Unity-iPhone
    40. Removing UnityMediationAdColonyAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    41. Removing UnityMediationAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    42. Removing UnityMediationAdmobAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    43. Removing UnityMediationAppLovinAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    44. Removing UnityMediationFacebookAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    45. Removing UnityMediationIronSourceAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    46. Removing UnityMediationLogging from OTHER_LDFLAGS of target Pods-Unity-iPhone
    47. Removing UnityMediationSdk from OTHER_LDFLAGS of target Pods-Unity-iPhone
    48. Removing UnityMediationUnityAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    49. Removing UnityMediationVungleAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    50. Removing VungleSDK from OTHER_LDFLAGS of target Pods-Unity-iPhone
    51. Removing AdColony from OTHER_LDFLAGS of target Pods-Unity-iPhone
    52. Removing AppLovinSDK from OTHER_LDFLAGS of target Pods-Unity-iPhone
    53. Removing FBAudienceNetwork from OTHER_LDFLAGS of target Pods-Unity-iPhone
    54. Removing GoogleAppMeasurementIdentitySupport from OTHER_LDFLAGS of target Pods-Unity-iPhone
    55. Removing GoogleAppMeasurement from OTHER_LDFLAGS of target Pods-Unity-iPhone
    56. Removing UserMessagingPlatform from OTHER_LDFLAGS of target Pods-Unity-iPhone
    57. Removing IronSource from OTHER_LDFLAGS of target Pods-Unity-iPhone
    58. Removing UnityAds from OTHER_LDFLAGS of target Pods-Unity-iPhone
    59. Removing UnityMediationAdColonyAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    60. Removing UnityMediationAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    61. Removing UnityMediationAdmobAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    62. Removing UnityMediationAppLovinAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    63. Removing UnityMediationFacebookAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    64. Removing UnityMediationIronSourceAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    65. Removing UnityMediationLogging from OTHER_LDFLAGS of target Pods-Unity-iPhone
    66. Removing UnityMediationSdk from OTHER_LDFLAGS of target Pods-Unity-iPhone
    67. Removing UnityMediationUnityAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    68. Removing UnityMediationVungleAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    69. Removing VungleSDK from OTHER_LDFLAGS of target Pods-Unity-iPhone
    70. Removing AdColony from OTHER_LDFLAGS of target Pods-Unity-iPhone
    71. Removing AppLovinSDK from OTHER_LDFLAGS of target Pods-Unity-iPhone
    72. Removing FBAudienceNetwork from OTHER_LDFLAGS of target Pods-Unity-iPhone
    73. Removing GoogleAppMeasurementIdentitySupport from OTHER_LDFLAGS of target Pods-Unity-iPhone
    74. Removing GoogleAppMeasurement from OTHER_LDFLAGS of target Pods-Unity-iPhone
    75. Removing UserMessagingPlatform from OTHER_LDFLAGS of target Pods-Unity-iPhone
    76. Removing IronSource from OTHER_LDFLAGS of target Pods-Unity-iPhone
    77. Removing UnityAds from OTHER_LDFLAGS of target Pods-Unity-iPhone
    78. Removing UnityMediationAdColonyAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    79. Removing UnityMediationAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    80. Removing UnityMediationAdmobAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    81. Removing UnityMediationAppLovinAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    82. Removing UnityMediationFacebookAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    83. Removing UnityMediationIronSourceAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    84. Removing UnityMediationLogging from OTHER_LDFLAGS of target Pods-Unity-iPhone
    85. Removing UnityMediationSdk from OTHER_LDFLAGS of target Pods-Unity-iPhone
    86. Removing UnityMediationUnityAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    87. Removing UnityMediationVungleAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    88. Removing VungleSDK from OTHER_LDFLAGS of target Pods-Unity-iPhone
    89. Removing AdColony from OTHER_LDFLAGS of target Pods-Unity-iPhone
    90. Removing AppLovinSDK from OTHER_LDFLAGS of target Pods-Unity-iPhone
    91. Removing FBAudienceNetwork from OTHER_LDFLAGS of target Pods-Unity-iPhone
    92. Removing GoogleAppMeasurementIdentitySupport from OTHER_LDFLAGS of target Pods-Unity-iPhone
    93. Removing GoogleAppMeasurement from OTHER_LDFLAGS of target Pods-Unity-iPhone
    94. Removing UserMessagingPlatform from OTHER_LDFLAGS of target Pods-Unity-iPhone
    95. Removing IronSource from OTHER_LDFLAGS of target Pods-Unity-iPhone
    96. Removing UnityAds from OTHER_LDFLAGS of target Pods-Unity-iPhone
    97. Removing UnityMediationAdColonyAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    98. Removing UnityMediationAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    99. Removing UnityMediationAdmobAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    100. Removing UnityMediationAppLovinAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    101. Removing UnityMediationFacebookAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    102. Removing UnityMediationIronSourceAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    103. Removing UnityMediationLogging from OTHER_LDFLAGS of target Pods-Unity-iPhone
    104. Removing UnityMediationSdk from OTHER_LDFLAGS of target Pods-Unity-iPhone
    105. Removing UnityMediationUnityAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    106. Removing UnityMediationVungleAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    107. Removing VungleSDK from OTHER_LDFLAGS of target Pods-Unity-iPhone
    108. Integrating client project
    109.  
    110. [!] Please close any current Xcode sessions and use `Unity-iPhone.xcworkspace` for this project from now on.
    111. Pod installation complete! There are 9 dependencies from the Podfile and 23 total pods installed.
    112.  
    113. [!] Can't merge user_target_xcconfig for pod targets: ["FBAudienceNetwork", "UnityMediationAdColonyAdapter", "UnityMediationAdmobAdapter", "UnityMediationFacebookAdapter", "UnityMediationIronSourceAdapter", "UnityMediationVungleAdapter"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values.
    114.  
    115. [!] Can't merge user_target_xcconfig for pod targets: ["FBAudienceNetwork", "UnityMediationAdColonyAdapter", "UnityMediationAdmobAdapter", "UnityMediationFacebookAdapter", "UnityMediationIronSourceAdapter", "UnityMediationVungleAdapter"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values.
    116.  
    117. [!] Can't merge user_target_xcconfig for pod targets: ["FBAudienceNetwork", "UnityMediationAdColonyAdapter", "UnityMediationAdmobAdapter", "UnityMediationFacebookAdapter", "UnityMediationIronSourceAdapter", "UnityMediationVungleAdapter"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values.
    118.  
    119. [!] Can't merge user_target_xcconfig for pod targets: ["FBAudienceNetwork", "UnityMediationAdColonyAdapter", "UnityMediationAdmobAdapter", "UnityMediationFacebookAdapter", "UnityMediationIronSourceAdapter", "UnityMediationVungleAdapter"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values.
    120.  
    121. [!] Can't merge user_target_xcconfig for pod targets: ["FBAudienceNetwork", "UnityMediationAdColonyAdapter", "UnityMediationAdmobAdapter", "UnityMediationFacebookAdapter", "UnityMediationIronSourceAdapter", "UnityMediationVungleAdapter"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values.
    122.  
    123. [!] Can't merge user_target_xcconfig for pod targets: ["FBAudienceNetwork", "UnityMediationAdColonyAdapter", "UnityMediationAdmobAdapter", "UnityMediationFacebookAdapter", "UnityMediationIronSourceAdapter", "UnityMediationVungleAdapter"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values.
    124.  
    125. [!] Can't merge user_target_xcconfig for pod targets: ["FBAudienceNetwork", "UnityMediationAdColonyAdapter", "UnityMediationAdmobAdapter", "UnityMediationFacebookAdapter", "UnityMediationIronSourceAdapter", "UnityMediationVungleAdapter"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values.
    126.  
    127. [!] Can't merge user_target_xcconfig for pod targets: ["FBAudienceNetwork", "UnityMediationAdColonyAdapter", "UnityMediationAdmobAdapter", "UnityMediationFacebookAdapter", "UnityMediationIronSourceAdapter", "UnityMediationVungleAdapter"]. Singular build setting EXCLUDED_ARCHS[sdk=iphonesimulator*] has different values.
    And when I built, Unity failed again with the same message.

    Any advice welcome
     
    Last edited: Aug 16, 2022
  7. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey @hawken,

    Thanks for the reply.

    The fact that you get different outcomes between the two attempts tells me you probably have either two installed versions of Cocoapods, or the shells differ between Terminal and Unity. Either way, in your Unity log, there is an important warning from Cocoapods that you really should follow, solutions are pointed out here. Restarting the Unity Editor is required, or at least restarting the Unity Editor shell I believe. Once you're able to build from Unity again, let us know if that successful build still fails in Xcode, thanks!
     
  8. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    The strange thing is, I already have that line of code in my .profile

    I still get the same errors in Unity.

    I'll upgrade OSX and see what difference that makes, I'm still on Big Sur.
     
  9. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    @DeclanMcPartlin do you have a minimum spec for Unity Mediation on iOS / OSX? It's obviously not working for me my current set up. Would be good to know what is the minimum tested:
    - Unity
    - OSX
    - iOS
    - Xcode
    - Cocoapods

    I can't find this information on the mediation docs.
     
  10. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey. @hawken,

    If you're still getting that same error even though you have that set in your .profile file, the default shell that Unity is using is probably not a shell that reads from the .profile file. If you are using some other shell, I'd recommend setting the required settings in that shell settings file also (I can only guess since this is based on your setup, but popular shells would use: ~/.zshrc, .bashrc, or .bash_profile). This issue is specifically regarding Cocoapods and the shell you use, it doesn't have anything to do with Unity specifically.

    Regarding the minimum tested versions, we keep track of this here.

    I hope that helps, let us know. Thanks!
     
  11. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    @DeclanMcPartlin Thanks for the update.

    Turns out I was using .bash_profile (somehow... not well versed in this stuff tbh). Changing this fixed the problem entirely.

    Maybe it is worth add Cocoapods and Xcode version to that page? In this thread we discovered there is a minimum version required by Unity Mediation but it's not listed on that page.
     
    Last edited: Aug 24, 2022
  12. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey @hawken,

    Yeah that's a good point, I'll look into adding this. Glad to hear it works!

    Best regards,
     
  13. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    Hi @DeclanMcPartlin On Xcode Version 13.2.1 when I archive I get the following error:
    Code (CSharp):
    1. could not reparse object file in bitcode bundle: 'Invalid bitcode version (Producer: '1316.0.21.2.5_0' Reader: '1300.0.29.30_0')', using libLTO version 'LLVM version 13.0.0, (clang-1300.0.29.30)' for architecture arm64
    which means some part of the cocoapods was made with an older or newer version of Xcode.

    Could you confirm what is the lowest version of Xcode to use Unity Mediation?
     
  14. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey @hawken,

    Due to some of our dependencies (other ad networks) the lowest supported version of Xcode is 13.3 (as of writing this message), the documentation will be updated shortly, thanks for pointing that out!
     
    hawken likes this.
  15. hawken

    hawken

    Joined:
    Aug 22, 2013
    Posts:
    759
    Thanks for the info!

    @DeclanMcPartlin this also means Unity Mediation apps can't be built on OSX Big Sur, Xcode 13.3 requires OSX Monterey
     
    Last edited: Sep 8, 2022
  16. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey @hawken,

    I believe you are correct. This restriction though is due to our downstream dependencies, other ad networks, so it is out of our hands I'm afraid. Using just Unity Mediation and Unity Ads should have more backwards compatibility though.
     
  17. chem_83

    chem_83

    Joined:
    May 10, 2022
    Posts:
    1
    First time ever writing in a forum. hope I get it right.
    @hawken can you explain how you solved this issue? I have the same exact problem. I don't know what a .bash_profile is and what is shell settings file or where to find it. thank you
     
    Last edited: Oct 2, 2022
  18. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey @chem_83,

    Take a look at the link provided here. In terms of the location of the shell settings file, look in the locations:
    • ~/.profile
    • ~/.zshrc
    • ~/.bashrc
    • ~/.bash_profile
    If this still doesn't fix your issue, I recommend continuing your search for the solution on stack overflow, since this is a Cocoapods specific issue, this is not specific to Unity Mediation, thanks!
     
  19. TheLUNARTICK

    TheLUNARTICK

    Joined:
    Feb 15, 2014
    Posts:
    3
    I have been having the same issue. I have been following this thread. Thank you @DeclanMcPartlin for listing the shell sources. By way of the cocoapods install documentation I created my own ~/.zshrc.

    This my have been my first mistake.
     
unityunity