Error while building ios project

1,611 views
Skip to first unread message

Anshul

unread,
May 3, 2017, 10:40:26 AM5/3/17
to Google Mobile Ads SDK Developers
Hi,

Got following error while building xcode project using unity 5.4.0 with GoogleMobileAds package:

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 failed. "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:

Analyzing dependencies
[!] Unable to find a specification for `Google-Mobile-Ads-SDK (~> 7.13)`





pod repo update output:

Updating spec repo `master`
  $ /usr/bin/git -C /Users/PB037/.cocoapods/repos/master fetch origin --progress
  $ /usr/bin/git -C /Users/PB037/.cocoapods/repos/master rev-parse --abbrev-ref HEAD
  HEAD
[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`


fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
  remote: Counting objects: 43, done.        
  remote: Compressing objects:   7% (1/13)           
  remote: Compressing objects:  15% (2/13)           
  remote: Compressing objects:  23% (3/13)           
  remote: Compressing objects:  30% (4/13)           
  remote: Compressing objects:  38% (5/13)           
  remote: Compressing objects:  46% (6/13)           
  remote: Compressing objects:  53% (7/13)           
  remote: Compressing objects:  61% (8/13)           
  remote: Compressing objects:  69% (9/13)           
  remote: Compressing objects:  76% (10/13)           
  remote: Compressing objects:  84% (11/13)           
  remote: Compressing objects:  92% (12/13)           
  remote: Compressing objects: 100% (13/13)           
  remote: Compressing objects: 100% (13/13), done.        
  remote: Total 43 (delta 29), reused 41 (delta 27), pack-reused 0        
     9cb05442306..b1660ff2a8f  master     -> origin/master
  fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'

UnityEngine.Debug:LogError(Object)
Google.IOSResolver:Log(String, Boolean, LogLevel)
Google.IOSResolver:OnPostProcessInstallPods(BuildTarget, String)
UnityEditor.HostView:OnGUI()

Please help.

Deepika Uragayala- MobileAds SDK team

unread,
May 3, 2017, 3:35:25 PM5/3/17
to Google Mobile Ads SDK Developers
Hi Anshul,

I'm unable to reproduce this issue locally using our sample project with Unity 5.5.2. Can you try updating to the latest version of the plugin and see if it solves the issue?

Also, check your .bash_profile file in your Mac to make sure that there aren't any duplicate CocoaPods paths installed. I would also suggest that you use the latest version of Unity.

Regards,
Deepika Uragayala
Mobile Ads SDK Team

Anshul

unread,
May 4, 2017, 1:44:04 AM5/4/17
to Google Mobile Ads SDK Developers
Hi Deepika,

Thanks for the reply.

Okay, I reinstalled the CocoaPod, ruby and I didn't get this error but after build is completed, I am not able to find xcworkspace as mentioned in the docs.

Regards
Anshul  

Anshul

unread,
May 4, 2017, 2:52:36 AM5/4/17
to Google Mobile Ads SDK Developers
When build again, now this error shows up:

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:

Setting up CocoaPods master repo
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`.
You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.


fatal: Not a git repository (or any of the parent directories): .git



pod repo update output:



fatal: Not a git repository (or any of the parent directories): .git

UnityEngine.Debug:LogError(Object)
Google.IOSResolver:Log(String, Boolean, LogLevel)
Google.IOSResolver:OnPostProcessInstallPods(BuildTarget, String)
UnityEditor.HostView:OnGUI()

Anshul

unread,
May 4, 2017, 8:42:31 AM5/4/17
to Google Mobile Ads SDK Developers
I reinstalled again and then build again and now got new error again :

Error running cocoapods. Please ensure you have at least version 1.0.0.  You can install cocoapods with the Ruby gem package manager:
 > sudo gem install -n /usr/local/bin cocoapods
 > pod setup

'pod --version' returned status: 127
output: 

env: ruby_executable_hooks: No such file or directory

UnityEngine.Debug:LogError(Object)
Google.IOSResolver:Log(String, Boolean, LogLevel)
Google.IOSResolver:OnPostProcessInstallPods(BuildTarget, String)
UnityEditor.HostView:OnGUI()


Deepika Uragayala- MobileAds SDK team

unread,
May 4, 2017, 12:38:10 PM5/4/17
to Google Mobile Ads SDK Developers
Hi Anshul,

This still looks like an issue with CocoaPods installation in your machine as it's unable to find the local repo needed to install the dependencies. Can you again install CocoaPods using the steps mentioned in this post? Also, check whether the pod --version is returning a 1.x build and then try again.

You can still manually integrate our SDK by copying the framework into Assets > Plugins > iOS folder and make the build.

Let me know if you still continue to have issues.

Regards,
Deepika Uragayala
Mobile Ads SDK Team


Anshul

unread,
May 8, 2017, 4:31:47 AM5/8/17
to Google Mobile Ads SDK Developers
Thanks for your help.
Reply all
Reply to author
Forward
0 new messages