Skip to content

Commit 3fd0e0f

Browse files
authored
Merge pull request #6 from bugfender/bugfix/linking
Add the required dependencies also to the main target
2 parents bbb789f + f7dd76b commit 3fd0e0f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Editor/IOSProjectBuildCustomizer.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@ public static void OnPostprocessBuild(BuildTarget buildTarget, string pathToBuil
2424
// Get the remote package GUID
2525
string packageGuid = pbxProject.AddRemotePackageReferenceAtVersionUpToNextMajor("https://github.com/bugfender/BugfenderSDK-iOS", "2.0.0");
2626

27-
// Add the Remote Package to the Xcode project
27+
// Add the Remote Package to the Xcode project (both Unity framework and main target)
2828
pbxProject.AddRemotePackageFrameworkToProject(pbxProject.GetUnityFrameworkTargetGuid(), "BugfenderLibrary", packageGuid, false /* required dependency */);
29+
pbxProject.AddRemotePackageFrameworkToProject(pbxProject.GetUnityMainTargetGuid(), "BugfenderLibrary", packageGuid, false /* required dependency */);
30+
pbxProject.AddFrameworkToProject(mainTargetGuid, "SystemConfiguration.framework", false);
31+
pbxProject.AddFrameworkToProject(mainTargetGuid, "Security.framework", false);
32+
pbxProject.AddFrameworkToProject(mainTargetGuid, "MobileCoreServices.framework", false);
33+
pbxProject.AddFrameworkToProject(mainTargetGuid, "CoreGraphics.framework", false);
34+
pbxProject.AddFrameworkToProject(mainTargetGuid, "libc++.tbd", false);
2935

3036
// Apply changes to the pbxproj file
3137
pbxProject.WriteToFile(projectPath);

0 commit comments

Comments
 (0)