I have been trying to build my game to iOS for quite some time now but whenever I try to build the project with GoogleMobileAds it won't work. The ads work fine on android but not on iOS. If i remove the GoogleMobileAds completely the project builds fine but not with the ads.
I have followed the documentation to the best of my ability but I just can't seem to get it to work. In the documentation it says that after building the Xcode project in Unity you should also get a Cocoapods workspace file but it doesn't seem to show up. What could I be doing wrong?
Thank you for any help you might give.
If any one happens to stumble upon this later and have the same problem. Here is how i solved it:
Unity would not generate a podfile for me like it says it should in the developer guide, maybe I haven't installed Cocoapods correctly. Regardless, in the end, the fix was quite easy.
I manually downloaded the Google Mobile Ads SDK and added it to the Frameworks folder in the Xcode project. (If you are more experienced with xcode/cocoapods than I am you could probably just write your own podfile that would do this for you)
Then I changed "Enable Modules (C and Objective-C)" to Yes in the Build Settings
Lastly I added "$(inherited)" to "Other Linker Flags"
After this everything compiled like it should and the ads worked fine.
Related
My goal is to build a universal framework that can be use in iOS devices and simulators. I want to be able to distribute this framework using cocoapods which also I was able to do successfully.
My framework has some external dependancies, the main one being AWSLambda which I included in my podspec which seems to give me the issue.
I was able to build and embed my framework into a test project by manually dragging the framework into the test project or by installing it via cocoa pods. On both occasions, running the project on a device or a simulator had no issues and everything worked fine.
However, when I tried to archive the test project to submit it to TestFlight, the process failed with the key warning being FrameworkName was built without full bitcode.
A popular solution which came up is to set enable bitcode to no, however I don't think this is the right solution for this project at least as I am building a Framework which will be integrated into other projects and asking client applications to disable bitcode does not seem the right way to go. If it was a personal app I may have taken this route.
So to resolve this, I took some help from stackoverflow and here is what I tried
This stackoverflow answer first
In Build Settings of the framework project set Other C Flags to -fembed-bitcode
In the Build Settings of the framework target add a user defined flag called BITCODE_GENERATION_MODE with the value of bitcode
Both in the framework project and target, Enable Bitcode should be set on Yes
Similar answers were repeated here which I tried.
Here is another answer which I tried where the person recommends to set Skips Install to No and archive the framework instead of building it.
While trying this standalone or in combination, the building of my framework still fails however, this time it is not referring to my Framework but it is referring to my pod dependency AWSLambda.
Adding this to the podfile seems to solve the problem of building the framework, however again I am faced with the challenge of asking the user's to include this into their podfiles which does not strike me as professional or I could be wrong ?
I wanted to know what were my options when it came to such errors with dependancies and is there any way to overcome this ?
I am not sure if such things can be added to the podspec to overcome these challenges.
I probably will have to make a compromise somewhere but it would be nice to get some advice on how to solve this issue.
Thanks
I have built a iOS project with Unity and added a asset from the Unity Asset store called, Very Simple Ads. When I built the project in Unity, I had no errors, when I opened the project in xCode I have 12 errors. Which are "Apple Mach-O Linker" errors. Here is a screen shot of all the errors: SCREENSHOT
I know the errors are to do with the ads, but I am not for sure.
please make sure you have setup import settings for plugin correct and check iOS platform checkbox.
Currently, the problem is your plugin did not exported right and linker can't find listed methods.
Please read more information about plugin import settings here
https://docs.unity3d.com/Manual/PluginInspector.html
When you export via unity to xcode you have to put frameworks for ios from the screenshot i came to now tat you have integrated google mobile ads so you need to add google mobile ads framework to your xcode project
you can do so by simply going to project setting general and scroll down to frameworks use the small "+" sign at the end of the frameworks to add the frameworks or simply drag the downloaded framework to the hirarchy of your project in frameworks folder
You can download google mobile ads framework from the link below
https://firebase.google.com/docs/admob/ios/download
Regards
I am trying to integrate Firebase in my iOS project without Cocoapods.I have followed all the instructions but I am getting a linker error on XCode8 beta2 as given below:
My framework dependencies look like following:
I would really appreciate if anyone could help me with this.
I just deleted the "Frameworks" Directory from the main project and every thing worked,
I think that those frameworks need to be recompiled after updating the XCODE or switching to swift 3 or choosing your team in the build settings
I've created a project in Xcode 5.0 (yes, Developer Preview) for the beta iOS7 software because I wanted to play around with the new beta stuff. But I actually decided to submit the App I was playing around with to the App Store and since this is not possible with preview Xcode versions I fixed all compatibility issues to make the code work with Xcode 4.6.3 and iOS 6. Except for one thing.
And that's importing third party frameworks like Flurry (analytics framework) or Crashlytics (crash reporting framework).
Both are correctly imported and set up with targets (it's all working in Xcode 5.0) but I'm getting a 'Crashlytics/Crashlytics.h' file not found in the line I'm importing the needed classes (#import <Crashlytics/Crashlytics.h>) in Xcode 4.6.
The same is true for the Flurry framework analogously. The crazy thing is, both libraries show up in the targets 'Link Binary With Libraries' list, even in Xcode 4.6.
Does anyone have an idea how I can get things work in Xcode 4.6? Are there any further ways to influence the importing?
The link binary with libraries is not the issue here. You have to confirm your Header Search Paths in your build settings. I think Xcode 5 might use a different variable for it, and that is why Xcode 4.6 will get confused (just a guess though). Anyway, confirm that the path to those headers is in your Header Search Path. The Crashlytics app will automatically add it for you, actually.
Since making the transition to XCode 4.5 and building with iOS 6 SDK my app crashes every time I make a call to a third party framework or static library .a file. Initially when I made the transition to XCode 4.5 these frameworks worked. The issue started popping up as I began updating the frameworks. After deleting the old version of the framework and adding the new one I would begin getting the crash on my simulator.
Running the code on the device works fine as expected but as soon as I make a call to any one of my third party frameworks or static libs on the simulator I'm doomed. Some of the frameworks that cause a crash are the Parse Framework, Socialize. The errors
Has anybody experienced this or hopefully found a solution? Testing on the device is slower but the real bummer is that I can't run any unit tests on my app.
Thanks,
Since you said you updated the frameworks or static libraries:
Are you sure that the APIs of these frameworks/libraries did not change in the meantime?
Are you sure you added the frameworks in the "Link Binary With Libraries" again in your Build Phases of your application project, to link your app with the fmk/libs?
Also be sure that the -ObjC flag is still present in your application's "Other Linker Flags" build settings, even if there is no reason not to if you had it already (as it worked before).
Besides, what is the crash log and error message when you call these methods?