Amplitude Unity iOS 'Amplitude\Amplitude.h' file not found - ios

I added the Amplitude SDK to an existing Unity project, on Android it was fine, but for iOS when I try to build I get this error in xcode ... "'Amplitude\Amplitude.h' file not found"
Project uses Unity 2021.3.9f1 and Ar foundation
I get the same issue with a brand new Unity 2021.3.9f1 project, with nothing in it but the Amplitude SDK. I used the 2.6.0 amplitude-unity.unitypackage file from here https://github.com/amplitude/unity-plugin/releases
Has anyone else encountered this issue and is there a fix or workaround?

So they had two unitypackages available to download on their github site.
On Amplitudes website they say "Download the latest amplitude-unity.unitypackage"
This is the smaller file, the one I used.
But it seems for ios you must.
Download the bigger file called "amplitude-unity-all.unitypackage"
In unity goto Assets\External Dependency manager\iOS resolver\Install cocoapods
build xcode project
In xcode click on unity framework target, then Build Settings\Build Options and set enable bitcode to No
After taking these steps I was able to build and Amplitude worked on iOS

Related

How can I properly share the Amplify framework with my Main App and my App Extension for an iOS app?

I have an iOS app using AWS amplify for the backend. I am using Xcode 13 and SwiftUI.
I previously added the Amplify framework using Cocoapods however I was unable to get the framework to work with the extension.
So I recently switched to Swift Package Manager. I added the package to my main project. Then I went to my Share Extension and in General - Frameworks and Libraries and manually added the libraries.
After doing this the app builds and runs and both the main app and extension work fine and are able to use the libraries.
The problem is that I cannot archive and upload the app to the App Store. I get the following error:
CFBundleIdentifier Collision. There is more than one bundle with the
CFBundleIdentifier value 'com.amazonaws.AWSAuthCore' under the iOS
application 'MyAPP.app'. With error code
STATE_ERROR.VALIDATION_ERROR...
I went on many forums and spent many hours trying to fix this but to no avail. The suggestions are to click 'do not embed' for the libraries but that option is not available for me.
I wonder if there is anyway to resolve this?
Below are my General and Build Phases for the Share Extension:
Just remove explicit Amplify dependency from extension, ie. next section should be empty
Make sure (it should be automatically, but anyway)
Link Frameworks Automatically parameter (in Build Settings) is true
Runpath Search Path parameter is related to main bundle
So as targets from SPM are built in same location as product and extension and automatic framework linking is enabled the imported modules in extension will available and linked automatically and due to run paths are set the frameworks will be found in run-time as well.
Note: of course in main app target all should be included
Tested with Xcode 13.1 / iOS 15.1

'GADURewardedInterstitialAd.h' file not found -error xcode-

Recently I tried to build my xcode project from Unity3D export, but after 400/500 tasks, a major error appear:
GADURewardedInterstitialAd.h file not found
I've tried:
restart xcode
re import GoogleMobileAds SDK IOS(latest update 8.7.0)
change admob version in Unity (5.4.0 or 6.0)
sure, cleaning the project (before launch "archive")
remove the "GoogleMobileAds.xcframework" from "Frameworks" folder and add it again
try the method "framework search paths" in Build Setting (UnityFramework)
try to YES (Enable Modules C & Objective-C)
try to modify architecture (why not)
try to add in OTHER LINKER FLAGS "-ObjC"
No luck, still the same error, any ideas to solve this? thanks.
My solution to various errors of this type was to import the GoogleMobileAds via CocoaPods and not manually. This is because first of all it does everything by itself, and then because it installs you in the project the version of the GMA of iOS supported by the unity plugin (or else sometimes you may find yourself with the version of the unity plugin that does not support the too recent version of the package for iOS)
I suggest you try initially with version 5.4.0 of the plugin, as 6.0.0 and 6.0.1 I saw on GMA's GitHub that some users encounter various errors on Xcode, then maybe if it works you can try with a plugin most recent. What version of Unity do you use? (I built with 2020.3)
I leave you the links of two of my videos that I made that explain (1) how to install/update CocoaPods, (2) how to import GMA via CocoaPods.
I want to say that I have no intention of advertising my content, I have a tiny channel with some videos to help those like me who have had various problems starting to program or use Unity, I do not monetize. You are obviously free to look for information on the internet regarding what was said before and not to watch the videos, which I repeat I have linked only to help.
(1)
Install/update CocoaPods ,
(2)
Import GMA using CocoaPods
In this other link (which leads to a documentation page of the GMA package for iOS), you can read the note from Google that suggests the use of CocoaPods:
Link

