Firebase Unity xCode linking errors - ios

I am having issues trying to make a build from Unity (version 5.5.2f1) with Firebase Auth / Database imported. I am using the newest Firebase SDK of 3.0.0.
The errors I get are as follows:
I believe it has something to do with cocoaPods. The XCode project compiles with a podfile. And the errors I believe are related to missing libraries? But all the required libraries are set to iOS, and are included with the XCode project.
Unsure of what to try next. Thanks in advance to anyone able to help.

When you build and run from within unity, it tries to run the pod installation for the dependencies needed, and patches the xcode project file (not workspace).
If there is an error with this process, you should see it in the console.
Normally pods are meant to be used with the workspace file, but since unity automatically opens the xcode project the plugin tries to make it work.
Try opening the .xcodeproj instead of the workspace.

So I finally figured out my issue. I had a previous build that worked all the way through to my device. So I eventually tried opening that one again, and I ran into the same errors with an older build.
So that got me thinking.. Why would a previous build that used to work fail this time around?
I came to the conclusion that the only things that changed were possibly me updated Unity to 5.5.2f1. So I updated again to the latest release at this time which is 5.5.2p3, and ran through the same steps:
1) Build to iOS
2) Install pods in the target folder
3) Run xc workspace
And it successfully built. So it must of been something on Unity's side. If anyone ever runs into a similar situation, hopefully this will help.
P.S. I also did update to the latest release (at this time) of Unity Firebase SDK of 3.0.1. Not sure if that had anything to do with making a successful build, but wanted to put that information out there.

Related

'FBSDKShareKit/FBSDKShareKit.h' file not found

I've made an IOS build on Unity for an App we're making after adding the facebook SDK, moved the build on a hard drive and tried to build it on xcode on the mac we have at the office, as I always do before uploading it to the app store. I ran into this error and I've been stuck on this issue for 2 full work days and it's driving me a bit crazy, here are the thing's I've tried:
-Install cocoapods, both on the default terminal directory and on the project's directory (I'm not too experienced with cocoapods so I don't know if that made a difference. I also did pod update while standing on the project directory).
-I saw that the IOS resolver has an option called "generate pod files" that people said needed to be checked when building to solve this issue. It was checked by default on my project, so that wasn't it.
-Added the framework path on the build settings to where the facebook SDK is at (though the way it looked on my xcode seemed a bit different than the way I've seen it on other people's xcode screenshots)
-Tried commenting out some #include lines on the headers that are generating the issue. It only produced more errors.
-People said to open the project from the workspace instead of the xcodeproject but unity doesn't seem to generate a workspace file.
-Tried downgrading the Facebook SDK to a previous version but the versions people claim are working don't seem to be on the repository anymore, so it doesn't let me downgrade to them.
At the moment I'm trying to make it work with the latest Facebook SDK which is 9.0.0.
Any help would be appreciated, please let me know if I'm not being specific enough about the issue or if there's any information about my project I should include on the post
The .xcworkspace should be created by Cocoapods, not by Unity directly.
If you already have the Podfile generated, just run pod install on the project directory and open the created .xcworkspace file after Cocoapods finishes installing the external dependencies.

How to compile xcode project?

I have an Xcode project for an iOS app as a legacy project. Full source code, it works 100%. I need to publish it to AppStore. But I have never used Xcode, macOS or done any ios app development related stuff and I have problems to compile it and not sure if I am doing it correctly.
I tried "Product->Run" and "Product->Build". I always get "Build Failed" and some errors. In the navbar, I choose "iPhone 7 (10.3.1)" and some other versions as well. Errors I get -
But as I mentioned, it is a finished app and I don't feel I should be making any changes to the code and not to a 3rd party code (SDWebImage).
I want to compile this project so I get the .ipa file. What is the step-by-step approach to getting a .ipa file from source code?
You mentioned in the comments that you downloaded and unpacked a .zip of the project. Your issues are most likely caused by a conflict in the way the dependencies were setup.
Try delete the pods folder and run pod install in terminal, in the root project folder, to re-install all the project dependencies.

Missing Frameworks from Cocoapods after switching computers

I recently switched computers and brought over my project but when I opened the workspace I noticed that all of my frameworks via Cocoapods were missing.
I closed the workspace and went into the folder directory and deleted the current xcworkspace, 'Pod' folder, and podfile.lock file, and ran a pod update and pod install. I also deleted the Derived Data for safety measures. However, after reopening the newly created workspace the frameworks were still missing and I am getting an error saying that functions that are within my frameworks have been renamed.
Can anyone point me to another solution? I feel like I've tried just about everything that I could find on here and what I know. Thanks in advance!
Missing Frameworks
Framework Incorrect Full Path
Function Renamed Errors
The frameworks are probably missing because they've not been built yet, but they will show up the first time you run the project.
The function rename warnings are probably because you're using a newer version of Xcode that is using Swift 4.2 by default. Usually the easiest way to tackle this is to upgrade your Pods to newer versions.

Too many semantic issues. Xcode 8.2.1

I was working on a project before in Xcode 7, it perfectly compiled and ran. When I copied the entire project onto a fresh installed macOS and tried to compile in Xcode 8.2.1 I get these errors. I tried all these links listed below, none of them helped. Is there a fix to this?
Tried Solutions:
Thread 1
Thread 2
Errors:
I was working on a project before in Xcode 7, it perfectly compiled and ran. When I copied the entire project onto a fresh installed macOS and tried to compile in Xcode 8.2.1 I get these errors.
It appears that your project has external dependencies that you haven't accounted for. It's hard to say what those are without a look at the project, but the header files that Xcode is complaining about (e.g. L2SDKIPCamViewer.h, DGActivityIndicatorView.h, etc.) should provide some clues. Check the original machine to see whether it has a package manager like CocoaPods installed, and if so, which packages are installed. The project's dependencies should be documented in a README file somewhere near the top of the project's file hierarchy, but if the project was developed by you or someone in your organization, or if the developer was just too busy to bother, that might not be the case and you'll have to find and fix the dependencies one at a time.

Why do I need to clean the xcode project everytime I build the project?

I have an iOS app written in Swift. Whenever I run the project, it gives Shell Script Invocation Errors:
When I clean the project, the subsequent build performs ok. But again, if I build the project next time, it again gives the same error.
Cleaning and rebuilding the project takes a lot of time. Is there some way around it?
It's difficult to know exactly what is causing this issue as it could be a number of things, So the question is quite broad.
Few things to try...
Check your build phases in the project and look for anything that might not be expected
Try checking out your project (if using version control) in another location such as your Documents folder to make sure there isn't a permissions issue.
Try cleaning the build folder using alt, cmd, shift + k.
If your still having issues after that try providing additonal information.
What version of xcode are you using?
Are you using any xcode plugins?
Are you using any package management solutions? carthage? pods?
Have you tried to build your project on another computer?
Are you using the latest version of the command line tools?

Resources