Unity iOS plugin Xcode error

4,790 views
Skip to first unread message

Саша Иванов

unread,
Jan 13, 2014, 8:32:44 AM1/13/14
to google-adm...@googlegroups.com
I create my project using step-by-step walkthrough, but when building in Xcode have this error:  

Ld /Users/oleg/Library/Developer/Xcode/DerivedData/Unity-iPhone-gtippugnnrtbebhdonqnprccntuf/Build/Products/ProductName.app/ProductName normal armv7

    cd "/Users/oleg/Desktop/Sasha/AdMob Test"

    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3

    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/oleg/Library/Developer/Xcode/DerivedData/Unity-iPhone-gtippugnnrtbebhdonqnprccntuf/Build/Products -L/Users/oleg/Desktop/Sasha/AdMob\ Test -L\"/Users/oleg/Desktop/Sasha/AdMob\ Test/Libraries\" -L/Users/oleg/Desktop/Sasha/GoogleAdMobAdsSdkiOS-6.7.0 -F/Users/oleg/Library/Developer/Xcode/DerivedData/Unity-iPhone-gtippugnnrtbebhdonqnprccntuf/Build/Products -filelist /Users/oleg/Library/Developer/Xcode/DerivedData/Unity-iPhone-gtippugnnrtbebhdonqnprccntuf/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName.LinkFileList -dead_strip -weak_framework CoreMotion -weak-lSystem -ObjC -stdlib=libstdc++ -fobjc-link-runtime -miphoneos-version-min=4.3 -framework SystemConfiguration -framework StoreKit -framework MessageUI -framework CoreGraphics -weak_framework AVFoundation -framework AudioToolbox -framework AdSupport -framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore -framework OpenAL -liconv.2 -liPhone-lib -framework CFNetwork -lGoogleAdMobAds -framework MediaPlayer -framework CoreLocation -weak_framework iAd -framework CoreMedia -framework CoreVideo -weak_framework CoreMotion -weak_framework GameKit -Xlinker -dependency_info -Xlinker /Users/oleg/Library/Developer/Xcode/DerivedData/Unity-iPhone-gtippugnnrtbebhdonqnprccntuf/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/ProductName_dependency_info.dat -o /Users/oleg/Library/Developer/Xcode/DerivedData/Unity-iPhone-gtippugnnrtbebhdonqnprccntuf/Build/Products/ProductName.app/ProductName


ld: warning: directory not found for option '-L"/Users/oleg/Desktop/Sasha/AdMob Test/Libraries"'

ld: library not found for -liPhone-lib

clang: error: linker command failed with exit code 1 (use -v to see invocation)

What can I do to fix it?

Eric Leichtenschlag

unread,
Jan 17, 2014, 10:12:49 PM1/17/14
to google-adm...@googlegroups.com
What do your Library Search paths look like in build settings? Can you try removing the entries where you don't have any references? And for the iPhone-lib library, try removing the reference and re-adding it in XCode.

Finally, I would try removing the space from "AdMob Test" directory (call it "AdMobTest") so it doesn't cause any space issues in your search paths.

Hope this helps,
Eric

Jason Walters

unread,
Feb 9, 2014, 12:36:28 PM2/9/14
to google-adm...@googlegroups.com
I experienced this same issue.  To resolve:

  1. In Xcode's project navigator, press the blue top-level project icon.
  2. Click on your target, then the General tab.
  3. Remove "libiPhone-lib.a" from the Linked Frameworks and Libraries.
  4. Now re-add "libiPhone-lib.a" to the Linked Frameworks and Libraries.
  5. Build and Run your Xcode project from Xcode.  Done.
Hopefully at this point you should be working.  :)

Best,
Jason

@jasonrwalters

Plato Evolved

unread,
Jul 15, 2014, 5:56:03 AM7/15/14
to google-adm...@googlegroups.com
This worked a treat, thankyou!

Nurlan Akylbekov

unread,
Aug 13, 2014, 4:09:26 PM8/13/14
to google-adm...@googlegroups.com


I have followed this: 

    • In Xcode's project navigator, press the blue top-level project icon.
    • Click on your target, then the General tab.
    • Remove "libiPhone-lib.a" from the Linked Frameworks and Libraries.
    • Now re-add "libiPhone-lib.a" to the Linked Frameworks and Libraries.
    • Build and Run your Xcode project from Xcode.  Done.   

    • But after removing "libiPhone-lib.a from the Linked Frameworks and Libraries I didn't find it! 

    Nurlan Akylbekov

    unread,
    Aug 13, 2014, 4:14:20 PM8/13/14
    to google-adm...@googlegroups.com

    I found my libiPhone-lib.a file in trash folder. added manually. Now I have only one error: 


    ld: warning: directory not found for option '-L"/Users/nurlanakylbekov/Desktop/TestBuild 2/Libraries"'

    ld: library not found for -ladmob-ad-plugin

    Eric Leichtenschlag

    unread,
    Aug 13, 2014, 5:54:51 PM8/13/14
    to google-adm...@googlegroups.com
    What is admob-ad-plugin.a? Seems like you're using a third party AdMob Unity solution.

    Anyways, if you check your "Library Search Paths" under Build Settings, you must not have an admob-ad-plugin.a file anywhere inside any of those directories.
    Reply all
    Reply to author
    Forward
    0 new messages