Unity Google Play Services for iOS 'TokenClient' - ios

I have no problem in Google Play services. the thing is I can't build for Xcode because I'm using the Unity Google Play Services plugin. I don't plan on using iOS. I read that I have to put NO_GPGS on Scripting Define Symbols but it gives me this error
error CS0246: The type or namespace name 'TokenClient' could not be found. Are you missing a using directive or an assembly reference?
thanks in advance

According to the official github issues page (https://github.com/playgameservices/play-games-plugin-for-unity/issues/689) they have fixed this issue in the latest release (released 10 hours ago as I write this) which is 0.9.25. You may need to delete the old plugin before installing this one. Just delete the Assets/GooglePlayGames folder and any lingering google files in your Assets/Editor and Assets/Plugins/Android folders. Maybe back up first as well, if you don't use source control.
The issues page used to be dormant but they seem to be actively responding to questions these days.

Related

GoogleAppMeasurement.xcframework has an incorrect or unknown format and cannot be processed

I really don't know if this is specific to the package or to xcframework or to the setup. In my case I just:
open VS 2022
create a Xamarin iOS empty project
add the Google Mobile Ads 8.13.0.1 Nuget package through the VS NuGet package manager ( this is the package https://www.nuget.org/packages/Xamarin.Google.iOS.MobileAds/)
build
get this error:
C:\Users\Admin\AppData\Local\XamarinBuildDownloadCache\GAppM-8.9.1\GoogleAppMeasurement-8.9.1\Frameworks\GoogleAppMeasurement.xcframework has an incorrect or unknown format and cannot be processed.
I've been using google ads in iOS projects for 10 years, updates tend to screw everything up, but it's usually fixable, this time I'm completely stuck.
I tried filing a bug report (https://developercommunity.visualstudio.com/t/GoogleAppMeasurementxcframework-has-an/10153891?entry=problem) and an issue on github (https://github.com/xamarin/GoogleApisForiOSComponents/issues/573) , but experience tells me it's useless...
[EDIT]
The project is here:
http://www.andreasabbatini.org/Files/AdmobTest.zip
Answering my own question:
I “think” I have found a solution, if not the cause. I cannot replicate it relably, but sometimes it happens sometimes not.
(in a brand new PC or VS install)
1-Create a project similar to that one. Add the Google Ads NuGet package. Build. The build works
2-Create another project (or use that one, it’s the same). Add the same Google Ads NuGet package, then the Xamarin.Facebook.AudienceNetwork.iOS 6.9.0.1 https://github.com/xamarin/FacebookComponents/tree/main/Facebook.iOS/source/AudienceNetwork
build this or the other project, for some strange reason, the above error starts to appear
3-remove the above facebook package, the error is still there. I’ve tried many things here, readding packages, etc none work
4-remove the packages, delete manually C:\Users\Admin\AppData\Local\XamarinBuildDownloadCache and readd the packages one at a time. Most of the time it works, but sometimes I have to repeat this step.

Problem when publishing an application on the App Store [Non-public API usage]

Until three weeks ago, my application could upload it to the App Store without any problem. However, Apple has refused to upload the app with a new message about Non-public API usage.
The application is developed with Xamarin in Visual Studio for Mac and has updated all the libraries and packages. Can anybody help me? Because I can not find what the problem is, nor do I see any solution. It will be something new?
Thank you all.
Non-public API usage:
The app references non-public selectors in AppAytoSS.iOS:
addTemporaryAttribute:value:forCharacterRange:,
addTemporaryAttributes:forCharacterRange:, behaviorWithType:,
defaultBaselineOffsetForFont:, defaultLineHeightForFont:, finished,
greekingThreshold, horizontalCornerRadius,
initWithSource:convolutionState:weights:, initWithType:,
postSession:didAddPlayer:, postSession:didReceiveData:fromPlayer:,
postSession:didReceiveMessage:withData:fromPlayer:,
postSession:didRemovePlayer:,
postSession:player:didChangeConnectionState:,
postSession:player:didSaveData:, preferredMetalContext, removeData:,
removeTemporaryAttribute:forCharacterRange:, setGreekingThreshold:,
setHorizontalCornerRadius:, setIsPrimary:, setShouldAntiAlias:, setUUID:,
setVerticalCornerRadius:, shouldAntiAlias,
temporaryAttribute:atCharacterIndex:effectiveRange:,
temporaryAttribute:atCharacterIndex:longestEffectiveRange:inRange:,
temporaryAttributesAtCharacterIndex:effectiveRange:,
temporaryAttributesAtCharacterIndex:longestEffectiveRange:inRange:,
textContainerChangedTextView:, toolTip, usesBackgroundSession,
verticalCornerRadius
We had the (exactly) same problem with an Xamarin iOS Project and where able to fix it via Setting Build/iOS Build/Linker Behaviour: Link Framework SDKs only (before Don't link) - what Jack Hua link shows as solution.
We where not able, to figure out the problem behind though. Two different MacBooks where used, one with the most recent version of XCode, Visual Studio and Xamarin Libs, the other with slightly older versions. The latter was able to create an IPA without the above described error, the updated machine was not.
However the used NugGet Packages where the same, so I think this issue is not related to them.
After filling an internal issue with the Xamarin team, they advised doing the following
adding --linksdkonly to the Additional mtouch arguments on the iOS Build settings page
As it seems that Visual Studio ignores the settings in GUI
I have tested it and now get my build accepted by Apple without the above error
This is the issue filed on Xamarin
https://github.com/xamarin/xamarin-macios/issues/5913
I find a thread where people meet the same problem with you recently:build-status-has-changed-to-invalid-binary.
So, I guess some third part nuget packages you are using has updated and using these non-public selectors that Apple not allow.
I would suggest you to get you code three weeks ago and don't update any third part nuget packages. Then submit again to check if it is the problem.
You can also compare your reference with the references people listed in that thread and find something similar. And any nuget packages related to Player(As I can see some player selector in the non-public selectors list)?

Firebase-Unity Project: Exporting for iOS on Windows 10. Workaround?

Recently added Firebase Storage and Authentication to my Unity project. I work on Windows, have a single Unity Pro License, and want to export my App for iOS, as I have done many times before in this dev process.
However, since the addition of Firebase, I'm told I apparently can't export my Firebase-Enabled Unity project for iOS without swapping Unity to an OSX device (which I don't have in comparable quality).
I've noticed a singular thread here where a supposed workaround was discussed, but can't seem to pull it off myself:
"The plugin that comes with firebase depends on cocoapods to handle
transient dependencies. If you look at the Assets ->
PlayServicesResolver -> IOSResolver -> Settings
You can configure it to generate the podfile but not do the remaining
steps." - from user johnb003, March 18th 2017.
Can't seem to find the configuration settings described here. Scoured the forums/communities for solutions, but no results elsewhere.
So, that said, any other Firebase user have a workaround for this issue? I adore the collective Google has put together with their product, but I can't really afford to invest in another Unity Pro License just for the sake of working off of my sub-standard Macbook. Thoughts?
Looks like there's a Google Github project, Unity JAR resolver, describing how the Unity Play Services Resolver works for each target platform.
The documentation is pretty extensive, and solutions are use-case specific, so I can't give you much help on specific podfile settings, but hopefully you can sift through it yourself.

How can I use IDataErrorInfo with mvvmcross and monodroid

I am trying to build a cross platform application. Currently I am setting up a project using Xamarin MonoDroid 4.7 and MVVMCross. I would like to be able to use INotifyDataErrorInfo but I get the following compilation error:
The type 'System.ComponentModel.INotifyDataErrorInfo' exists in both 'c:\Program Files(x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll' and 'c:\Users\MvvmCross.PortableSupport.3.0.6\lib\MonoAndroid16\System.Windows.dll
Has anyone come across this/developed a workaround or solution?
Thanks
We think Mono for Android/Xamarin.Android has recently added this support - but the situation isn't clear - see https://bugzilla.xamarin.com/show_bug.cgi?id=5340
When we get this confirmed and work out which versions do/don't have this - which is hopefully in the coming week or two - then MvvmCross will hopefully be able to remove its version.
Also, I hope but I don't know that the MvvmCross versions of System.Windows, System.Net, etc can be removed in the near future - see https://bugzilla.xamarin.com/show_bug.cgi?id=8035
This is not at all clear at present, and it's likely to be a source of issues while PCL support from Xamarin moves through none->alpha->beta->stable
I'm afraid those 'NEW' bugzilla issues above represent all the information I have on this at present.
In the meantime... if you need to resolve the INotifyDataErrorInfo within your own project and environment, then one route forwards is to branch the MvvmCross source and to change the MvvmCross shim System.Windows.dll to type forward instead of replacing this type - the code is in https://github.com/slodge/MvvmCross/tree/v3/PortableSupport/System.Windows
I am sorry about these problems... and I'm very much looking forwards to having official PCL support from Xamarin so I no longer have to work around them.

Connecting iOS with Azure Cloud

I'm sorry, I don't get this Azure Cloud thing working for iOS.
Has anyone had experiences with this so far? I don't get any useful results in google...
Up to now I downloaded the Azure Toolkit for iOS on https://github.com/microsoft-dpe/wa-toolkit-ios and didn't really get it working. On every video/tutorial I found, they referenced to another github site which is now 404 error. I finally found the referenced project on another link but didn't get this working for me either.
For the Azure Toolkit on https://github.com/microsoft-dpe/wa-toolkit-ios I didn't find where to put my namespace, user and key (so I got an error like "hostname not found").
For the "other" (older version?) Toolkit there are some "directory not found" errors while building.
Any help? I don't believe that there is nobody out there having connected iOS with Azure successfully!
Using the latest version from Github, you should open the watoolkitios-samples.xcodeproj in Xcode. Then, I think the README.md is a bit out of date, you need to open watoolkitios-samples.plist in the "Supporting Files" folder in order to configure the client application. You have a number of configuration types to choose from, the simplest is "Direct", although probably not recommended for production use.
This library offers a rather spohisticated set of Web Services that you can call directly from the iOS client. I would try it out before starting building services from scratch!

Resources