• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by slashg0 · Dec 14, 2016 at 08:30 PM · iosdestroyadsadmobgoogle play games

iOS Build crashing dyld: Symbol not found

Hey!

I'm building my first game for iOS using Unity. I've made and published a few games on Android. iOS is a little trickier, it seems. I generated the xCode project, build it, and it builds fine and then immediately crashes on the simulator.

I have both GoogleMobileAds and GooglePlayGames in the project. The logs read t$$anonymous$$s message:

 dyld: Symbol not found: _OBJC_CLASS_$_GSDK_GTMSessionFetcher
   Referenced from: /Users/slashg0/Library/Developer/CoreSimulator/Devices/FC590B60-F039-47F4-B81E-EF4A99D619D7/data/Containers/Bundle/Application/45238C77-AE2D-4BB5-A98D-F5AE734201E9/auradefence.app/auradefence
   Expected in: flat namespace
  in /Users/slashg0/Library/Developer/CoreSimulator/Devices/FC590B60-F039-47F4-B81E-EF4A99D619D7/data/Containers/Bundle/Application/45238C77-AE2D-4BB5-A98D-F5AE734201E9/auradefence.app/auradefence
 (lldb) 

I have followed a lot of threads with similar issues

  • I've tried pod install manually, building from the .xcworkspace file (w$$anonymous$$ch isn't generated by default)

  • I've deleted pods, then installed them manually

  • I've tried copying GoogleOpenSource and a few other libraries, they cause build errors.

I may be overdoing the wrong t$$anonymous$$ngs here. Can anyone point out what I need to do?

[EDIT 1] Adding the Unity generated Podfile:

 source 'https://github.com/CocoaPods/Specs.git'
 install! 'cocoapods', :integrate_targets => false
 platform :ios, '82'
 
 target 'Unity-iPhone' do
 pod 'Google-Mobile-Ads-SDK', '~> 7.13'
 pod 'GooglePlayGames', '~> 5.0'
 end
 






Comment
bsoyluoglu

People who like this

1 Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image elenzil · Dec 14, 2016 at 11:04 PM 0
Share

hard to say for sure, but this might be a clue: "I've tried pod install manually, building from the .xcworkspace file (which isn't generated by default)".

when you do a pod install, the workspace should be generated. if that's not happening, something is wrong at the pods level.

avatar image slashg0 elenzil · Dec 15, 2016 at 06:02 AM 0
Share

Oh, when I do pod install manually, the .xcworkspace is generated fine. I meant that it isn't generated by default in the Unity build. I suppose there is nothing wrong with that.

The problem is that when I open this .xcworspace file and build it from there, I get several 'not found' errors. I have also tried to find which files (or classes?) are missing and adding their pods. I reached a point where I was getting a 'not found' error for some files I couldn't find the pods for.

avatar image 5c4r3cr0w slashg0 · Dec 15, 2016 at 07:28 AM 0
Share

So when you try to build from Xcode does it download both google mobile ads sdk and GooglePlay game?

P.S. Thanks to This conflicting pods problem can be resolved. Try it if it works for you.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by elenzil · Dec 15, 2016 at 05:07 PM

I am using the .xcodeproj to open and build the game, I don't have an .xcworkspace file.

t$$anonymous$$s is your problem. when you do pod install, it says very clearly that you need to use the workspace, not the project. it's not joking.

The problem is that when I open t$$anonymous$$s .xcworspace file and build it from there, I get several 'not found' errors. I have also tried to find w$$anonymous$$ch files (or classes?) are missing and adding their pods. I reached a point where I was getting a 'not found' error for some files I couldn't find the pods for.

those problems need to be fixed. if you're using pods, you need to use the workspace.

Comment

People who like this

0 Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image slashg0 · Dec 15, 2016 at 06:04 PM 0
Share

I tried working with the .xcodeproj because the documentation for the play-games-plugin-for-unity reads:

When building for iOS in Unity, a post build step is executed that runs Cocoapods and then adds the required libraries and frameworks directly to the XCode project. This is different from previous versions; you no longer need to open the workspace in XCode.

This, and a couple of YouTube tutorials that build using the .xcodeproj itself. I'm using the latest release for the plugins, maybe that is causing confusion?

avatar image elenzil slashg0 · Dec 15, 2016 at 06:19 PM 0
Share

i see. news to me. are you using other cocoapods which are not part of that ? perhaps the problem is mixing old-style and new-style cocoapods ?

avatar image slashg0 elenzil · Dec 26, 2016 at 06:31 AM 0
Share

After a few failed attempts long ago, I stopped tweaking the Podfile. I just generate the project in Unity and try (and fail) to run it. I am making no changes to the xCode project per se now.

I'm miles past my deadline and am losing business because of this.

avatar image

Answer by bsoyluoglu · Dec 28, 2016 at 03:13 PM

Hi, I've had the same issue and managed to solve it.

I'm assuming you are trying to run the app on the simulator. The error "Expected in: flat namespace" is given when the library you are using is not available for simulator. Explained here.

So change the player setting for Target SDK under Other Settings to Device SDK, then run the Unity build.

Once you have the xCode project. The project will not build I've no idea why to solve that,

  1. Delete everyt$$anonymous$$ng that is related to Cocoa Pods Podfile Podfile.lock and Pods folder

  2. Create a clean PodFile (See the example below.) Need to add GoogleSignIn separately since GooglePlayGames is not referencing it correctly. You can read it more here.

  3. run pod install

  4. From other linker flags under Build Settings remove -Obj C

  5. Build xCode project and run it on a real device.

 source 'https://github.com/CocoaPods/Specs.git'
 platform :ios, '9.0'
 
 target 'Unity-iPhone' do
     pod 'GooglePlayGames', '5.0'
     pod 'GoogleSignIn', '4.0.0'
 end
 
 post_install do |installer|
   installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
       config.build_settings['ENABLE_BITCODE'] = 'NO'
     end
   end
 end
 

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

7 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Failed to re - package resources Unity 5.4.3f1 0 Answers

Admob Interstitial Ads are not working in IOS, but it is working in Android 0 Answers

Admob iOS Rewarded Videos don't close 0 Answers

Admob ads not showing on iOS devices 0 Answers

Admob Memory Issues 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges