@@ -48,12 +48,47 @@ jobs:
4848 -c Release \
4949 -o artifacts/nuget
5050
51- - name : Build iOS sample
51+ - name : Validate nupkg layout
5252 run : |
53- dotnet build samples/Kapusch.Facebook.iOS.Sample/Kapusch.Facebook.iOS.Sample.csproj \
54- -c Debug \
55- -p:RuntimeIdentifier=iossimulator-arm64 \
56- -p:EnableCodeSigning=false
53+ python3 - <<'PY'
54+ import glob, sys, zipfile
55+
56+ nupkgs = glob.glob("artifacts/nuget/*.nupkg")
57+ if not nupkgs:
58+ print("ERROR: no .nupkg found under artifacts/nuget/")
59+ sys.exit(1)
60+
61+ nupkg = sorted(nupkgs)[-1]
62+ print(f"Validating {nupkg}")
63+
64+ z = zipfile.ZipFile(nupkg)
65+ names = set(z.namelist())
66+
67+ required = [
68+ "buildTransitive/Kapusch.Facebook.iOS.targets",
69+ "kfb.xcframework/Info.plist",
70+ "fb/FBAEMKit.xcframework/Info.plist",
71+ "fb/FBSDKCoreKit.xcframework/Info.plist",
72+ "fb/FBSDKCoreKit_Basics.xcframework/Info.plist",
73+ "fb/FBSDKGamingServicesKit.xcframework/Info.plist",
74+ "fb/FBSDKLoginKit.xcframework/Info.plist",
75+ "fb/FBSDKShareKit.xcframework/Info.plist",
76+ ]
77+
78+ missing = [p for p in required if p not in names]
79+ if missing:
80+ print("ERROR: missing required paths in nupkg:")
81+ for p in missing:
82+ print(f" - {p}")
83+ sys.exit(1)
84+
85+ # Guardrail: ensure the wrapper is not flattened at the package root.
86+ if "Info.plist" in names:
87+ print("ERROR: wrapper appears flattened (found 'Info.plist' at package root).")
88+ sys.exit(1)
89+
90+ print("OK: nupkg layout looks correct.")
91+ PY
5792
5893 - uses : actions/upload-artifact@v4
5994 with :
0 commit comments