Repository navigation
0.0.18
Added
-
native.ios.url_schemesandnative.macos.url_schemesregister a custom URL scheme underCFBundleURLTypes. A newInjectInfoPlistUrlSchemeop (PluginInstaller.injectInfoPlistUrlScheme(scheme:, [platform:])) appends oneCFBundleURLTypesdict (roleEditor) carrying the scheme, creates the array when the plist has none, and skips the write when any existing dict already lists the scheme, so a scheme the app or another plugin registered keeps its own entry. (lib/src/installer/install_operation.dart,lib/src/installer/plugin_installer.dart,lib/src/installer/install_transaction.dart,lib/src/installer/manifest_installer.dart,lib/src/installer/install_manifest.dart,lib/src/helpers/plist_writer.dart,test/,doc/plugins/) -
native.android.activitiesdeclares an<activity>with its intent filters inside<application>. A newInjectAndroidActivityop (PluginInstaller.injectAndroidActivity(name:, exported:, [taskAffinity:], [intentFilters:])) takesname,exported,task_affinityandintent_filters(auto_verify,actions,categories,datawithscheme,host,path,path_prefix), the shape an Android App Link or custom-scheme callback needs. The manifest is parsed to decide and the element is spliced in as text before the real</application>(one inside a comment is ignored), so every other byte of the file stays as it was. Idempotency compares content: an activity with the same name and an equal set of intent filters (in any order) is left alone; one with the same name and different filters is never rewritten, and the install warns with the block it expected.exportedandtask_affinityare not part of that comparison.AndroidIntentFilter,AndroidIntentDataandAndroidActivityOutcomeare exported frompackage:fluttersdk_artisan/artisan.dart. (lib/src/helpers/xml_editor.dart,lib/src/installer/android_intent_filter.dart,lib/src/installer/,test/,doc/plugins/) -
List entitlements are accepted and merged.
InjectEntitlementtakes aList<String>besideStringandbool(for examplecom.apple.developer.applesignin: [Default]). A list is merged entry by entry into the array the file already carries, so another plugin's entries survive, and aYamlListfrominstall.yamlis narrowed toList<String>before the dispatcher sees it. The install record stores the list as a list. (lib/src/installer/install_transaction.dart,lib/src/installer/manifest_installer.dart)
Changed
InjectEntitlementwrites to every entitlements file the application target signs with, and no longer warns and skips a project that signs with a different file. The op readsCODE_SIGN_ENTITLEMENTSacross the application target's build configurations (XcodeProjectEditor.entitlementsPaths) and sets the key in each distinct file, leaving the build settings untouched. A macOS Flutter project (Runner/DebugProfile.entitlementsplusRunner/Release.entitlements) now gets the key in both, where it used to print a warning and ask the operator to copy it by hand. Only a project that names no entitlements file at all takes the old path: write<platform>/Runner/Runner.entitlementsand point the target at it. A configuration holding a non-stringCODE_SIGN_ENTITLEMENTS, or a project the editor refuses to re-emit, still warns and leaves the build setting alone.InstallOperationnow has 28 sealed subclasses. (lib/src/installer/install_transaction.dart,lib/src/helpers/xcode_project_editor.dart,test/installer/,doc/plugins/installer-dsl.md,doc/plugins/install-yaml.md)
Fixed
InjectEntitlementresolves$(SRCROOT)and$(PROJECT_DIR)inCODE_SIGN_ENTITLEMENTSinstead of joining them literally. A target signing with$(SRCROOT)/Runner/Runner.entitlementsmade the installer writeios/$(SRCROOT)/Runner/Runner.entitlements, a directory named after the variable. Both variables name the directory holding the.xcodeproj, so a leading one is dropped and the real file is written. Any other build variable ($(TARGET_NAME)/...) cannot be resolved without evaluating the build settings: the install warns with the value, skips that file, and does not add a defaultRunner.entitlementsnext to a project that already names one. (lib/src/installer/install_transaction.dart,test/installer/install_transaction_test.dart)