xamarin / FacebookComponents

MIT License
87 stars 70 forks source link

Update ios sdk to version 12.2.0 #223

Open thisisthekap opened 2 years ago

thisisthekap commented 2 years ago

The iOS bindings need to be updated to support new ad measurement features which were mandatory after the introduction of iOS 14.5.

@SotoiGhost As @dalexsoto informed me, you are the original maintainer of this repository. If needed, I am happy to help with doing the update, as we need the update rather sooner than later.

@SotoiGhost Please let me know how we best proceed on this one.

SotoiGhost commented 2 years ago

@thisisthekap Thanks for the heads up. Please, feel free to do the update if possible, that would be a great help for us! I have this update in my TODO list, but I'm attending another task before getting into this one. Let me know if you decide to do the update. Thank you in advance!

thisisthekap commented 2 years ago

@SotoiGhost When do you think you would be going to do the upgrade?

Unfortunately, I got a lot on my plate as well as of now.

Huaba93 commented 2 years ago

@SotoiGhost We also need the update. It is important so that we can use aggregated event measurement for apps. But unfortunately I don't know how to do the binding update

To configure Aggregated Event Measurement for your app: Update to Facebook SDK for iOS version 11.2.0 or above to configure your app events.

Source: https://www.facebook.com/business/help/2750680505215705?id=428636648170202

SotoiGhost commented 2 years ago

I'll start doing the update for this

Huaba93 commented 2 years ago

@SotoiGhost thank you very much πŸ™.

ETA? The Christmas sales are just around the corner. πŸ™ˆ

Huaba93 commented 2 years ago

@SotoiGhost any news? or is there anything I can help you with? eg. testing?

thisisthekap commented 2 years ago

@SotoiGhost Any news on your timeline?

MateuszLas421 commented 2 years ago

Any news ?

thisisthekap commented 2 years ago

@MateuszLas421 @SotoiGhost @Huaba93 I started working on the bindings myself today.

SotoiGhost commented 2 years ago

Sorry folks for the long waiting on this. I almost have a working PR for this. I'm hoping to post it by today.

thisisthekap commented 2 years ago

@SotoiGhost Thanks for that. I'll stop working on that now. I would appreciate better communication on planning and ETAs the next time.

thisisthekap commented 2 years ago

@SotoiGhost Do you need some assistance e.g. in testing the updated version?

SotoiGhost commented 2 years ago

Folks, here's the PR for v12.2.0 update. I'll wait for the approval of the team. Meanwhile, you can build the nuget packages by running dotnet cake -t=nuget inside of the Facebook.iOS folder of my fork if you want to test them.

tigreye007 commented 2 years ago

I tried to update to 12.2.0 today and received the following error message:

Severity Code Description Project File Line Suppression State Error Could not find a part of the path 'C:\Users\tigre.nuget\packages\xamarin.facebook.sharekit.ios\12.2.0\lib\xamarinios10\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64-apple-ios-simulator.swiftdoc'.

Any ideas?

thisisthekap commented 2 years ago

@tigreye007 Do you experience this issue when building your project?

tigreye007 commented 2 years ago

@tigreye007 Do you experience this issue when building your project?

I got this when I tried to upgrade the package via nuget (from 9.0.1.5 => 12.2.0)

tigreye007 commented 2 years ago

My guess is that it doesn't like the path length (263 characters)

AlexanderTretyackov commented 2 years ago

I tried to update to 12.2.0 today and received the following error message:

Severity Code Description Project File Line Suppression State Error Could not find a part of the path 'C:\Users\tigre.nuget\packages\xamarin.facebook.sharekit.ios\12.2.0\lib\xamarinios10\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64-apple-ios-simulator.swiftdoc'.

Any ideas?

Same problem

VanjaPopovic commented 2 years ago

Same issue here

denisminb commented 2 years ago

Same problem

"C:\Users\HomeIT.nuget\packages\xamarin.facebook.sharekit.ios\12.2.0\lib\xamarinios10\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64-apple-ios-simulator.swiftdoc".

tigreye007 commented 2 years ago

Has anyone found a workaround for this yet?

AlexanderTretyackov commented 2 years ago

