IndoorAtlas / unity-plugin

IndoorAtlas Unity plugin
Apache License 2.0
42 stars 13 forks source link

Cocoapods / Podfile not working on iOS Unity builds #2

Closed EgilSandfeld closed 7 years ago

EgilSandfeld commented 7 years ago

Hi all :)

I get the following errors at the OnPostProcessBuild stage of building an iOS Xcode project with Unity, using the example Unity project with a few adaptions:

Failed running cocoapods. Make sure cocoapods is installed and you target to iOS 8.0 or newer.
UnityEngine.Debug:LogError(Object)
XcodeFixes:OnPostprocessBuild(BuildTarget, String) (at Assets/Plugins/iOS/Editor/XcodeFixes.cs:68)
UnityEditor.HostView:OnGUI()

Error building Player: Failed running cocoapods. Make sure cocoapods is installed and you target to iOS 8.0 or newer.

UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x001b9] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:162 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00050] in /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPlayerWindowBuildMethods.cs:83 
UnityEditor.HostView:OnGUI()

"Target minimum iOS version" in Unity player settings is "8.0" "which pod" in Terminal yields "/usr/local/bin/pod" "pod --version" in Terminal yields "1.3.1" Podfile in Assets/Plugins/iOS/ contains:

target 'Unity-iPhone' do
  pod 'IndoorAtlas', '~> 2.5.1'
end

So:

What can I do about this?

EgilSandfeld commented 7 years ago

Solution for me was to use Terminal to run

pod repo update