Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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
3
Question by Bhargav5530 · May 31, 2015 at 08:07 AM · xcode

Use of @import when modules are disabled

hello user, I am new to unity and I am building my first project in iOS. There is a googleadmob plugins in my project. When I build the project in unity the project successfully build there is no problem. But in Xcode it gives me an error in GADUObjectCache.h that use of @import when modules are disabled I tried everything on google but nothing works.. Need help plz

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
11
Best Answer

Answer by Bhargav5530 · Jun 02, 2015 at 05:01 AM

I found answer myselft just

In Xcode set Enable Modules (C and Objective-C) to Yes in Build Settings.

alt text


screen-shot-2015-06-02-at-102422-am.png (22.7 kB)
Comment
Add comment · 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 alonsoGarrote · Jun 12, 2015 at 04:09 PM 1
Share

Hi there, Im using Xcode 6.3 on iOS 8.3, but I CANT FIND that option, it seams now Xcode enable modules automatically. But still, doesnt work. One workaround I found is that I have to manually change each @import with #import, but I have to specify which file, for example: ins$$anonymous$$d of

 @import Google$$anonymous$$obileAds;
 
 #import  <Google$$anonymous$$obileAds/Google$$anonymous$$obileAds.h>

And I could get rid of many errors, but I dont know how to change:

@import Foundation;

Any suggestions?, Regards

avatar image Altered · Jun 18, 2015 at 10:14 PM 0
Share

I'm having this same problem! There is no modules section. When I switch to the build settings for Unity iPhone Test, the module setting is there, but it's not in the main Unity Iphone Settings. Are you just building in Unity iPhone test? I would really love to get this working!

avatar image mahmoud93p · Aug 25, 2019 at 03:48 PM 0
Share

thank you is work

avatar image
12

Answer by Altered · Jun 18, 2015 at 11:04 PM

I figured it out! In Xcode right under where you click "Build Settings" it says "All" and "Basic". Mine had basic selected, and even when you search from "modules", nothing shows up! But when I clicked "All" instead, I could see the modules setting.

Comment
Add comment · Show 7 · 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 ky533541 · Jun 24, 2015 at 09:00 AM 0
Share

You are a beautiful genius -- thank you so much. I was trying to figure this out for days and this solved my problem. Fantastic!!

avatar image hnmikechan · Jul 27, 2015 at 09:52 PM 0
Share

Thanks for finding this Altered, it was killing me.

avatar image kobyle · Oct 07, 2015 at 08:37 PM 0
Share

Hell yeah!!! thank you spent an hour on this!

avatar image gulfam131 · Nov 05, 2015 at 10:06 AM 0
Share

Thank you so much, you just saved a lot of my time. I was trying to find it from couple of days.

avatar image dappledore · Nov 17, 2015 at 05:32 AM 0
Share

How to fix this on Unity Cloud Build!

Show more comments
avatar image
1

Answer by lexi89puzzle · May 08, 2017 at 12:54 PM

To resolve this in Unity Cloud build, use the Xcode Manipulation API to set modules to "YES". Details in this post: https://forum.unity3d.com/threads/ios-cloud-build-error-use-of-import-when-modules-are-disabled.330706/

The key line is: proj.AddBuildProperty(target, "CLANG_ENABLE_MODULES", "YES");

Comment
Add comment · 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.

Follow this Question

Answers Answers and Comments

11 People are following this question.

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

Related Questions

MTLTextureDescriptor has invalid pixelFormat (0). while building a project in Xcode. 0 Answers

How to use didUpdateToLocation to Xcode Touch Library project .m to .mm file C syntex 0 Answers

How to integrate AdMob with iOS? 1 Answer

Symbol not found: _UnityGetAudioEffectDefinitions 0 Answers

ios xcode 8 build error with google adbmob, GADMAdapterAdColony, ld: symbol(s) not found for architecture arm64 2 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