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

Question 'UnityMediationSdk/UnityMediationSdk.h' file not found

Discussion in 'Unity Mediation' started by danny_unity544, May 24, 2022.

  1. danny_unity544

    danny_unity544

    Joined:
    Dec 22, 2021
    Posts:
    4
    I installed Mediation via the "tarball method". I downloaded the .tgz and it now lives in my project in the Assets/Plugins/Mediation folder I have made. Pleasde see below:

    upload_2022-5-24_11-12-32.png

    I've added it via the package manager and it's all working perfectly in Editor. The problem is when I build it I get errors and also the cloud build is broken. It says 'UnityMediationSdk/UnityMediationSdk.h' file not found

    upload_2022-5-24_11-13-43.png

    upload_2022-5-24_11-14-29.png

    This also seems to mean that Cloud Build is broken too and seems to have different errors but I am guessing they are linked...

    upload_2022-5-24_11-15-11.png

    upload_2022-5-24_11-15-25.png
     
  2. danny_unity544

    danny_unity544

    Joined:
    Dec 22, 2021
    Posts:
    4
    Since moving to package manager manifest I seem to be getting these erros... Not sur eif better or worse

    upload_2022-5-24_11-58-51.png
     
  3. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
  4. danny_unity544

    danny_unity544

    Joined:
    Dec 22, 2021
    Posts:
    4
    It seems to be working when I switched off Admob in the mediations. Is this not working for some reason?
     
  5. pablo_leban

    pablo_leban

    Joined:
    Sep 19, 2013
    Posts:
    40
    Hey @DeclanMcPartlin.

    Same problem here. Can't get the .workspace because it's failing to build and I'm getting this:

    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. 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.
    3. pod install output:
    4. Analyzing dependencies
    5. [!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit_Basics":
    6.   In Podfile:
    7.     UnityMediationFacebookAdapter (~> 0.4.0) was resolved to 0.4.0, which depends on
    8.       FBAudienceNetwork (< 6.9, >= 6.3) was resolved to 6.8.0, which depends on
    9.         FBSDKCoreKit_Basics
    10.     UnityMediationFacebookAdapter (~> 0.4.0) was resolved to 0.4.0, which depends on
    11.       FBSDKCoreKit_Basics (~> 11.0)
    12. CocoaPods could not find compatible versions for pod "GoogleAppMeasurement":
    13.   In Podfile:
    14.     Firebase/Core (= 9.0.0) was resolved to 9.0.0, which depends on
    15.       FirebaseAnalytics (~> 9.0.0) was resolved to 9.0.0, which depends on
    16.         FirebaseAnalytics/AdIdSupport (= 9.0.0) was resolved to 9.0.0, which depends on
    17.           GoogleAppMeasurement (= 9.0.0)
    18.     UnityMediationAdmobAdapter (~> 0.4.0) was resolved to 0.4.0, which depends on
    19.       Google-Mobile-Ads-SDK (~> 8.2) was resolved to 8.4.0, which depends on
    20.         GoogleAppMeasurement (~> 7.0)
    21. CocoaPods could not find compatible versions for pod "nanopb":
    22.   In Podfile:
    23.     Firebase/Crashlytics (= 9.0.0) was resolved to 9.0.0, which depends on
    24.       FirebaseCrashlytics (~> 9.0.0) was resolved to 9.0.0, which depends on
    25.         GoogleDataTransport (~> 9.1) was resolved to 9.1.4, which depends on
    26.           nanopb (< 2.30910.0, >= 2.30908.0)
    27.     Firebase/Crashlytics (= 9.0.0) was resolved to 9.0.0, which depends on
    28.       FirebaseCrashlytics (~> 9.0.0) was resolved to 9.0.0, which depends on
    29.         nanopb (~> 2.30908.0)
    Mediation 0.4.1-preview.1, Unity 2021.3.3f1, macOS Monterey 12.4
     
    Last edited: May 25, 2022
  6. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hello @pablo_leban and @danny_unity544,

    Could you share your Podfile contents from the generated Xcode project and EDM4U (External Dependency Manager 4 Unity, also known as Play Services Resolver) versions to confirm what is going on? It is currently looking like there are some version conflicts.

    Thanks!
     
  7. pablo_leban

    pablo_leban

    Joined:
    Sep 19, 2013
    Posts:
    40
    Sure. This is what my Podfile looks like.

    Code (Boo):
    1. source 'https://cdn.cocoapods.org/'
    2. platform :ios, '12.0'
    3. target 'UnityFramework' do
    4.   pod 'Firebase/Auth', '9.0.0'
    5.   pod 'Firebase/Core', '9.0.0'
    6.   pod 'Firebase/Crashlytics', '9.0.0'
    7.   pod 'Firebase/Storage', '9.0.0'
    8.   pod 'Protobuf'
    9.   pod 'UnityMediationAdmobAdapter', '~> 0.4.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    10.   pod 'UnityMediationAppLovinAdapter', '~> 0.4.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    11.   pod 'UnityMediationFacebookAdapter', '~> 0.4.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    12.   pod 'UnityMediationSdk', '~> 0.4.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    13.   pod 'UnityMediationUnityAdapter', '~> 0.4.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    14. end
    15.  
    I'm using the latest version of EDM4U (1.2.171)

    Thank you!
     
    Last edited: May 26, 2022
  8. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

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

    Thank you for sharing this file, I can reproduce your situation. The reason for this is that the dependencies of Firebase conflict with the dependencies in Unity Mediation, due to the version restraint of the Admob SDK.

    A short term solution would be to keep Firebase locked to the 8.X versions (~> 8.0), these are still compatible with the currently supported Unity Mediation Admob versions. We are planning on releasing a new Admob adapter soon also, that will be compatible with the latest Firebase dependencies - we will keep you posted here in this thread regarding that.

    Thank you again for sharing this issue with us, we will prioritize the new Admob adapter due to this.
     
  9. pablo_leban

    pablo_leban

    Joined:
    Sep 19, 2013
    Posts:
    40
    Thanks for replying! I'm gonna wait for the fix from your side then as I need Firebase 9.0.0 because of a fix implemented in that version: https://github.com/firebase/firebase-unity-sdk/issues/133#issuecomment-1132289297

    Note that there's also a compatibility issue with Facebook's SDK:


    [*][!] CocoaPods could not find compatible versions for pod "FBSDKCoreKit_Basics":


    Not sure if you have to update the Meta adapter as well.

    Thank you anyway!
     
    Last edited: May 27, 2022
  10. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

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

    Thanks for pointing that out, after some testing, I noticed that once the Google dependencies were able to resolve, the other conflicts did not show up anymore either. I believe this is an erroneous error message coming from Cocoapods. Notice how for both FBSDKCoreKit_Basics and nanopb the versions actually do not clash, whereas GoogleAppMeasurement does.

    That being said, we will still update Facebook's SDK very soon as well.

    Thank you again for sharing!
     
  11. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

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

    The latest Unity Mediation package has been released (0.5.0), and with it, the iOS dependency versions have been increased to the latest versions. Feel free to update and let us know if you're still facing any native dependency conflicts. Thanks again for your patience!
     
    bsivko likes this.
  12. bsivko

    bsivko

    Joined:
    Jan 24, 2018
    Posts:
    8
    Last weeks, I had problems as it showed above, and I once resolved it with pos install dance and some other steps. However, about two weeks ago, the problems came up in a strict way, my archive build failed but iPhone was ok, and in a few days the build became failed too. There were no Firebase dependencies, but the description was the same.

    I postponed the project for a few weeks, and I back to it when 0.5.0 version appeared. I updated EDM4U to the last one (there was some problems nearby 169), next I cleaned up the project locally (kind of "git clone" and build from scratch), and the problems were resolved - run on iPhone, and archive works without any issues and additional steps.

    So, if someone has similar problems, I think it worth to update to the last one and clean up caches.

    Thank you for your work and the quick update!
     
    DeclanMcPartlin likes this.
  13. ExcaliburGames

    ExcaliburGames

    Joined:
    Oct 29, 2013
    Posts:
    48
    Hi @DeclanMcPartlin
    I have the same problem
    Unity 2021.3.2 Unity.Mediation 0.5-pre5

    INFO:root:xcodebuild: /Users/pepi/GoCD_Agent/******.xewq.intermediate/1_UnityOut/Libraries/com.unity.services.mediation/Runtime/Plugins/iOS/UMSPUnityMediation.mm:1:9: fatal error: 'UnityMediationSdk/UnityMediationSdk.h' file not found

    INFO:root:xcodebuild: #import <UnityMediationSdk/UnityMediationSdk.h>
    INFO:root:xcodebuild: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    INFO:root:xcodebuild: 1 error generated.
    INFO:root:xcodebuild:
    INFO:root:xcodebuild: ** ARCHIVE FAILED **
    INFO:root:xcodebuild:
    INFO:root:xcodebuild:
    INFO:root:xcodebuild: The following build commands failed:
    INFO:root:xcodebuild: CompileC /Users/pepi/Library/Developer/Xcode/DerivedData/Unity-iPhone-fgcxlxiioqrfdrbjqtiywtpcmaox/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/ReleaseForRunning-iphoneos/UnityFramework.build/Objects-normal/arm64/UMSPUnityMediation.o /Users/*****.xewq.intermediate/1_UnityOut/Libraries/com.unity.services.mediation/Runtime/Plugins/iOS/UMSPUnityMediation.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'UnityFramework' from project 'Unity-iPhone')

    can you help me with it ?
     
  14. kobeyMyhre

    kobeyMyhre

    Joined:
    Jan 21, 2017
    Posts:
    1
    I am having a similiar issue still. When I build for IOS it is not creating the workspace file for xCode, just the project file. In the Editor when I build I get "iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project". I've tried fresh re-installs of Play Services Resolver, Unity Mediation, and cocoapods but no improvements yet.
     
  15. Mighty-Vertex

    Mighty-Vertex

    Joined:
    Mar 4, 2015
    Posts:
    16
    I am having a similiar issue still with Medition 0.5.0. When I build for IOS it is not creating the workspace file for xCode. but when I uninstall the meta adapter, it works!
     
  16. MAWMatt

    MAWMatt

    Joined:
    Nov 10, 2016
    Posts:
    58
    I'm having the same issue using Unity 2020.3.36f1. I doesn't build a workspace file for me to open with, so I'm stuck just opening the xcode project directly, and then the error pops up...mediation header not found. Any new ideas on this?
     
  17. mmuller

    mmuller

    Joined:
    Nov 23, 2010
    Posts:
    91
    Same in Unity 2022.1.9f1 using Mediation 0.5.0 - preview 5 - no workspace file, no capability to build due to
    Code (CSharp):
    1. UnityMediationSdk.h
    missing
     
  18. MAWMatt

    MAWMatt

    Joined:
    Nov 10, 2016
    Posts:
    58
    I solved the problem by getting rid of the Play Resolver that I got from either the Mediation package or maybe even the Purchasing package. Either way, delete that folder entirely from your project and get the one from GitHub.

    Step Breakdown
    1. In your Unity project, delete the Play Resolver folder
    2. Go to https://github.com/googlesamples/unity-jar-resolver
    3. Click the green button, download the zip, unzip it.
    4. In Unity, go to Assets -> Import Package -> Custom Package.
    5. Select external-dependency-manager-latest.unitypackage

    Having the Resolver from this GitHub source instead of the one that came from Unity directly fixed my problem. When I build for iOS on my Mac now, the xcworkspace file is created. Opening that, there's no errors and everything works perfect.
     
    baracolabs likes this.
  19. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hey all,

    I wanted to share a quick troubleshooting guide regarding this specific error:
    UMSPUnityMediation.mm:1:9: fatal error: 'UnityMediationSdk/UnityMediationSdk.h' file not found 


    Checklist:
    1. First check that the xcworkspace file is being opened, not xcodeproj from your generated iOS project folder. With the default EDM4U settings, this will only open the xcode project of your app, not the cocoapods project, so this is important. (If you changed the default settings, I'll assume you know what you're doing).
    2. If you cannot locate the xcworkspace file in your generated iOS project folder, something went wrong at the generation step. Open the Unity Editor and copy paste the full cocoapods error log from your console to help us debug further.
    3. If you can locate the xcworkspace and you are still getting this error, provide the following details:
    • The Untiy Editor version
    • The Unity Mediation version
    • The EDM4U version
    • The contents of your Podfile and Podfile.lock (if applicable)
    This should save all of us time as we troubleshoot such issues together. Thanks!
     
  20. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hello @ExcaliburGames,

    Could you check the checklist in the post just above, and provide more details based on that?

    Thanks!
     
  21. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hello @kobeyMyhre,

    The error you have provided from the Unity Editor is more likely just the title. Click on that line and you should see the full error in the console window below. Copy paste that error message here so we can determine what issues cocoapods is having - thanks!
     
  22. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hello @Mighty-Vertex,

    As mentioned in my above posts, if you could provide the full error log message, we could potentially determine what is failing here, this should work regardless of if the Meta adapter is installed or not.

    Let us know, thanks.
     
  23. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

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

    Please check the Checklist above and provide us with that extra information so that we can continue to help you troubleshoot - thanks.
     
  24. BrutifulGames

    BrutifulGames

    Joined:
    Jan 14, 2013
    Posts:
    3
    I am having the same issues. Will post the requested information later today.
     
    DeclanMcPartlin likes this.
  25. Joni_no

    Joni_no

    Joined:
    Nov 4, 2018
    Posts:
    1
    Hi @DeclanMcPartlin, I have the xcworkspace file but keep getting the error:
    /.../Library/PackageCache/com.unity.services.mediation@0.5.1-preview.1/Runtime/Plugins/iOS/UMSPUnityMediation.mm:1:9: 'UnityMediationSdk/UnityMediationSdk.h' file not found

    • Unity version: 2021.3.2f1
    • Advertisement with Mediation: 0.5.1-preview.1
    • EDM4U: 1.2.170 (from github tags)
    Podfile:
    Code (CSharp):
    1. source 'https://cdn.cocoapods.org/'
    2. platform :ios, '12.0'
    3.  
    4. target 'UnityFramework' do
    5.   pod 'Protobuf'
    6.   pod 'UnityMediationSdk', '~> 0.5.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    7.   pod 'UnityMediationUnityAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    8. end
    9. target 'Unity-iPhone' do
    10. end
    11.  
    12.  
    13.  
    14. use_frameworks!
    15.  
    16. post_install do |installer|
    17.   applicationTargets = [
    18.     'Pods-Unity-iPhone',
    19.   ]
    20.   libraryTargets = [
    21.     'Pods-UnityFramework',
    22.   ]
    23.  
    24.   embedded_targets = installer.aggregate_targets.select { |aggregate_target|
    25.     libraryTargets.include? aggregate_target.name
    26.   }
    27.   embedded_pod_targets = embedded_targets.flat_map { |embedded_target| embedded_target.pod_targets }
    28.   host_targets = installer.aggregate_targets.select { |aggregate_target|
    29.     applicationTargets.include? aggregate_target.name
    30.   }
    31.  
    32.   host_targets.each do |host_target|
    33.     host_target.xcconfigs.each do |config_name, config_file|
    34.       host_target.pod_targets.each do |pod_target|
    35.         if embedded_pod_targets.include? pod_target
    36.           pod_target.specs.each do |spec|
    37.             if spec.attributes_hash['ios'] != nil
    38.               frameworkPaths = spec.attributes_hash['ios']['vendored_frameworks']
    39.             else
    40.               frameworkPaths = spec.attributes_hash['vendored_frameworks']
    41.             end
    42.             if frameworkPaths != nil
    43.               frameworkNames = Array(frameworkPaths).map(&:to_s).map do |filename|
    44.                 extension = File.extname filename
    45.                 File.basename filename, extension
    46.               end
    47.               frameworkNames.each do |name|
    48.                 puts "Removing #{name} from OTHER_LDFLAGS of target #{host_target.name}"
    49.                 config_file.frameworks.delete(name)
    50.               end
    51.             end
    52.           end
    53.         end
    54.       end
    55.       xcconfig_path = host_target.xcconfig_path(config_name)
    56.       config_file.save_as(xcconfig_path)
    57.     end
    58.   end
    59. end
    60.  
    Podfile.lock:
    Code (CSharp):
    1. PODS:
    2.   - Protobuf (3.12.0)
    3.   - UnityAds (4.3.0)
    4.   - UnityMediationAdapter (3.0.1):
    5.     - UnityMediationLogging (~> 1.0)
    6.   - UnityMediationLogging (1.0.0)
    7.   - UnityMediationSdk (0.5.1):
    8.     - Protobuf (~> 3.12.0)
    9.     - UnityMediationAdapter (~> 3.0)
    10.     - UnityMediationLogging (~> 1.0)
    11.   - UnityMediationUnityAdapter (0.5.0):
    12.     - UnityAds (~> 4.1)
    13.     - UnityMediationAdapter (~> 3.0)
    14.     - UnityMediationSdk (>= 0.5)
    15.  
    16. DEPENDENCIES:
    17.   - Protobuf
    18.   - UnityMediationSdk (~> 0.5.0)
    19.   - UnityMediationUnityAdapter
    20.  
    21. SPEC REPOS:
    22.   https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git:
    23.     - UnityMediationAdapter
    24.     - UnityMediationLogging
    25.     - UnityMediationSdk
    26.     - UnityMediationUnityAdapter
    27.   trunk:
    28.     - Protobuf
    29.     - UnityAds
    30.  
    31. SPEC CHECKSUMS:
    32.   Protobuf: 2793fcd0622a00b546c60e7cbbcc493e043e9bb9
    33.   UnityAds: 53f7a71da8a16b3eedb57d3930e672687939f643
    34.   UnityMediationAdapter: ea2a9f5510b4991ef981ea53469d32eeccd400a2
    35.   UnityMediationLogging: af0274f8b544950228abd302e793d5f43404b770
    36.   UnityMediationSdk: 44880c02548f05b0026a502440049c71159ce802
    37.   UnityMediationUnityAdapter: e606aba74a994abb9aa0bac674b6aaaa4e0699d4
    38.  
    39. PODFILE CHECKSUM: 58147099f0f37d3c189acda068e68a1adece43f9
    40.  
    41. COCOAPODS: 1.11.3
     
  26. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hi @Joni_no,

    Your files look good. Could you confirm that:
    • You are also opening the xcworkspace file in Xcode, not xcodeproj (I understand you can see the file is present, but I want to confirm it is also the file you're opening)
    • When you build for iOS from the Unity Editor, do you see any errors present in the console window?
    Thanks!
     
  27. baracolabs

    baracolabs

    Joined:
    Nov 13, 2016
    Posts:
    1
    After implementing Unity Mediation with only the AdMob adapter I was getting the error, following your steps fixed the problem completely. Thank you!
     
  28. CameronDWills

    CameronDWills

    Joined:
    Feb 26, 2021
    Posts:
    61
    I'm unable to get a xcworkspace file to generate, I'm getting the same error as the other poster "'pod' command not found; unable to generate a usable Xcode project."

    When I click the error for details, this is what I get:

    Code (CSharp):
    1.  
    2. 'pod' command not found; unable to generate a usable Xcode project.
    3. You can install CocoaPods with the Ruby gem package manager:
    4.  > sudo gem install -n /usr/local/bin cocoapods
    5.  > pod setup
    6. 0x00007ff7fbb2a2ad (Unity) StackWalker::GetCurrentCallstack
    7. 0x00007ff7fbb30fa9 (Unity) StackWalker::ShowCallstack
    8. 0x00007ff7fcad6003 (Unity) GetStacktrace
    9. 0x00007ff7fd188ee3 (Unity) DebugStringToFile
    10. 0x00007ff7fabf3816 (Unity) DebugLogHandler_CUSTOM_Internal_Log
    11. 0x000001edaef8bda3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
    12. 0x000001edaef8bcdb (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
    13. 0x000001edaef8ba60 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
    14. 0x000001edfd0c3745 (Mono JIT Code) UnityEngine.Debug:LogError (object)
    15. 0x000001edfe85a04b (Mono JIT Code) Google.Logger:Log (string,Google.LogLevel)
    16. 0x000001edff414572 (Mono JIT Code) Google.IOSResolver:Log (string,bool,Google.LogLevel)
    17. 0x000001edfd0bec6b (Mono JIT Code) Google.IOSResolver:RunPodCommandAsync (string,string,GooglePlayServices.CommandLine/CompletionHandler,bool,string)
    18. 0x000001edfd0be993 (Mono JIT Code) Google.IOSResolver:RunPodCommand (string,string,bool)
    19. 0x000001edfd0beb06 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_object_object_object_byte (object,intptr,intptr,intptr)
    20. 0x00007ffbae8002f4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    21. 0x00007ffbae73eb34 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    22. 0x00007ffbae745bcf (mono-2.0-bdwgc) [object.c:5777] mono_runtime_try_invoke_array
    23. 0x00007ffbae67ce90 (mono-2.0-bdwgc) [icall.c:4025] ves_icall_InternalInvoke
    24. 0x00007ffbae6a1681 (mono-2.0-bdwgc) [icall-def.h:687] ves_icall_InternalInvoke_raw
    25. 0x000001edab346160 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo:InternalInvoke (System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
    26. 0x000001edab3456db (Mono JIT Code) System.Reflection.RuntimeMethodInfo:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    27. 0x000001edab34559e (Mono JIT Code) System.Reflection.MethodBase:Invoke (object,object[])
    28. 0x000001edfd0be603 (Mono JIT Code) [PlayServicesResolverUtils.cs:109] PlayServicesResolver.Utils.Editor.PlayServicesResolverUtils:PodUpdate (string)
    29. 0x000001edfd0be47b (Mono JIT Code) [IosDependencyUpdatePostBuild.cs:17] Unity.Services.Mediation.Build.Editor.IosDependencyUpdatePostBuild:OnPostProcessBuild (UnityEditor.BuildTarget,string)
    30. 0x000001edfd0bca89 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_object (object,intptr,intptr,intptr)
    31. 0x00007ffbae8002f4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    32. 0x00007ffbae73eb34 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    33. 0x00007ffbae745bcf (mono-2.0-bdwgc) [object.c:5777] mono_runtime_try_invoke_array
    34. 0x00007ffbae67ce90 (mono-2.0-bdwgc) [icall.c:4025] ves_icall_InternalInvoke
    35. 0x00007ffbae6a1681 (mono-2.0-bdwgc) [icall-def.h:687] ves_icall_InternalInvoke_raw
    36. 0x000001edab346160 (Mono JIT Code) (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo:InternalInvoke (System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
    37. 0x000001edab3456db (Mono JIT Code) System.Reflection.RuntimeMethodInfo:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    38. 0x000001edab34559e (Mono JIT Code) System.Reflection.MethodBase:Invoke (object,object[])
    39. 0x000001edfd0b0c03 (Mono JIT Code) UnityEditor.Build.BuildPipelineInterfaces/AttributeCallbackWrapper:OnPostprocessBuild (UnityEditor.Build.Reporting.BuildReport)
    40. 0x000001edfcfd613d (Mono JIT Code) UnityEditor.Build.BuildPipelineInterfaces/<>c__DisplayClass18_0:<OnBuildPostProcess>b__1 (UnityEditor.Build.IPostprocessBuildWithReport)
    41. 0x000001ef905f205e (Mono JIT Code) UnityEditor.Build.BuildPipelineInterfaces:InvokeCallbackInterfacesPair<T1_REF, T2_REF> (System.Collections.Generic.List`1<T1_REF>,System.Action`1<T1_REF>,System.Collections.Generic.List`1<T2_REF>,System.Action`1<T2_REF>,bool)
    42. 0x000001edfcfd5f73 (Mono JIT Code) UnityEditor.Build.BuildPipelineInterfaces:OnBuildPostProcess (UnityEditor.Build.Reporting.BuildReport)
    43. 0x000001ef6e841978 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object (object,intptr,intptr,intptr)
    44. 0x00007ffbae8002f4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    45. 0x00007ffbae73eb34 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    46. 0x00007ffbae73eccc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    47. 0x00007ff7fba4e8d4 (Unity) scripting_method_invoke
    48. 0x00007ff7fba2e224 (Unity) ScriptingInvocation::Invoke
    49. 0x00007ff7fba28e45 (Unity) ScriptingInvocation::Invoke<void>
    50. 0x00007ff7fbb6aa23 (Unity) Scripting::UnityEditor::Build::BuildPipelineInterfacesProxy::OnBuildPostProcess
    51. 0x00007ff7fd50918d (Unity) PostprocessPlayer
    52. 0x00007ff7fd503d7f (Unity) DoBuildPlayer_PostBuild
    53. 0x00007ff7fd501e5e (Unity) DoBuildPlayer
    54. 0x00007ff7fd4f5d23 (Unity) BuildPlayer
    55. 0x00007ff7fb30d619 (Unity) BuildPipeline::BuildPlayerInternalNoCheck
    56. 0x00007ff7fb09be05 (Unity) BuildPipeline_CUSTOM_BuildPlayerInternalNoCheck
    57. 0x000001ef905c45d7 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck (string[],string,string,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,UnityEditor.BuildOptions,string[],bool)
    58. 0x000001ef905c3dd3 (Mono JIT Code) UnityEditor.BuildPlayerWindow/DefaultBuildMethods:BuildPlayer (UnityEditor.BuildPlayerOptions)
    59. 0x000001ef905bf713 (Mono JIT Code) UnityEditor.BuildPlayerWindow:CallBuildMethods (bool,UnityEditor.BuildOptions)
    60. 0x000001ef7bde812b (Mono JIT Code) UnityEditor.BuildPlayerWindow:GUIBuildButtons (UnityEditor.Modules.IBuildWindowExtension,bool,bool,bool,UnityEditor.Build.BuildPlatform,UnityEditor.Modules.IBuildPostprocessor)
    61. 0x000001ef76e07edb (Mono JIT Code) UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings ()
    62. 0x000001ef6e86821b (Mono JIT Code) UnityEditor.BuildPlayerWindow:OnGUI ()
    63. 0x000001effd78b98a (Mono JIT Code) UnityEditor.HostView:InvokeOnGUI (UnityEngine.Rect)
    64. 0x000001effd78b7a3 (Mono JIT Code) UnityEditor.DockArea:DrawView (UnityEngine.Rect)
    65. 0x000001effd77b8bb (Mono JIT Code) UnityEditor.DockArea:OldOnGUI ()
    66. 0x000001effd764c07 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
    67. 0x000001effd763d3b (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
    68. 0x000001ef6dfeaeeb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,System.Action,bool)
    69. 0x000001ef6dfead53 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,bool)
    70. 0x000001ef6e049fbb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase,bool,bool)
    71. 0x000001ef6e0471a3 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:SendEventToIMGUI (UnityEngine.UIElements.EventBase,bool,bool)
    72. 0x000001edfeb9aa13 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:ProcessEvent (UnityEngine.UIElements.EventBase)
    73. 0x000001edfeb9a983 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:ExecuteDefaultActionAtTarget (UnityEngine.UIElements.EventBase)
    74. 0x000001edfeb9a498 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEvent (UnityEngine.UIElements.EventBase)
    75. 0x000001edfeb9a1af (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase)
    76. 0x000001edfeb99f53 (Mono JIT Code) UnityEngine.UIElements.CallbackEventHandler:HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase)
    77. 0x000001ef6e04396b (Mono JIT Code) UnityEngine.UIElements.MouseCaptureDispatchingStrategy:DispatchEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    78. 0x000001edff00ca8e (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,bool)
    79. 0x000001edff00c41b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    80. 0x000001edfea0f76b (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEventQueue ()
    81. 0x000001edfea0f5f3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:OpenGate ()
    82. 0x000001edfea0f54b (Mono JIT Code) UnityEngine.UIElements.EventDispatcherGate:Dispose ()
    83. 0x000001edff00c8f3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:ProcessEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel)
    84. 0x000001edff00bfb3 (Mono JIT Code) UnityEngine.UIElements.EventDispatcher:Dispatch (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.IPanel,UnityEngine.UIElements.DispatchMode)
    85. 0x000001edff00be4b (Mono JIT Code) UnityEngine.UIElements.BaseVisualElementPanel:SendEvent (UnityEngine.UIElements.EventBase,UnityEngine.UIElements.DispatchMode)
    86. 0x000001edff4798cb (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    87. 0x000001edff4792c3 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
    88. 0x000001edff4790df (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
    89. 0x000001edff47901b (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
    90. 0x000001edff478e6d (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    91. 0x000001edff478f26 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
    92. 0x00007ffbae8002f4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    93. 0x00007ffbae73eb34 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    94. 0x00007ffbae73eccc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    95. 0x00007ff7fba4e8d4 (Unity) scripting_method_invoke
    96. 0x00007ff7fba2e224 (Unity) ScriptingInvocation::Invoke
    97. 0x00007ff7fba28e45 (Unity) ScriptingInvocation::Invoke<void>
    98. 0x00007ff7fbb741fa (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
    99. 0x00007ff7fc5468b8 (Unity) GUIView::ProcessRetainedMode
    100. 0x00007ff7fcb06523 (Unity) GUIView::OnInputEvent
    101. 0x00007ff7fc5466c5 (Unity) GUIView::ProcessInputEvent
    102. 0x00007ff7fcb0750d (Unity) GUIView::ProcessEventMessages
    103. 0x00007ff7fcb00c4c (Unity) GUIView::GUIViewWndProc
    104. 0x00007ffc3d381c4c (USER32) CallWindowProcW
    105. 0x00007ffc3d380ea6 (USER32) DispatchMessageW
    106. 0x00007ff7fcadbae3 (Unity) MainMessageLoop
    107. 0x00007ff7fcae0a64 (Unity) WinMain
    108. 0x00007ff7fde5355e (Unity) __scrt_common_main_seh
    109. 0x00007ffc3d2c54e0 (KERNEL32) BaseThreadInitThunk
    110. 0x00007ffc3e82485b (ntdll) RtlUserThreadStart
    111.  
    112.  
    I also have another error right after that one:
    Code (CSharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. GooglePlayServices.CommandLine.RunViaShell (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler, System.Boolean useShellExecution, System.Boolean stdoutRedirectionInShellMode) (at <17bf2caa78b94b298adbb078df707d24>:0)
    4. Google.IOSResolver.RunCommandsAsync (Google.IOSResolver+CommandItem[] commands, Google.IOSResolver+CommandItemCompletionHandler completionDelegate, System.Boolean displayDialog, System.String summaryText) (at <b224fde655d8429583404bd2802e1d8f>:0)
    5. Google.IOSResolver.RunCommandAsync (System.String command, System.String commandArgs, GooglePlayServices.CommandLine+CompletionHandler completionDelegate, System.String workingDirectory, System.Boolean displayDialog, System.String summaryText) (at <b224fde655d8429583404bd2802e1d8f>:0)
    6. Google.IOSResolver.RunPodCommandAsync (System.String podArgs, System.String pathToBuiltProject, GooglePlayServices.CommandLine+CompletionHandler completionDelegate, System.Boolean displayDialog, System.String summaryText) (at <b224fde655d8429583404bd2802e1d8f>:0)
    7. Google.IOSResolver.RunPodCommand (System.String podArgs, System.String pathToBuiltProject, System.Boolean displayDialog) (at <b224fde655d8429583404bd2802e1d8f>:0)
    8. System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <f3aec01a34d14c7080754e28743c8472>:0)
    9. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    10. System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <f3aec01a34d14c7080754e28743c8472>:0)
    11. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <f3aec01a34d14c7080754e28743c8472>:0)
    12. PlayServicesResolver.Utils.Editor.PlayServicesResolverUtils.PodUpdate (System.String pathToBuiltProject) (at Library/PackageCache/com.unity.services.mediation@bbce22f4c0f8/Editor/PlayServicesResolver/PlayServicesResolverUtils.cs:109)
    13. Unity.Services.Mediation.Build.Editor.IosDependencyUpdatePostBuild.OnPostProcessBuild (UnityEditor.BuildTarget target, System.String pathToBuiltProject) (at Library/PackageCache/com.unity.services.mediation@bbce22f4c0f8/Editor/Build/PostBuild/IosDependencyUpdatePostBuild.cs:16)
    14. System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <f3aec01a34d14c7080754e28743c8472>:0)
    15. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
    16.  
    17.  
    The only adapter I have installed is the Unity Ads one. I tried using the GitHub resolver that someone else posted, and that didn't work either. Please advise

    Unity Editor 2022.1.14f1
     
    Last edited: Aug 26, 2022
  29. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

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

    It looks like you don't have cocoapods installed. In your logs it gives you this suggestion:

    1. 'pod' command not found; unable to generate a usable Xcode project.
    2. You can install CocoaPods with the Ruby gem package manager:
    3. > sudo gem install -n /usr/local/bin cocoapods
    4. > pod setup
    Have you tried this?

    Let us know, thanks!
     
  30. CameronDWills

    CameronDWills

    Joined:
    Feb 26, 2021
    Posts:
    61
    I tried going to Assets > Play Services Resolver > iOS Resolver > Install Cocoapods but it doesn't appear to do anything. I'm on Windows if that matters. I'm unfamiliar with installing things through command prompt and such, but I will see if I can figure it out, but isn't that what the play services resolver is supposed to do?

    Edit: I followed this guide to install cocoapods on Windows: Using CocoaPods on Windows. CocoaPods is a dependency manager for… | by David Air | Medium

    However running the build in Unity still throws the same error... I feel like this was designed for a mac and Unitys mediation solution won't work on Windows? I see I can navigate to the project folder manually with the command prompt and run pod commands, so I tried running pod install and it failed to install the cocoapods repo.

    I exported the ios-build folder to my MacOS and then installed cocoapods and ran pod setup, then opened the ios-build folder in a terminal and ran pod install. This created the xcworkspace file and I was able to successfully build and archive the app.

    So long story short... building an iOS project on windows with Mediation won't work, unless you run pod install on the exported folder on MacOS first in order to generate the workspace files
     
    Last edited: Aug 27, 2022
  31. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

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

    For clarity, Xcode only works on systems running OS X, no other operating system, this is expected behaviour determined by Apple, not us or anyone else. Anyone looking to build an iOS app must use OS X to achieve this, more information here.

    Let us know if you have any other questions.
     
  32. Gingerbeer

    Gingerbeer

    Joined:
    Aug 10, 2015
    Posts:
    17
    Hello, @DeclanMcPartlin,

    'UnityMediationSdk/UnityMediationSdk.h' file not found
    I got this issue today, please take a look at my files.
    Unity also doesn't generate xcworkspace for me.

    • Unity Editor 2022.1.20.f1
    • Advertisement with Mediation 1.0.4
    • The EDM4U version 1.2.174

    Podfile

    source 'https://cdn.cocoapods.org/'
    platform :ios, '12.0'

    target 'UnityFramework' do
    pod 'adapterName', 'x.x.x'
    pod 'Protobuf'
    pod 'UnityMediationIronSourceAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    pod 'UnityMediationSdk', '~> 1.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    pod 'UnityMediationUnityAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    end
    target 'Unity-iPhone' do
    end



    use_frameworks!

    post_install do |installer|
    applicationTargets = [
    'Pods-Unity-iPhone',
    ]
    libraryTargets = [
    'Pods-UnityFramework',
    ]

    embedded_targets = installer.aggregate_targets.select { |aggregate_target|
    libraryTargets.include? aggregate_target.name
    }
    embedded_pod_targets = embedded_targets.flat_map { |embedded_target| embedded_target.pod_targets }
    host_targets = installer.aggregate_targets.select { |aggregate_target|
    applicationTargets.include? aggregate_target.name
    }

    host_targets.each do |host_target|
    host_target.xcconfigs.each do |config_name, config_file|
    host_target.pod_targets.each do |pod_target|
    if embedded_pod_targets.include? pod_target
    pod_target.specs.each do |spec|
    if spec.attributes_hash['ios'] != nil
    frameworkPaths = spec.attributes_hash['ios']['vendored_frameworks']
    else
    frameworkPaths = spec.attributes_hash['vendored_frameworks']
    end
    if frameworkPaths != nil
    frameworkNames = Array(frameworkPaths).map(&:to_s).map do |filename|
    extension = File.extname filename
    File.basename filename, extension
    end
    frameworkNames.each do |name|
    puts "Removing #{name} from OTHER_LDFLAGS of target #{host_target.name}"
    config_file.frameworks.delete(name)
    end
    end
    end
    end
    end
    xcconfig_path = host_target.xcconfig_path(config_name)
    config_file.save_as(xcconfig_path)
    end
    end
    end
     
  33. CameronDWills

    CameronDWills

    Joined:
    Feb 26, 2021
    Posts:
    61
    Sorry, my setup is a little odd. I don't own a Mac, so I'm using VMWare to run Mac OS on my PC to use xCode. For anyone else running into this problem, when you generate a project on Windows Unity, cocoapods won't be installed or work. You have to transfer your built iOS export to Mac OS, and then right click on the folder containing your project and open a new terminal. You'll run the command "pod install" a couple of times, and then you will have a xcworkspace file and everything you need to build your project.
     
    DeclanMcPartlin likes this.
  34. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    To add to Cameron's comment above, if you're facing an issue where the xcworkspace is not present, this means the build failed. Please provide the full error log from the Unity Editor console. Thanks!
     
  35. Gingerbeer

    Gingerbeer

    Joined:
    Aug 10, 2015
    Posts:
    17
    Hello @DeclanMcPartlin

    This is my full error log

    iOS framework addition failed due to a CocoaPods installation failure. This will will likely result in an non-functional Xcode project.

    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.

    pod install output:


    ――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

    ### Command

    ```
    /Users/gingerbeer/.gem/ruby/2.6.0/bin/pod install
    ```

    ### Report

    * What did you do?

    * What did you expect to happen?

    * What happened instead?


    ### Stack

    ```
    CocoaPods : 1.11.3
    Ruby : ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]
    RubyGems : 3.0.3.1
    Host : macOS 13.0 (22A380)
    Xcode : 14.1 (14B47b)
    Git : git version 2.37.1 (Apple Git-137.1)
    Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
    Repositories :
    ```

    ### Plugins

    ```
    cocoapods-deintegrate : 1.0.5
    cocoapods-plugins : 1.0.0
    cocoapods-search : 1.0.1
    cocoapods-trunk : 1.6.0
    cocoapods-try : 1.2.0
    ```

    ### Podfile

    ```ruby
    source 'https://cdn.cocoapods.org/'
    platform :ios, '12.0'

    target 'UnityFramework' do
    pod 'adapterName', 'x.x.x'
    pod 'Protobuf'
    pod 'UnityMediationIronSourceAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    pod 'UnityMediationSdk', '~> 1.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    pod 'UnityMediationUnityAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
    end
    target 'Unity-iPhone' do
    end



    use_frameworks!

    post_install do |installer|
    applicationTargets = [
    'Pods-Unity-iPhone',
    ]
    libraryTargets = [
    'Pods-UnityFramework',
    ]

    embedded_targets = installer.aggregate_targets.select { |aggregate_target|
    libraryTargets.include? aggregate_target.name
    }
    embedded_pod_targets = embedded_targets.flat_map { |embedded_target| embedded_target.pod_targets }
    host_targets = installer.aggregate_targets.select { |aggregate_target|
    applicationTargets.include? aggregate_target.name
    }

    host_targets.each do |host_target|
    host_target.xcconfigs.each do |config_name, config_file|
    host_target.pod_targets.each do |pod_target|
    if embedded_pod_targets.include? pod_target
    pod_target.specs.each do |spec|
    if spec.attributes_hash['ios'] != nil
    frameworkPaths = spec.attributes_hash['ios']['vendored_frameworks']
    else
    frameworkPaths = spec.attributes_hash['vendored_frameworks']
    end
    if frameworkPaths != nil
    frameworkNames = Array(frameworkPaths).map(&:to_s).map do |filename|
    extension = File.extname filename
    File.basename filename, extension
    end
    frameworkNames.each do |name|
    puts "Removing #{name} from OTHER_LDFLAGS of target #{host_target.name}"
    config_file.frameworks.delete(name)
    end
    end
    end
    end
    end
    xcconfig_path = host_target.xcconfig_path(config_name)
    config_file.save_as(xcconfig_path)
    end
    end
    end
    ```

    ### Error

    ```
    ArgumentError - Illformed requirement `"x.x.x"`
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/requirement.rb:63:in `parse'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/requirement.rb:88:in `block in initialize'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/requirement.rb:88:in `map!'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/requirement.rb:88:in `initialize'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/requirement.rb:34:in `new'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/requirement.rb:34:in `create'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/dependency.rb:101:in `initialize'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/podfile/target_definition.rb:979:in `new'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/podfile/target_definition.rb:979:in `block in pod_dependencies'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/podfile/target_definition.rb:975:in `map'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/podfile/target_definition.rb:975:in `pod_dependencies'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/podfile/target_definition.rb:96:in `non_inherited_dependencies'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/podfile/target_definition.rb:74:in `dependencies'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer/podfile_dependency_cache.rb:44:in `block in from_podfile'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer/podfile_dependency_cache.rb:43:in `each'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer/podfile_dependency_cache.rb:43:in `from_podfile'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:85:in `initialize'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:422:in `new'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:422:in `create_analyzer'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    /Users/gingerbeer/.gem/ruby/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    /Users/gingerbeer/.gem/ruby/2.6.0/bin/pod:23:in `load'
    /Users/gingerbeer/.gem/ruby/2.6.0/bin/pod:23:in `<main>'
    ```

    ――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

    [!] Oh no, an error occurred.

    Search for existing GitHub issues similar to yours:
    https://github.com/CocoaPods/CocoaPods/search?q=Illformed+requirement+`"x.x.x"`&type=Issues

    If none exists, create a ticket, with the template displayed above, on:
    https://github.com/CocoaPods/CocoaPods/issues/new

    Be sure to first read the contributing guide for details on how to properly submit a ticket:
    https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

    Don't forget to anonymize any private data!

    Looking for related issues on cocoapods/cocoapods...
    Found no similar issues. To create a new issue, please visit:
    https://github.com/cocoapods/cocoapods/issues/new





    pod repo update output:




    UnityEngine.Debug:LogError (object)
    Google.Logger:Log (string,Google.LogLevel)
    Google.IOSResolver:Log (string,bool,Google.LogLevel)
    Google.IOSResolver:OnPostProcessInstallPods (UnityEditor.BuildTarget,string)
    UnityEngine.GUIUtility:processEvent (int,intptr,bool&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)


    I tried pod install at the folder but got the same error.
    Cheers!
     
  36. DeclanMcPartlin

    DeclanMcPartlin

    Unity Technologies

    Joined:
    Nov 19, 2020
    Posts:
    139
    Hi @Gingerbeer, your Podfile is invalid. You have an invalid entry: pod 'adapterName', 'x.x.x', I would recommend looking through your project for any files with the suffix: *Dependencies.xml and see if it has that content, or search for that text inside your project and remove it, then your build should work. (Mind you this is not part of Unity Mediation, so this issue is most likely specific to your project).

    Thanks!
     
  37. Gingerbeer

    Gingerbeer

    Joined:
    Aug 10, 2015
    Posts:
    17
    Thank you it works now!!

    In my case, I have to delete OverrideDependencies.xml and remove IronSource adapter.
     
    DeclanMcPartlin likes this.
  38. CarteKiwi

    CarteKiwi

    Joined:
    Oct 24, 2022
    Posts:
    1
    I had same problem, except that my unity's build was working well, generating the xcworkspace file, but after the Xcode build was not working, displaying that unitymediationsdk.h file not found.

    After a day investigating, I executed one command, from the build folder :
    pod install --repo-update


    Updating local specs repositories
    Analyzing dependencies
    Downloading dependencies
    Generating Pods project
    Removing UnityAds from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationLogging from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationSdk from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationUnityAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityAds from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationLogging from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationSdk from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationUnityAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityAds from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationLogging from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationSdk from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationUnityAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityAds from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationLogging from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationSdk from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Removing UnityMediationUnityAdapter from OTHER_LDFLAGS of target Pods-Unity-iPhone
    Integrating client project


    Pod installation complete! There are 3 dependencies from the Podfile and 6 total pods installed.



    Don't forget to do a pod setup before if your 'install' command failed.

    BTW, I am completely new in all that stuff, I'm from Microsoft world at first, trying to create a unity game for iOS from my Windows PC. Had to buy a Mac to compile, using Plastic as source controller to copy file from one machine to the other (otherwise you can't open same shared file on local network in Unity).... what a hell... It would be very nice to give opportunity to deploy to iOS directly from Unity (Windows), as VS do with Xamarin stuff :)

    Otherwise, I discovered Unity 2 weeks ago, and it's great :) Graph feature seems very powerful and easy to use. Thanks to the team.
     
  39. kozlovskiygk

    kozlovskiygk

    Joined:
    Apr 18, 2021
    Posts:
    1

    ===============================
    Didn't help to me :(
     
unityunity