Has anyone found a workaround for this yet?

I work on windows 10, so there is a way to enable long paths,, but anyway I can't build my project with that nuget because of such error: /usr/bin/ditto C:/n/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/ bin/iPhone/Release/[BioGenom.iOS.app/../FBSDKCoreKit.framework.dSYM](http://biogenom.ios.app/FBSDKCoreKit.framework.dSYM) (Π˜Π΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ Π·Π°Π΄Π°Ρ‡ΠΈ TaskId:239) 2> ditto: Cannot get the real path for source 'C:/n/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/' (Π˜Π΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ Π·Π°Π΄Π°Ρ‡ΠΈ TaskId:239) 2>C:\Program Files (x86)\Microsoft Visual Studio\2019_Latest\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(2050,3): error MSB6006: "ditto" Π·Π°Π²Π΅Ρ€ΡˆΠΈΠ»Π°ΡΡŒ с ΠΊΠΎΠ΄ΠΎΠΌ 1.

denisminb commented 2 years ago

Has anyone found a workaround for this yet?

no, not solved yet

denisminb commented 2 years ago

Has anyone found a workaround for this yet?

I work on windows 10, so there is a way to enable long paths,, but anyway I can't build my project with that nuget because of such error: /usr/bin/ditto C:/n/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/ bin/iPhone/Release/[BioGenom.iOS.app/../FBSDKCoreKit.framework.dSYM](http://biogenom.ios.app/FBSDKCoreKit.framework.dSYM) (Π˜Π΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ Π·Π°Π΄Π°Ρ‡ΠΈ TaskId:239) 2> ditto: Cannot get the real path for source 'C:/n/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/' (Π˜Π΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€ Π·Π°Π΄Π°Ρ‡ΠΈ TaskId:239) 2>C:\Program Files (x86)\Microsoft Visual Studio\2019_Latest\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(2050,3): error MSB6006: "ditto" Π·Π°Π²Π΅Ρ€ΡˆΠΈΠ»Π°ΡΡŒ с ΠΊΠΎΠ΄ΠΎΠΌ 1.

I also tried to include long paths in win10, manually create the required folder, but nothing helps

alessandromanfredi commented 2 years ago

Same issue here, solutions? We are stuck with 9.0.1.5 but it's not working anymore.

SotoiGhost commented 2 years ago

Folks, does this happen using Visual Studio or also with command line?

If this is happening with Visual Studio, please, clear your NuGet cache, delete the bin and obj folder and do a restore from command line before opening the solution with VS. Let me know if this works for you.

denisminb commented 2 years ago

Folks, does this happen using Visual Studio or also with command line?

If this is happening with Visual Studio, please, clear your NuGet cache, delete the bin and obj folder and do a restore from command line before opening the solution with VS. Let me know if this works for you.

I clear my NuGet cache, deleted the the bin and obj folder, restored the packages via nuget restore 'path my project' , before opening the project from visual studio, then opened the project and tried to update the package, but the error message is still the same: C:\Users\HomeIT\.nuget\packages\xamarin.facebook.sharekit.ios\12.2.0\lib\xamarinios10\Facebook.ShareKit.resources\FBSDKShareKit.xcframework\ios-arm64_i386_x86_64-simulator\FBSDKShareKit.framework\Modules\FBSDKShareKit.swiftmodule\arm64-apple-ios-simulator.swiftdoc

SotoiGhost commented 2 years ago

@denisminb Try updating your .csproj or your packages.config, setting to the most recent version of FB package by hand and then do the restore before opening VS.

denisminb commented 2 years ago

@denisminb Try updating your .csproj or your packages.config, setting to the most recent version of FB package by hand and then do the restore before opening VS.

I understand you correctly, manually edit the file .csproj or your packages.config, change the version of the iOS packages from 9.0.1.5 to 12.2.0 and then restore?

SotoiGhost commented 2 years ago

@denisminb Yep, and don't forget to clean your NuGet cache, I think deleting the bin and obj is optional, but just in case.

denisminb commented 2 years ago

@denisminb Yep, and don't forget to clean your NuGet cache, I think deleting the bin and obj is optional, but just in case.

The package update seems to have been successful, it remains only to check. Thanks image

SotoiGhost commented 2 years ago

@denisminb Thanks for letting me know that this is working, I'll file a bug of this, as this is working correctly using command line

alessandromanfredi commented 2 years ago

In my case, 12.2.0 dependency is added correctly with the method above but compilation is not working.

ditto: Cannot get the real path for source 'C:/Users/user/.nuget/packages/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/

AlexanderTretyackov commented 2 years ago

In my case, 12.2.0 dependency is added correctly with the method above but compilation is not working.

ditto: Cannot get the real path for source 'C:/Users/user/.nuget/packages/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/

I have same issue

alessandromanfredi commented 2 years ago

From Visual Studio for Mac 2019 it's working

SotoiGhost commented 2 years ago

@arscoloramanfredi @AlexanderTretyackov Can you verify if the dSYM is there?

denisminb commented 2 years ago

@arscoloramanfredi @AlexanderTretyackov Can you verify if the dSYM is there?

I have the same error when building a project in release mode. (in debug mode, everything is fine on virtual devices).

C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.Shared.targets(2069,3): error MSB6006: "ditto" - error number 1
/usr/bin/ditto C:/Users/HomeIT/.nuget/packages/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/ bin/iPhone/Release/Etiket.iOS.app/../FBSDKCoreKit.framework.dSYM 
alessandromanfredi commented 2 years ago

C:/Users/user/.nuget/packages/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/

That folder contains a "Contents" subfolder with plist and DWARF

AlexanderTretyackov commented 2 years ago

C:/Users/user/.nuget/packages/xamarin.facebook.corekit.ios/12.2.0/buildTransitive/../lib/xamarinios10/Facebook.CoreKit.resources/FBSDKCoreKit.xcframework/ios-arm64_armv7/FBSDKCoreKit.framework/../dSYMs/FBSDKCoreKit.framework.dSYM/

That folder contains a "Contents" subfolder with plist and DWARF

Same situation

denisminb commented 2 years ago

@SotoiGhost Hello. any ideas how to solve the problem? Do you need help?

SotoiGhost commented 2 years ago

Can you open a new issue and provide a testcase, please? As I'm not able to repro the issue stated above. Thanks in advance!

SotoiGhost commented 2 years ago

I'm seeing the issue now; I already opened an issue of this: https://github.com/xamarin/xamarin-macios/issues/14291

SotoiGhost commented 2 years ago

Hi all! This fix is being reviewed. Meanwhile, here's a workaround that you could use. Paste it at the bottom of your app .csproj before the </Project>

  <Target Name="_WorkaroundForCopyUserFrameworkDebugSymbols"
    Condition="('$(_PlatformName)' == 'macOS') Or ('$(ComputedPlatform)' == 'iPhone' And '$(IsWatchApp)' == 'false')"
    DependsOnTargets="_CompileToNative;_ParseBundlerArguments;"
    BeforeTargets="_CopyUserFrameworkDebugSymbols"
    Inputs="%(_FrameworkNativeReference.Name)"
    Outputs="$(AppBundleDir)\..\%(_FrameworkNativeReference.Filename).framework.dSYM\Contents\Info.plist">

    <ItemGroup>
      <_Source Include="$([System.IO.Path]::GetDirectoryName(%(_FrameworkNativeReference.Name)))\..\dSYMs\%(_FrameworkNativeReference.Filename).framework.dSYM\**\*" />
    </ItemGroup>
    <PropertyGroup>
      <_Destination>$(AppBundleDir)\..\%(_FrameworkNativeReference.Filename).framework.dSYM</_Destination>
    </PropertyGroup>

    <RemoveDir SessionId="$(BuildSessionId)" Condition="'$(IsMacEnabled)' == 'true'" Directories="$(_Destination)" />

    <!-- if available copy the provided user frameworks .dSYM -->
    <Ditto
      SessionId="$(BuildSessionId)"
      Condition="'$(IsMacEnabled)' == 'true' And Exists('%(_Source.Identity)')"
      Source="%(_Source.Identity)"
      Destination="$(_Destination)"
    >
    </Ditto>
  </Target>