diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 05ce364..0000000 --- a/.editorconfig +++ /dev/null @@ -1,262 +0,0 @@ -# editorconfig.org -root = true - -[*.cs] -indent_style = space -indent_size = 4 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -# CSharp and Visual Basic code style settings: -[*.cs] -dotnet_style_require_accessibility_modifiers = always:suggestion -dotnet_style_readonly_field = true:warning - -# CSharp and Visual Basic code style settings: -[*.cs] -dotnet_style_object_initializer = true:suggestion -dotnet_style_collection_initializer = true:suggestion -dotnet_style_prefer_auto_properties = true:suggestion - -# CSharp code style settings: -[*.cs] -csharp_style_var_for_built_in_types = true:suggestion -csharp_style_var_when_type_is_apparent = true:suggestion -csharp_style_var_elsewhere = true:suggestion - -# CSharp code style settings: -[*.cs] -csharp_style_expression_bodied_methods = false:silent -csharp_style_expression_bodied_constructors = false:silent -csharp_style_expression_bodied_operators = false:silent -csharp_style_expression_bodied_properties = true:suggestion -csharp_style_expression_bodied_indexers = true:suggestion -csharp_style_expression_bodied_accessors = true:suggestion - -# CSharp code style settings: -[*.cs] -csharp_style_inlined_variable_declaration = true:suggestion - -# CSharp code style settings: -[*.cs] -csharp_prefer_braces = true:silent - -# .NET formatting settings: -[*.cs] -dotnet_sort_system_directives_first = true - -# CSharp formatting settings: -[*.cs] -csharp_new_line_before_open_brace = all -csharp_new_line_before_else = true -csharp_new_line_before_catch = true -csharp_new_line_before_finally = true -csharp_new_line_before_members_in_object_initializers = true -csharp_new_line_before_members_in_anonymous_types = true -csharp_new_line_between_query_expression_clauses = true - -# CSharp formatting settings: -[*.cs] -csharp_indent_case_contents = true -csharp_indent_switch_labels = true - -# CSharp formatting settings: -[*.cs] -csharp_space_after_cast = false -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_between_parentheses = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_around_binary_operators = before_and_after -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_between_method_call_empty_parameter_list_parentheses = false - -# CSharp formatting settings: -[*.cs] -csharp_preserve_single_line_statements = false -csharp_preserve_single_line_blocks = false - -# Rider Specific Settings: - -## Blank Lines - -[*.cs] -csharp_blank_lines_around_region = 1 -csharp_blank_lines_inside_region = 1 -csharp_blank_lines_before_single_line_comment = 1 -csharp_keep_blank_lines_in_declarations = 1 -csharp_remove_blank_lines_near_braces_in_declarations = false -csharp_blank_lines_after_start_comment = 1 -csharp_blank_lines_between_using_groups = 0 -csharp_blank_lines_after_using_list = 0 -csharp_blank_lines_around_namespace = 1 -csharp_blank_lines_inside_namespace = 1 -csharp_blank_lines_around_type = 1 -csharp_blank_lines_inside_type = 1 -csharp_blank_lines_around_field = 1 -csharp_blank_lines_around_single_line_field = 1 -csharp_blank_lines_around_property = 1 -csharp_blank_lines_around_single_line_property = 1 -csharp_blank_lines_around_auto_property = 1 -csharp_blank_lines_around_single_line_auto_property = 1 -csharp_blank_lines_around_invocable = 1 -csharp_blank_lines_around_single_line_invocable = 1 -csharp_blank_lines_around_local_method = 1 -csharp_keep_blank_lines_in_code = 1 -csharp_remove_blank_lines_near_braces_in_code = false -csharp_blank_lines_around_local_method = 1 -csharp_blank_lines_around_single_line_local_method = 1 -csharp_blank_lines_before_control_transfer_statements = 1 -csharp_blank_lines_after_control_transfer_statements = 1 -csharp_blank_lines_before_block_statements = 1 -csharp_blank_lines_after_block_statements = 1 -csharp_blank_lines_before_multiline_statements = 1 -csharp_blank_lines_after_multiline_statements = 1 - -## Brace Layout - -[*.cs] -csharp_type_declaration_braces = next_line -csharp_indent_inside_namespace = true -csharp_invocable_declaration_braces = next_line -csharp_anonymous_method_declaration_braces = next_line -csharp_accessor_owner_declaration_braces = next_line -csharp_accessor_declaration_braces = next_line -csharp_case_block_braces = next_line -csharp_initializer_braces = next_line -csharp_other_braces = next_line -csharp_allow_comment_after_lbrace = false -csharp_empty_block_style = multiline - -## Code Style - -csharp_for_built_in_types = use_var -csharp_for_simple_types = use_var -csharp_for_other_types = use_var -csharp_prefer_explicit_discard_declaration = true -csharp_instance_members_qualify_members = none -csharp_instance_members_qualify_declared_in = this_class -csharp_default_private_modifier = explicit -csharp_default_internal_modifier = explicit - -## Line Breaks - -[*.cs] -csharp_place_type_attribute_on_same_line = false -csharp_place_method_attribute_on_same_line = false -csharp_place_accessorholder_attribute_on_same_line = false -csharp_place_accessor_attribute_on_same_line = false -csharp_place_field_attribute_on_same_line = false - -csharp_keep_existing_declaration_block_arrangement = false -csharp_place_abstract_accessorholder_on_single_line = true -csharp_place_simple_accessorholder_on_single_line = false -csharp_place_accessor_with_attrs_holder_on_single_line = true -csharp_place_simple_accessor_on_single_line = true -csharp_place_simple_method_on_single_line = false - -## Spaces - -[*.cs] -csharp_extra_spaces = remove_all -csharp_space_after_keywords_in_control_flow_statements = true -csharp_space_between_method_call_name_and_opening_parenthesis = false -csharp_space_before_typeof_parentheses = false -csharp_space_before_default_parentheses = false -csharp_space_before_checked_parentheses = false -csharp_space_before_sizeof_parentheses = false -csharp_space_before_nameof_parentheses = false -csharp_space_between_keyword_and_expression = true -csharp_space_between_keyword_and_type = true -csharp_space_within_if_parentheses = false -csharp_space_within_while_parentheses = false -csharp_space_within_catch_parentheses = false -csharp_space_within_switch_parentheses = false -csharp_space_within_for_parentheses = false -csharp_space_within_foreach_parentheses = false -csharp_space_within_using_parentheses = false -csharp_space_within_lock_parentheses = false -csharp_space_within_fixed_parentheses = false -csharp_space_within_parentheses = false -csharp_space_between_typecast_parentheses = false -csharp_space_between_method_declaration_parameter_list_parentheses = false -csharp_space_between_method_declaration_empty_parameter_list_parentheses = false -csharp_space_between_method_call_parameter_list_parentheses = false -csharp_space_within_typeof_parentheses = false -csharp_space_within_default_parentheses = false -csharp_space_within_checked_parentheses = false -csharp_space_within_sizeof_parentheses = false -csharp_space_within_nameof_parentheses = false -csharp_space_before_open_square_brackets = false -csharp_space_between_square_brackets = false -csharp_space_between_empty_square_brackets = false -csharp_space_before_type_parameter_angle = false -csharp_space_before_type_argument_angle = false -csharp_space_within_type_parameter_angles = false -csharp_space_within_type_argument_angles = false; -csharp_space_before_singleline_accessorholder = true -csharp_space_in_singleline_accessorholder = true -csharp_space_between_accessors_in_singleline_property = true -csharp_space_within_empty_braces = true -csharp_space_in_singleline_method = true -csharp_space_in_singleline_anonymous_method = true -csharp_space_within_single_line_array_initializer_braces = true -csharp_space_around_assignment_op = true -csharp_space_around_logical_op = true -csharp_space_around_equality_op = true -csharp_space_around_relational_op = true -csharp_space_around_bitwise_op = true -csharp_space_around_additive_op = true -csharp_space_around_multiplicative_op = true -csharp_space_around_shift_op = true -csharp_space_around_nullcoalescing_op = true -csharp_space_around_arrow_op = true -csharp_space_after_logical_not_op = false -csharp_space_after_unary_minus_op = false -csharp_space_after_unary_plus_op = false -csharp_space_after_ampersand_op = false -csharp_space_after_asterik_op = false -csharp_space_near_postfix_and_prefix_op = false -csharp_space_before_ternary_quest = true -csharp_space_after_ternary_quest = true -csharp_space_before_ternary_colon = true -csharp_space_after_ternary_colon = true -csharp_space_before_comma = false -csharp_space_after_comma = true -csharp_space_before_semicolon_in_for_statement = false -csharp_space_after_semicolon_in_for_statement = true -csharp_space_before_semicolon = false -csharp_space_before_colon_in_inheritance_clause = true -csharp_space_after_colon_in_inheritance_clause = true -csharp_space_before_type_parameter_constraint_colon = true -csharp_space_after_type_parameter_constraint_colon = true -csharp_space_before_colon_in_case = false -csharp_space_after_colon_in_case = true -csharp_space_before_attribute_colon = true -csharp_space_after_attribute_colon = true -csharp_space_between_attribute_sections = true -csharp_space_between_square_brackets = false -csharp_space_after_attributes = true -csharp_space_after_cast = false -csharp_space_around_dot = false -csharp_space_around_lambda_arrow = true -csharp_space_before_pointer_asterik_declaration = false -csharp_space_before_nullable_mark = false -csharp_space_around_alias_eq = true -csharp_space_before_trailing_comment = true -csharp_space_after_operator_keyword = true - -## Resharper - -[*.cs] -resharper_check_namespace_highlighting = do_not_show -resharper_inconsistent_naming_highlighting = do_not_show -resharper_member_can_be_private_global_highlighting = do_not_show -resharper_unused_member_global_highlighting = do_not_show -resharper_introduce_optional_parameters_global_highlighting = do_not_show -resharper_delegate_subtraction_highlighting = do_not_show diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 5aff339..0000000 --- a/.gitignore +++ /dev/null @@ -1,73 +0,0 @@ -# This .gitignore file should be placed at the root of your Unity project directory -# -# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore -# -/[Ll]ibrary/ -/[Tt]emp/ -/[Oo]bj/ -/[Bb]uild/ -/[Bb]uilds/ -/[Ll]ogs/ -/[Mm]emoryCaptures/ - -# Never ignore Asset meta data -!/[Aa]ssets/**/*.meta - -# Uncomment this line if you wish to ignore the asset store tools plugin -# /[Aa]ssets/AssetStoreTools* - -# Autogenerated Jetbrains Rider plugin -[Aa]ssets/Plugins/Editor/JetBrains* - -# Visual Studio cache directory -.vs/ - -# Gradle cache directory -.gradle/ - -# Autogenerated VS/MD/Consulo solution and project files -ExportedObj/ -.consulo/ -*.csproj -*.unityproj -*.sln -*.suo -*.tmp -*.user -*.userprefs -*.pidb -*.booproj -*.svd -*.pdb -*.mdb -*.opendb -*.VC.db - -# Unity3D generated meta files -*.pidb.meta -*.pdb.meta -*.mdb.meta - -# Unity3D generated file on crash reports -sysinfo.txt - -# Builds -*.apk -*.unitypackage - -# Crashlytics generated file -crashlytics-build.properties - -# Custom - -.idea/ - -**/Assets/* -!Assets/Plugins/ - -Packages/ -ProjectSettings/ - -/*.log -/*.meta -/*.xml diff --git a/Assets/Plugins.meta b/Assets/Plugins.meta deleted file mode 100644 index e067c8d..0000000 --- a/Assets/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 79fa54f706d484c6797f4875a43b886e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge.meta b/Assets/Plugins/CandyCoded.Unity-iOS-Bridge.meta deleted file mode 100644 index 3609b82..0000000 --- a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4679418a4de5c483aa3a7186750053b4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 52cad60..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,9 +0,0 @@ -# Changelog - -## v1.1.0 (July 8, 2019) - -- Added Confirm dialog - -## v1.0.0 (December 23, 2018) - -- Initial release. diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/CandyCoded.UnityiOSBridge.asmdef b/CandyCoded.UnityiOSBridge.asmdef similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/CandyCoded.UnityiOSBridge.asmdef rename to CandyCoded.UnityiOSBridge.asmdef diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/CandyCoded.UnityiOSBridge.asmdef.meta b/CandyCoded.UnityiOSBridge.asmdef.meta similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/CandyCoded.UnityiOSBridge.asmdef.meta rename to CandyCoded.UnityiOSBridge.asmdef.meta diff --git a/LICENSE b/LICENSE deleted file mode 100644 index cada485..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2019 Scott Doxey - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Makefile b/Makefile deleted file mode 100644 index 3f64937..0000000 --- a/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -clean: - git clean -xdf - -deploy: - git subtree push --prefix Assets/Plugins/CandyCoded.Unity-iOS-Bridge origin upm - -deploy-force: - git push origin `git subtree split --prefix Assets/Plugins/CandyCoded.Unity-iOS-Bridge master`:upm --force diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins.meta b/Plugins.meta similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins.meta rename to Plugins.meta diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS.meta b/Plugins/iOS.meta similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS.meta rename to Plugins/iOS.meta diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridge.cs b/Plugins/iOS/IOSBridge.cs similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridge.cs rename to Plugins/iOS/IOSBridge.cs diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridge.cs.meta b/Plugins/iOS/IOSBridge.cs.meta similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridge.cs.meta rename to Plugins/iOS/IOSBridge.cs.meta diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridge.mm b/Plugins/iOS/IOSBridge.mm similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridge.mm rename to Plugins/iOS/IOSBridge.mm diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridge.mm.meta b/Plugins/iOS/IOSBridge.mm.meta similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridge.mm.meta rename to Plugins/iOS/IOSBridge.mm.meta diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridgeEvents.cs b/Plugins/iOS/IOSBridgeEvents.cs similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridgeEvents.cs rename to Plugins/iOS/IOSBridgeEvents.cs diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridgeEvents.cs.meta b/Plugins/iOS/IOSBridgeEvents.cs.meta similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/Plugins/iOS/IOSBridgeEvents.cs.meta rename to Plugins/iOS/IOSBridgeEvents.cs.meta diff --git a/README.md b/README.md deleted file mode 100644 index bf6abd2..0000000 --- a/README.md +++ /dev/null @@ -1,327 +0,0 @@ -# Unity iOS Bridge - -## Installation - -### Unity Package Manager - -```json -{ - "dependencies": { - "com.candycoded.unity-ios-bridge": "https://github.com/CandyCoded/Unity-iOS-Bridge.git#v1.1.0" - } -} -``` - -## Contents - -- [Accessibility](#accessibility) -- [Alerts](#alerts) -- [Permission](#permission) -- [Photos](#photos) -- [Settings](#settings) -- [View](#view) - -## Documentation - -### Accessibility - -Make your apps accessible to everyone, including people with disabilities. - - - -#### `IOSUIAccessibilityIsAssistiveTouchRunning` - -Returns a Boolean value indicating whether the system preference for AssistiveTouch is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsAssistiveTouchRunning()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsVoiceOverRunning` - -Returns a Boolean value indicating whether VoiceOver is running. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsVoiceOverRunning()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsSwitchControlRunning` - -Returns a Boolean value indicating whether Switch Control is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsSwitchControlRunning()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsShakeToUndoEnabled` - -Returns a Boolean value indicating whether the system preference for Shake to Undo is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsShakeToUndoEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsClosedCaptioningEnabled` - -Returns a Boolean value indicating whether closed captioning is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsClosedCaptioningEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsBoldTextEnabled` - -Returns a Boolean value indicating whether bold text is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsBoldTextEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityDarkerSystemColorsEnabled` - -Returns a Boolean value indicating whether darken colors is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityDarkerSystemColorsEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsGrayscaleEnabled` - -Returns a Boolean value indicating whether grayscale is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsGrayscaleEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsGuidedAccessEnabled` - -Returns a Boolean value indicating whether the app is running in Guided Access mode. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsGuidedAccessEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsInvertColorsEnabled` - -Returns a Boolean value indicating whether inverted colors is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsInvertColorsEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsMonoAudioEnabled` - -Returns a Boolean value indicating whether system audio is set to mono. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsMonoAudioEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsReduceMotionEnabled` - -Returns a Boolean value indicating whether reduce motion is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsReduceMotionEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsReduceTransparencyEnabled` - -Returns a Boolean value indicating whether reduce transparency is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsReduceTransparencyEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsSpeakScreenEnabled` - -Returns a Boolean value indicating whether speaking the screen is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsSpeakScreenEnabled()); // true -#endif -``` - -Ref: - -#### `IOSUIAccessibilityIsSpeakSelectionEnabled` - -Returns a Boolean value indicating whether speaking the selection is enabled. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Accessibility.IOSUIAccessibilityIsSpeakSelectionEnabled()); // true -#endif -``` - -Ref: - -### Alerts - -#### `IOSUIAlertController` - -```csharp -#if UNITY_IOS && !UNITY_EDITOR - CandyCoded.UnityIOSBridge.Alert.IOSUIAlertController("Title", "message", () => { Debug.Log("OK"); }); -#endif -``` - -```csharp -#if UNITY_IOS && !UNITY_EDITOR - CandyCoded.UnityIOSBridge.Alert.IOSUIAlertController("Title", "message", () => { Debug.Log("OK"); }, () => { Debug.Log("Cancel"); }); -#endif -``` - -### Permission - -#### `IOSPermissionCameraOK` - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Permission.IOSPermissionCameraOK()); // true -#endif -``` - -Ref: - -### Photos - -#### `IOSImageAddToGallery` - -Note: This requires `NSPhotoLibraryAddUsageDescription` to be in the `Info.plist` file with a value. - -Note: `Screenshot.Save` uses the internal method `ScreenCapture.CaptureScreenshot` which returns before the file is saved to the device. Make sure the file exists before calling `IOSImageAddToGallery` by using a coroutine to wait until the file exists. - -```csharp -public void TakeScreenshot() -{ - - StartCoroutine(TakeScreenshotCoroutine()); - -} - -private static IEnumerator TakeScreenshotCoroutine() -{ - - var screenshotFilePath = Screenshot.Save(); - - Debug.Log($"Saved screenshot to {screenshotFilePath}"); - - while (!File.Exists(screenshotFilePath)) - { - - yield return null; - - } - - yield return new WaitForEndOfFrame(); - -#if UNITY_IOS && !UNITY_EDITOR - CandyCoded.UnityIOSBridge.Photos.IOSImageAddToGallery(screenshotFilePath); - Debug.Log("Saved to gallery."); -#endif - -} -``` - -Ref: -Ref: - -### Settings - -#### `IOSIsLowPowerModeEnabled` - -A Boolean indicating whether Low Power Mode is enabled on an iOS device. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.Settings.IOSIsLowPowerModeEnabled()); // false -#endif -``` - -Ref: - -#### `IOSUIImpactFeedbackGenerator` - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -CandyCoded.UnityIOSBridge.Settings.IOSUIImpactFeedbackGenerator(); -#endif -``` - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -CandyCoded.UnityIOSBridge.Settings.IOSUIImpactFeedbackGenerator("light"); -CandyCoded.UnityIOSBridge.Settings.IOSUIImpactFeedbackGenerator("medium"); -CandyCoded.UnityIOSBridge.Settings.IOSUIImpactFeedbackGenerator("heavy"); -#endif -``` - -Ref: - -### View - -#### `IOSSafeAreaInsets` - -The insets that you use to determine the safe area for this view. - -```csharp -#if UNITY_IOS && !UNITY_EDITOR -Debug.Log(CandyCoded.UnityIOSBridge.View.IOSSafeAreaInsets()); // {top: 0, left: 0, right: 0, bottom: 0} -#endif -``` - -Ref: diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/package.json b/package.json similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/package.json rename to package.json diff --git a/Assets/Plugins/CandyCoded.Unity-iOS-Bridge/package.json.meta b/package.json.meta similarity index 100% rename from Assets/Plugins/CandyCoded.Unity-iOS-Bridge/package.json.meta rename to package.json.meta