Repository navigation
docs: [SDK-5858] Swift package setup and v5 to v6 migration guide (2/2) - #921
fadi-george wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9b7330c to
1a6f68c
Compare
abdulraqeeb33
left a comment
There was a problem hiding this comment.
The Unity 6 floor (6000.0.23f1), deleting OneSignaliOSDependencies.xml on editor load, and the NSE / location product split all match the postprocessor. Three holes in the upgrade writeup:
-
The Asset Store README links the new guide at
blob/main(examples/demo/Assets/OneSignal/README.md:59). That file is not onmainorv6, and this stack merges tov6. The v2 and v3 guides are files next to that README, the inventory exports them, and those links are relative. CopyMIGRATION_GUIDE_v5_to_v6.mdintoexamples/demo/Assets/OneSignal/with a.meta, add both paths toOneSignalFileInventory.asset, and linkMIGRATION_GUIDE_v5_to_v6.md. The bundled README also has no location section, so that copy has to carry the "leaveOneSignalLocationout" note. -
Step 1 says to update the OneSignal packages to 6.0.0 (
MIGRATION_GUIDE_v5_to_v6.md:14). v5 iscom.onesignal.unity.core,.android, and.ios. v6 iscom.onesignal.unitysdk.*at 6.0.0. Package Manager will not offer 6.0.0 as an update of the old name. Say to remove the old three and add the new three. -
The guide says
AddProductdoes nothing when the target already links the product (MIGRATION_GUIDE_v5_to_v6.md:35).GetOrAddReferencere-pins an older requirement toOneSignalSwiftPackage.Versionbefore that return (OneSignalSwiftPackage.cs:48). The snippet also does not compile.PBXProjectneedsusing UnityEditor.iOS.Xcode, andprojectPathis never set:
using UnityEditor.iOS.Xcode;
using OneSignalSDK.iOS;
var projectPath = PBXProject.GetPBXProjectPath(outputPath);
var project = new PBXProject();
project.ReadFromFile(projectPath);
var widgetGuid = project.TargetGuidByName("OneSignalWidgetExtension");
OneSignalSwiftPackage.AddProduct(project, widgetGuid, "OneSignalFramework");
project.WriteToFile(projectPath);Say it skips a second product link and still re-pins. OneSignalFramework on OneSignalWidgetExtension matches the demo.
Nit: examples/demo-no-location/README.md:104 still lists Android 5.9.5. OneSignalAndroidDependencies.Version is 5.11.0.
Description
One Line Summary
Document the v6 requirements and Swift package setup for iOS, and add the v5 to v6 migration guide.
Details
Motivation
#920 replaces CocoaPods with the OneSignal-XCFramework Swift package and requires Unity 6. The docs still said Unity 2022.3, said to install CocoaPods, and pointed to the
.xcworkspacefor CocoaPods reasons.Scope
README.md(and the bundled copy inexamples/demo/Assets/OneSignal):.xcodeproj.MIGRATION_GUIDE_v5_to_v6.md:OneSignalSwiftPackage.AddProduct.ASSET_STORE_PACKAGES.md: Unity 6 minimum, and verification in Unity 6.0 LTS.Stack:
Testing
Manual testing
Docs only.
validate-unity-distribution.pypasses.Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code