// Sets the required project settings for the Xcode project to work with the SDK.
        public static void SetBuildProperties(ExtendedPBXProject project)
        {
            project.SetBuildProperty(project.GetAllTargetGuids(), ExtendedPBXProject.SwiftVersionKey, "3.0");
            project.SetBuildProperty(project.UnityTargetGuid, ExtendedPBXProject.SwiftBridgingHeaderKey, "Libraries/Shopify/Plugins/iOS/Shopify/Unity-iPhone-Bridging-Header.h");
            project.SetBuildProperty(project.UnityTargetGuid, ExtendedPBXProject.RunpathSearchKey, "@executable_path/Frameworks");

            bool isBelowMinimumTarget = false;

#if UNITY_5_5_OR_NEWER
            if (UnityEditor.PlayerSettings.iOS.targetOSVersionString == null ||
                UnityEditor.PlayerSettings.iOS.targetOSVersionString.Length == 0 ||
                float.Parse(UnityEditor.PlayerSettings.iOS.targetOSVersionString) < 9.0)
            {
                isBelowMinimumTarget = true;
            }
#elif UNITY_5_4_2_OR_NEWER
            isBelowMinimumTarget = UnityEditor.PlayerSettings.iOS.targetOSVersion < iOSTargetOSVersion.iOS_9_0;
#else
            isBelowMinimumTarget = true;
#endif

            if (isBelowMinimumTarget)
            {
                project.SetBuildProperty(project.GetAllTargetGuids(), ExtendedPBXProject.DeploymentTarget, "9.0");
            }
        }
예제 #2
0
        // Sets the required project settings for the Xcode project to work with the SDK.
        public static void SetBuildProperties(ExtendedPBXProject project)
        {
            project.SetBuildProperty(project.GetAllTargetGuids(), ExtendedPBXProject.SwiftVersionKey, "4.0");
            project.SetBuildProperty(project.UnityTargetGuid, ExtendedPBXProject.RunpathSearchKey, "@executable_path/Frameworks");

            project.AddBuildProperty(project.GetUnityFrameworkTargetGuid(), ExtendedPBXProject.LibrarySearchPathsKey, "$(inherited)");
            project.AddBuildProperty(project.GetUnityFrameworkTargetGuid(), ExtendedPBXProject.LibrarySearchPathsKey, "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)");
            project.AddBuildProperty(project.GetUnityFrameworkTargetGuid(), ExtendedPBXProject.LibrarySearchPathsKey, "$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)");
            project.AddBuildProperty(project.GetUnityFrameworkTargetGuid(), ExtendedPBXProject.OtherLinkerFlagsKey, "-all_load");

            bool isBelowMinimumTarget = false;

#if UNITY_5_5_OR_NEWER
            if (UnityEditor.PlayerSettings.iOS.targetOSVersionString == null ||
                UnityEditor.PlayerSettings.iOS.targetOSVersionString.Length == 0 ||
                float.Parse(UnityEditor.PlayerSettings.iOS.targetOSVersionString) < 9.0)
            {
                isBelowMinimumTarget = true;
            }
#elif UNITY_5_4_2_OR_NEWER
            isBelowMinimumTarget = UnityEditor.PlayerSettings.iOS.targetOSVersion < iOSTargetOSVersion.iOS_9_0;
#else
            isBelowMinimumTarget = true;
#endif

            if (isBelowMinimumTarget)
            {
                project.SetBuildProperty(project.GetAllTargetGuids(), ExtendedPBXProject.DeploymentTarget, "10.0");
            }
        }
 /// Sets the correct build properties to run
 private static void SetBuildProperties(ExtendedPBXProject project)
 {
     iOSPostProcessor.SetBuildProperties(project);
     project.SetBuildProperty(project.GetAllTargetGuids(), ExtendedPBXProject.SwiftVersionKey, "4.0");
     project.SetBuildProperty(project.TestTargetGuid, ExtendedPBXProject.SwiftBridgingHeaderKey, "Libraries/Shopify/Plugins/iOS/Shopify/Unity-iPhone-Tests-Bridging-Header.h");
     project.SetBuildProperty(project.TestTargetGuid, ExtendedPBXProject.RunpathSearchKey, "@loader_path/Frameworks");
     project.SetBuildProperty(project.TestTargetGuid, ExtendedPBXProject.ProjectModuleNameKey, "$(PRODUCT_NAME:c99extidentifier)Tests");
     project.SetBuildPropertyForConfig(project.GetDebugConfig(project.UnityTargetGuid), ExtendedPBXProject.EnableTestabilityKey, "YES");
     project.SetBuildPropertyForConfig(project.GetDebugConfig(project.UnityTargetGuid), ExtendedPBXProject.SwiftOptimizationLevelKey, "-Onone");
 }