-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find a part of the path ... UAAirshipMessageCenterCoreImport.h #5
Comments
Occurs to me to ask... is this even .NET 7 compatible? |
Trying to manually install Airship.Net.iOS.MessageCenter results in a similar err:
|
I think its a bug in Xamarin that I am hoping this fixed - xamarin/xamarin-macios#19047 Looks like they released it 3 hours ago, Ill try to reproduce again today assuming I can update to that package. |
@rlepinski a bug with building the Airship.Net library to begin with, or a bug that only impacts installing it? I'm not sure the linked issue is related as you don't typically need to be connected to a Mac (or using VS for Mac) to simply install the NuGet package. I just updated to VS 17.8.0 Preview 3 last night and I have all my packages updated in MAUI with no change to the error. |
Yeah, ill take another look. The related issue was marked as fixed which sounds a lot like this issue. The file that its complaining about exists in the nuget package - https://nuget.info/packages/Airship.Net.iOS.Core/16.12.3 but for whatever reason does not exist if you explore your nuget cache on your machine. |
I am going to try to repackage the nugets to see if its something happening with the zip when we generate the nugets. If that still wont work ill try to rebuild using .net7 to see if I get a different result. If neither thing works ill try to reach out to the Xamarin folks to see if they have an idea on the issue. |
Or the MAUI folks? 👍 |
I think its one in the same but yeah ill reach out to both |
@rlepinski any word on this? It's the last puzzle piece stopping me from deploying my app. |
@alexkozler Still in progress, hoping to have an update for you by the end of this week. |
Just a quick update on this. We fixed some symlink issues in 17.x, I am working on back porting those now to 16.x which should be done today so we can attempt to rebuild this plugin with the updated fixed symlinks to see if the issue goes away. I also have another person working on updating this to 17.x at the same time. Tomorrow I should be able to actually test a few different things to see if I need to escalate the issue. @alexkozler do you have another plugin that you depend on that packages an xcframework successfully on windows? |
New 16.12.5 release is out - https://github.com/urbanairship/ios-library/releases/tag/16.12.5, will try the new xcframeworks tomorrow am |
I do not, unfortunately. |
I am wondering if this is a path issue since that path is 261 on your machine. When I rebuilt it using the xcframeworks from 16.12.5 that folder is empty and it works as expected. |
Could you test out a build to see it resolves it for you? |
If you unzip and setup a local nuget repo to the directory you can install the 16.12.5 version of the files. Hopefully it resolves your issue. I am not sure why the directory is empty vs 16.12.3, but i suspect its because of symlinks actually being correctly setup on the xcframework |
https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-long-path According to that VS still does not support long path support? This has been a very frustrating adventure on windows. I am trying to move my nuget path to just |
Indeed it is a frustrating adventure. I have also done the same thing, setting my nuget path in environmental variables to I was able to get the local nuget source set up with the build.zip you provided and brute-force the packages in. It's not pretty. I had to manually override a dependency to |
The article implies it will work fine as long as the GPO or Registry setting is set to enable them at the OS-level. For NuGet installs and restores which is what we're trying to do. I should try this on my Mac but I'm not sure if MAUI is properly supported on there and VS for Mac was discontinued anyhow... |
In the note - |
Maybe I didnt set something up properly though |
I also got Airship.Net.iOS.Core to install changing my NuGet directory to just |
So if we update to SDK 18 in this pr - #6 Message Center is now fully swift and does not have long header files to import, so we got that going for us. The automation module is still in obj-c though so it probably will have the same problem. I believe we were able to reduce the length of the paths on Xamarin by specifying the |
Prior to trying to install this on Windows, what OS and IDE were you doing it successfully in? |
We are on macs since we do mostly native SDK development. The other two engineers that normally work on maui/xamarin/dotnet are either on vacation or in Paris so I am not sure what they typically use. @jyaganeh will be back on Monday who did the first pass on this repo so hopefully he will have more info for us but I am trying to figure out what tools microsoft provides. If I cant make any progress ill open an escalation for them |
I checked out Facebook packages and its the same path. They also have the same issue popping up - xamarin/FacebookComponents#261 |
Current longest file path I can find is this: (259 characters) That is using I am going to look into combining all the Airship iOS modules into a single xcframework with a shorter name, if I did that the path above would look like: c:\n\airship.net.ios\16.12.3\lib\net6.0-ios16.1\Airship.Net.iOS.resources\Airship.xcframework\ios-arm64_x86_64-maccatalyst\Airship.framework\Versions\A\Headers\UADefaultMessageCenterMessageViewController.h That is 205 characters, way below the max length. Users might still have to move the nuget package repo to the root of a drive but at least they have a path forward. We will also reduce our overall paths once we migrate the rest of the obj-c code and headers are no longer in the xcframework. |
We are exploring using this Xamarin.Build.Download plugin to only download the frameworks when you actually do a build on mac |
local-nuget-feed-rev9.zip |
I had to manually include a PackageReference to the newest Xamarin.AndroidX.Lifecycle.LiveData so it wouldn't bark about downgrading, but afterwards I was able to get Airship.Net to install from your zip without a hitch. I put it in |
Could you verify you can get a build for iOS and be able to call takeOff? This is looking promising. |
Just trying to get everything configured correctly now. Need to figure this out before I can get to takeOff 👍 |
@rlepinski are you able to get a sample project with this to actually build at all? On .NET 7.0 with what you've provided, my project hangs indefinitely on build. Can't do anything with it at all. |
@alexkozler I can get it to build on a mac but having issues on windows. I wish there was better documentation on some of these build tools that Xamarin packages use. |
We stopped trying to use the downloader and instead are going to go with a new combined xcframework Combined with the nuget package: |
@alexkozler When we use .net7+ it keeps the package as a .zip in when you unpack the nuget (didnt notice that before). We would have to drop support for .net6 but this seems like the only reasonable way to proceed. Could you see if it blows up for you on windows? https://drive.google.com/file/d/1uYBz51XsAEU_4kzCJd7-pyHlWN-NEQ4B/view?usp=sharing |
@alexkozler it seems to be working for us with .net7+, but linked mac builds are broken still - xamarin/xamarin-macios#19173 (comment) Looks like that will need .net8 |
@rlepinski sorry I haven't had a chance to test this yet. When you say "linked mac builds" you mean building the iOS app by linking to your Mac from Windows, right? |
Yep, no matter what we do we cant get that to build properly. The xcframework is missing on the mac |
@rlepinski will the official nuget libraries be updated for the same functionality? I can move my project between my Mac and PC if I absolutely have to for the sake of actually building, but I'd hate to have to ship to production with local nuget references |
Seems like .NET 8.0 is only a week away at least. |
Yeah we are going to do a release this branch hopefully soon - #8 then we will look into .net 8 in a week |
@alexkozler we have native sdks going out today so we are waiting on them for the v18 release. Hoping for today or tomorrow release. |
@alexkozler Release 18.0.0 is out, with updated Airship SDKs and a bump to .NET 7.0. In my testing, the new version builds fine in VS on Windows, but linked Mac builds still aren't working (which is also the case when including other iOS bindings that use XCFrameworks). Hopefully that gets addressed in .NET 8 so we can fix it in the next release. |
@rlepinski @jyaganeh I was able to get Airship.Net installed and running on Android in MAUI in .NET 8.0. I have not tried iOS yet. Some issues I have run into, or am currently running into:
As a side note I would love to see the sample MAUI app remade with .NET 7.0 and/or .NET 8.0 and have it properly build and receive push notifications. Perhaps with a sample google-services.json file included as it does not incorporate one currently... if that file is even needed?? Since Xamarin is dead in favor of MAUI I'm sure many others will be looking to do the same MAUI + newer .NET transition. |
We are currently working on getting .net8 working and will hopefully be able to have a better answer to most of the issues you are going through right now. It looks like our FCM package adds a dependency to FirebaseMessaging and Google Services.base, which looking at the FirebaseMessaging dependency, it already has base and basement as dependencies so both will be required. If you can call takeOff with verbose logging enabled you should see some logs about firebase and push tokens. If not, if you could share those logs with me I can look through them. [email protected] 1 & 2) Will look into it but might move away from properties/plist based airship config for maui |
Hey @alexkozler, thanks for bearing with us on this one. We just shipped release
For (1) and (2) above, I see We'll work on improving out documentation for (3). There's currently a link to external docs for setting up Firebase, but the info there doesn't translate very well to MAUI (or Xamarin, for that matter). (4) Doc links were updated in the new release. We'll also work on getting our sample code updated in the main docs for (6). Thanks again for the feedback! (5) The <ItemGroup Label="Android Resources" Condition="'$(TargetFramework)' == 'net8.0-android'">
<GoogleServicesJson Include="Platforms\Android\Assets\google-services.json" />
</ItemGroup> I think (7) is likely due to the google services file not getting picked up by Firebase during the build process. Ryan had good suggestions for debugging that, but I'm hopeful that getting the airshipconfig and google services json in the right place and updating your csproj will let you get past that. Also, as part of the new release, the sample app was updated to target .NET8.0. We'd definitely love to make it easier to get up and running with the sample app, but we unfortunately can't bundle in a working |
@alexkozler not exactly sure what's going on there, as the new version of that nupkg is available on nuget and the contents look fine to me. It might help to delete your |
Yeah, apologies for that reply- I deleted it a couple minutes after posting. I had to manually remove the reference to the previous version from my .csproj file and then install the new one and it was happy. |
Trying to install to a .NET 7.0 MAUI app and getting the same issue I got on Xamarin.Forms that was resolved recently in:
urbanairship/urbanairship-xamarin#219
The text was updated successfully, but these errors were encountered: