Giter Site home page Giter Site logo

Comments (30)

vg-swift avatar vg-swift commented on April 27, 2024 1

Good to know, will avoid updating any ad adapters for now :)

from facebook-sdk-for-unity.

Aare- avatar Aare- commented on April 27, 2024 1

On my side I get NULL Ref inside unitys methods at this line string mainTarget = pbxProject.GetUnityMainTargetGuid();

Trying to find out another method of getting the target name...

Sorry, mistake on my part - you should call pbxProject.ReadFromFile(projectPath); before trying to resolve targets.
Updated the original code

from facebook-sdk-for-unity.

uchar avatar uchar commented on April 27, 2024 1

@NudeNULL Just use version 14 of facebook SDK, why do you want to update it ? this version is broken and no one from the facebook team cares
About the Unity version, I had a crash on unity 2021.3 , it's not caused by unity

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024 1

Finally got a working build.
The certificates issue was solved by removing the build step in our Jenkins job made by using Xcode plugin, and wrote a custom shell script (after a day of fighting with chatgpt), that builds ad hoc ipa file.

The Facebook crash was fixed by downgrading to 14.1 version.

from facebook-sdk-for-unity.

vg-swift avatar vg-swift commented on April 27, 2024

#688

from facebook-sdk-for-unity.

uchar avatar uchar commented on April 27, 2024

dead plugin

from facebook-sdk-for-unity.

vg-swift avatar vg-swift commented on April 27, 2024

dead plugin

What do you mean? I describe the solution in the thread I posted

from facebook-sdk-for-unity.

uchar avatar uchar commented on April 27, 2024

dead plugin

What do you mean? I describe the solution in the thread I posted

unchecking that doesn't work in our projects , Firebase and some of google plugins will throw build errors

from facebook-sdk-for-unity.

vg-swift avatar vg-swift commented on April 27, 2024

unchecking that doesn't work in our projects , Firebase and some of google plugins will throw build errors

We also use Firebase and google plugins. What about all the other parts I mentioned, what's your cocoapods version and xcode version?

from facebook-sdk-for-unity.

uchar avatar uchar commented on April 27, 2024

unchecking that doesn't work in our projects , Firebase and some of google plugins will throw build errors

We also use Firebase and google plugins. What about all the other parts I mentioned, what's your cocoapods version and xcode version?

cocoapods is 1.12.1 and xcode 14.3.1

from facebook-sdk-for-unity.

uchar avatar uchar commented on April 27, 2024

unchecking that doesn't work in our projects , Firebase and some of google plugins will throw build errors

We also use Firebase and google plugins. What about all the other parts I mentioned, what's your cocoapods version and xcode version?

Error is :

Undefined symbols for architecture arm64:

  "_GADAdLoaderAdTypeNative", referenced from:

      ___73-[ALGoogleMediationAdapter loadAdViewAdForParameters:adFormat:andNotify:]_block_invoke in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

      ___64-[ALGoogleMediationAdapter loadNativeAdForParameters:andNotify:]_block_invoke in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_GADAdSizeBanner", referenced from:

      -[ALGoogleMediationAdapter adSizeFromAdFormat:isAdaptiveBanner:parameters:] in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_GADAdSizeLeaderboard", referenced from:

      -[ALGoogleMediationAdapter adSizeFromAdFormat:isAdaptiveBanner:parameters:] in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_GADAdSizeMediumRectangle", referenced from:

      -[ALGoogleMediationAdapter adSizeFromAdFormat:isAdaptiveBanner:parameters:] in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth", referenced from:

      ___75-[ALGoogleMediationAdapter adSizeFromAdFormat:isAdaptiveBanner:parameters:]_block_invoke in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

      +[ALGoogleMediationAdapter currentOrientationAchoredAdaptiveBannerSizeWithWidth:] in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_GADGetStringFromVersionNumber", referenced from:

      -[ALGoogleMediationAdapter SDKVersion] in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_OBJC_CLASS_$_GADAdLoader", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_OBJC_CLASS_$_GADAppOpenAd", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_OBJC_CLASS_$_GADBannerView", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_OBJC_CLASS_$_GADExtras", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

     (maybe you meant: _OBJC_CLASS_$_GADExtrasBridge)

  "_OBJC_CLASS_$_GADInterstitialAd", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

     (maybe you meant: _OBJC_CLASS_$_GADInterstitialAdBridgeV8)

  "_OBJC_CLASS_$_GADMediaView", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleNativeAdDelegate.o)

      objc-class-ref in libGoogleAdapter.a(ALGoogleNativeAd.o)

      objc-class-ref in libGoogleAdapter.a(ALGoogleNativeAdViewDelegate.o)

  "_OBJC_CLASS_$_GADMobileAds", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

     (maybe you meant: _OBJC_CLASS_$_GADMobileAdsBridge)

  "_OBJC_CLASS_$_GADNativeAdImageAdLoaderOptions", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_OBJC_CLASS_$_GADNativeAdView", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleNativeAd.o)

      objc-class-ref in libGoogleAdapter.a(ALGoogleNativeAdViewDelegate.o)

  "_OBJC_CLASS_$_GADNativeAdViewAdOptions", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

  "_OBJC_CLASS_$_GADQueryInfo", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

     (maybe you meant: _OBJC_CLASS_$_GADQueryInfoBridge)

  "_OBJC_CLASS_$_GADRequest", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

     (maybe you meant: _OBJC_CLASS_$_GADRequestBridge, _OBJC_CLASS_$_GADRequestBridgeV85 )

  "_OBJC_CLASS_$_GADRewardedAd", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

     (maybe you meant: _OBJC_CLASS_$_GADRewardedAdBridge, _OBJC_CLASS_$_GADRewardedAdBridgeV8 )

  "_OBJC_CLASS_$_GADRewardedInterstitialAd", referenced from:

      objc-class-ref in libGoogleAdapter.a(ALGoogleMediationAdapter.o)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

from facebook-sdk-for-unity.

vg-swift avatar vg-swift commented on April 27, 2024

We also use AppLovin with GoogleMediation Adapter, did you try updating the adapter?

from facebook-sdk-for-unity.

uchar avatar uchar commented on April 27, 2024

Yes it's latest version , We actually managed to fix the crash issue with this solution #659 (comment)

but after that fix, we get this crash:
Frameworks/UnityFramework.framework/UnityFramework, 0x0109): Library not loaded: @rpath/IASDKCore.framework/IASDKCore

It seems that multiple packages are failing in recent versions of the xcode

Everything was fine in xcode 13 and facebook 14

from facebook-sdk-for-unity.

uchar avatar uchar commented on April 27, 2024

It also seems to be related to this one googleads/googleads-mobile-unity#2736
Because some people have the same error ( googleads/googleads-mobile-unity#2736 (comment) ) it seems they fixed it 5days ago but for me still not working

from facebook-sdk-for-unity.

uchar avatar uchar commented on April 27, 2024

Sadistic plugin, last week I tested all combinations of external dependency manager and all other settings possible and none worked!
I finally fixed it by downgrading Facebook SDK from 16.0.1 to 14.1.1 !

from facebook-sdk-for-unity.

abogarsukov-braingames avatar abogarsukov-braingames commented on April 27, 2024

We've the same issue after upgrading Facebook from 14 to 16, but it our case it cannot load DTBiOSSDK.

from facebook-sdk-for-unity.

santiagomartinJC avatar santiagomartinJC commented on April 27, 2024

I could fix this by adding the addToAllTargets parameter in dependecies.xml
./Assets/FacebookSDK/Plugins/Editor/Dependencies.xml


    <iosPods>
        <iosPod name="FBSDKCoreKit_Basics" version="~> 15.1" addToAllTargets="true" />
        <iosPod name="FBSDKCoreKit" version="~> 15.1" addToAllTargets="true"/>
        <iosPod name="FBSDKLoginKit" version="~> 15.1" addToAllTargets="true"/>
        <iosPod name="FBSDKShareKit" version="~> 15.1" addToAllTargets="true"/>
        <iosPod name="FBSDKGamingServicesKit" version="~> 15.1" addToAllTargets="true"/>
    </iosPods>

#659 (comment)

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

In my case it was crashing because of the DisableBitcode script, since I deleted it the app started

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

Actually no, it didn't help, no idea what happened then...But without Facebook SDK, even with 5-6 other SDKs everything works well, as always, gotta love the SDK team from facebook

from facebook-sdk-for-unity.

Aare- avatar Aare- commented on April 27, 2024

@uchar Feeling your pain m8! This is riddiculous that integrating simple stuff like an SDK takes days of work.

I think I got te working combination of setting to build iOS without crashing for FBSdk 16.0.1, Firebase 10.7.0 and AppLovinSDK 11.11.3:

Contrary to AppLovin docs, I checked all the toggles in the iOS Resolver Settings:
274545451-546dfc9b-2770-4f28-8839-7a1f7cb92b66

My Podfile looks like this (last part added during build callback):

source 'https://cdn.cocoapods.org/'

platform :ios, '12.0'

target 'UnityFramework' do
  pod 'AppLovinMediationFacebookAdapter', '6.14.0.0'
  pod 'AppLovinSDK', '11.11.3'
  pod 'FBSDKCoreKit', '~> 16.0.1'
  pod 'FBSDKCoreKit_Basics', '~> 16.0.1'
  pod 'FBSDKGamingServicesKit', '~> 16.0.1'
  pod 'FBSDKLoginKit', '~> 16.0.1'
  pod 'FBSDKShareKit', '~> 16.0.1'
  pod 'Firebase/Analytics', '10.7.0'
  pod 'Firebase/Core', '10.7.0'
  pod 'Firebase/Crashlytics', '10.7.0'
  pod 'Firebase/Messaging', '10.7.0'
  pod 'Protobuf'
  pod 'UnityMediationSdk', '~> 1.0', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
  pod 'UnityMediationUnityAdapter', :source => 'https://github.com/Unity-Technologies/unity-mediation-cocoapods-prod.git'
end
target 'Unity-iPhone' do
  pod 'FBSDKCoreKit', '~> 16.0.1'
  pod 'FBSDKCoreKit_Basics', '~> 16.0.1'
  pod 'FBSDKGamingServicesKit', '~> 16.0.1'
  pod 'FBSDKLoginKit', '~> 16.0.1'
  pod 'FBSDKShareKit', '~> 16.0.1'
end
use_frameworks! :linkage => :static

post_install do |installer|
    installer.generated_projects.each do |project|
        project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
            end
        end
    end
end

Build Postprocess callback looks like this:

class DisableBytecodeSupport : IPostprocessBuildWithReport {
        public int callbackOrder => 0;

        public void OnPostprocessBuild(BuildReport report) {
        if (report.summary.platform != BuildTarget.iOS) 
            return;
                    
        string projectPath = report.summary.outputPath + "/Unity-iPhone.xcodeproj/project.pbxproj";
        var pbxProject = new PBXProject();
        pbxProject.ReadFromFile(projectPath);

        var mainTarget = pbxProject.GetUnityMainTargetGuid();
        var testTarget = pbxProject.TargetGuidByName(PBXProject.GetUnityTestTargetName());
        var unityFrameworkTarget = pbxProject.GetUnityFrameworkTargetGuid();       
        
        pbxProject.AddShellScriptBuildPhase(
            mainTarget,
            "Run Script",
            "/bin/sh",
            @"cd ""${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Frameworks/UnityFramework.framework/""
        if [[ -d ""Frameworks"" ]]; then
        rm -fr Frameworks
            fi
        "
        );

        #region Disabling Bitcode on all targets
        pbxProject.SetBuildProperty(mainTarget, "ENABLE_BITCODE", "NO");
        
        //Unity Tests
        pbxProject.SetBuildProperty(testTarget, "ENABLE_BITCODE", "NO");

        //Unity Framework
        pbxProject.SetBuildProperty(unityFrameworkTarget, "ENABLE_BITCODE", "NO");
        pbxProject.SetBuildProperty(unityFrameworkTarget, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES");
        #endregion
        
        // add Google Plist
        pbxProject.AddFileToBuild (pbxProject.GetUnityMainTargetGuid(), pbxProject.AddFile("GoogleService-Info.plist", "GoogleService-Info.plist"));        
        pbxProject.WriteToFile(projectPath);
        }
    }

I also have Dependencies.xml set up like in the comment above:
#694 (comment)

Hope this helps!

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

On my side I get NULL Ref inside unitys methods at this line
string mainTarget = pbxProject.GetUnityMainTargetGuid();

Trying to find out another method of getting the target name...

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

Thanks for the update @Aare- , but I can't get the resulting podfile to look like yours, the bottom part is missing, no errors in logs, will try to investigate that for now.

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

this is my podfile with the latest script changes used

source 'https://cdn.cocoapods.org/'

platform :ios, '13.0'

target 'UnityFramework' do
  pod 'AppLovinMediationAdColonyAdapter', '4.9.0.0.4'
  pod 'AppLovinMediationByteDanceAdapter', '5.4.1.1.0'
  pod 'AppLovinMediationFacebookAdapter', '6.14.0.0'
  pod 'AppLovinMediationFyberAdapter', '8.2.4.0'
  pod 'AppLovinMediationGoogleAdapter', '10.10.0.0'
  pod 'AppLovinMediationGoogleAdManagerAdapter', '10.10.0.0'
  pod 'AppLovinMediationInMobiAdapter', '10.5.8.1'
  pod 'AppLovinMediationIronSourceAdapter', '7.5.0.0.0'
  pod 'AppLovinMediationMintegralAdapter', '7.4.6.0.0'
  pod 'AppLovinMediationMyTargetAdapter', '5.19.0.0'
  pod 'AppLovinMediationSmaatoAdapter', '22.4.0.0'
  pod 'AppLovinMediationUnityAdsAdapter', '4.9.0.0'
  pod 'AppLovinMediationVungleAdapter', '7.1.0.0'
  pod 'AppLovinMediationYandexAdapter', '6.0.0.0'
  pod 'AppLovinSDK', '11.11.3'
  pod 'AppsFlyer-AdRevenue', '6.9.1'
  pod 'AppsFlyerFramework', '6.12.1'
  pod 'FBAudienceNetwork', '6.14.0.0'
  pod 'FBSDKCoreKit', '~> 15.1'
  pod 'FBSDKCoreKit_Basics', '~> 15.1'
  pod 'FBSDKGamingServicesKit', '~> 15.1'
  pod 'FBSDKLoginKit', '~> 15.1'
  pod 'FBSDKShareKit', '~> 15.1'
  pod 'Firebase/Analytics', '10.7.0'
  pod 'Firebase/Core', '10.7.0'
  pod 'YandexMobileMetrica', '4.2.0'
end
target 'Unity-iPhone' do
  pod 'FBSDKCoreKit', '~> 15.1'
  pod 'FBSDKCoreKit_Basics', '~> 15.1'
  pod 'FBSDKGamingServicesKit', '~> 15.1'
  pod 'FBSDKLoginKit', '~> 15.1'
  pod 'FBSDKShareKit', '~> 15.1'
end
use_frameworks! :linkage => :static

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

Also I saw Facebook just released a newer version of SDK, even though the dependencies are still the same -> 16.0.1, I will try it anyway.

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

No, it didn't help, will look into crash logs tomorrow

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

Hey @Aare- , what version of Unity do you use?

from facebook-sdk-for-unity.

Aare- avatar Aare- commented on April 27, 2024

@NudeNULL I'm on 2021.3.23f

I'm not sure if the last part of the podfile is required, but you can always add it manually to the generated xcode project.
It should be added by the build post process script but depending on your other plugins it might get overwritten.

I also see you have a lot of other plugins added, it might be a good idea to add them one by one and check which one exactly is causing the problems.

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

I am seeing a pattern where already two developers have their projects on 2021.3.xx and they dont have the crash, where mine project is on 2020 version, will try the update and write here the result

from facebook-sdk-for-unity.

NudeNULL avatar NudeNULL commented on April 27, 2024

@NudeNULL Just use version 14 of facebook SDK, why do you want to update it ? this version is broken and no one from the facebook team cares
About the Unity version, I had a crash on unity 2021.3 , it's not caused by unity

I am not sure what was the reason for the update, I tried so many things that I forgot about trying the downgrade for facebook SDK, will see what happens with newer version of unity and then will try.

Because after upgrading unity we now have an issue with certificates, have no idea what unity upgrade have to do with triggering an error that says that xcode can't find the certificate with private key for the team id, I am losing my mind and becoming an insane person, day by day, need some psychotherapy...
Thank you facebook sdk team for making me want to kill someone ....

from facebook-sdk-for-unity.

Aare- avatar Aare- commented on April 27, 2024

@NudeNULL Unrelated to this issue, but check out: https://docs.fastlane.tools/actions/match/
This solved my issues with certificates for good

from facebook-sdk-for-unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.