How to use Swift Pod in Unity exported iOS App

I have reach experience in iOS native app development, My company have a unity app. Unity app developer exported the app for iOS and shared with me. I wanted to use my own created cocoa-pod library (which I have already using in my another iOS App) into Unity iOS project.
So Unity developer exported by File -> Build Settings, choose iOS and click Build, and now I am trying integrated pod (which is written in Swift 4.2) into Unity exported of iOS project.
I have taken medium post and many more reference, I have implemented the same as conclusive direction. Please look the attached screenshot below.
Reference - https://medium.com/ios-os-x-development/swift-and-objective-c-interoperability-2add8e6d6887
Please look the below screenshot for autogenerated file
Now when I am going to import this autogenerated header file to make connection between Objective C to Swift, then it is showing error as attached screenshot below
Please help me to resolve this issue. Thanks in advance.
One thing that has hung me up on this in the past is if you get an error during the initial build, then sometimes it doesn't create the -swift.h file and then subsequent builds also get an error that it's missing. Make sure you've deleted your derived data and cleaned the build folder to reset so everything gets built from the beginning.

"Could not locate google-services.json or GoogleService-info.plist files" iOS Project, Unity, Mac Computer

I've been trying for the past two hours to figure this thing out! So I already created a project within my Firebase account; an iOS project. Downloaded the google-service-Info.plist files.
If I click Import New Asset and attempt to search for the file.. can't added it like that, I have to drag it into my folder.
I'm aware that the file must be put within the root folder (which I have done many times now), but I still encounter the same error message.
Could not locate google-services.json or GoogleService-info.plist files"
I removed all the Firebase files (SDK), re-installed them,.. same thing..
I also deleted the GoogleService-info.plist file and downloaded a brand new one, same thing!!! enter image description here
I'm currently using Unity 2018.2.1f1, My computer: macOS High Sierra, Version 10.13.6
I have same problem.
Add IOS and Android build component for Unity. Switch to the platform Android. It resolve you problem.
Check SDK status. See in screenshot below:
This happened to me right after adding a GoogleService-info.plist to a project that only had Android support before.
Doing Assets -> Reimport All also worked for me to get past this error.
In my case I missed the step where you generate those files on Firebase.
Generate them from your Firebase console by clicking the Unity icon in your project overview page. See more complete documentation here

How to set up PointCloud SDK?

I downloaded the PointCloud Unity Plugin here. I then followed all the directions on the README file exactly. To be clear, I created a new Unity 4 project, set the platform to iOS in the build settings, set a Bundle Identifier for my app in the player settings, imported the PointCloudUnityPlugin custom package, used the PointCloud menu to request and set an Application Key, opened the test scene and then clicked build and run. When it built, I got an error message in Unity saying "UnityException: Launching iOS Project via XCode4 failed. Check editor log for details." Then, when the project opens in the the Beta version of Xcode 5 (because for no apparent reason it doesn't work in Xcode 4), the Unity splashscreen comes up and then the screen just becomes blue for no apparent reason. It remains blue and there appears to be nothing I can do (rather than doing some cool augmented reality with a dominoe like it;s supposed to do). Any ideas? Thanks!
It turns out that you have to install both the Unity plugin and the sample iOS project and they work together. I'm not sure why but it is working fine now that I have done that.

Resources