FWFramework

5.4.0

iOS development framework, mainly solves the routine and pain points in native development, and builds a modular project structure to facilitate iOS development. iOS开发框架,主要解决原生开发中的常规和痛点问题,搭建模块化项目架构,方便iOS开发。
lszzy/FWFramework

What's New

[5.4.0] - 2024-05-14

2024-05-14T13:38:48Z

Changed

  • Split the second-level sub-modules, CocoaPods can introduce the required sub-modules on demand
  • Reconstruct the FWExtension submodule into FWPlugin, which is compatible with CocoaPods and SPM and needs to be migrated and adapted.
  • Split rarely used Views and Services into FWPlugin/Module sub-modules, which can be introduced as needed
  • Code reconstruction, remove all classification extension methods starting with fw_, only support Wrapper(fw.) method calling
  • Reconstruct MulticastBlock to support priority and asynchronous calls
  • Remove the didLayoutSubviews state from the controller life cycle
  • ImagePlugin adds queryMemoryData option

Changed

  • 拆分二级子模块,CocoaPods可按需引入所需子模块
  • 重构FWExtension子模块为FWPlugin,兼容CocoaPods和SPM使用,需迁移适配
  • 拆分不常用View和Service到FWPlugin/Module子模块,可按需引入
  • 代码重构,去掉所有fw_开头分类扩展方法,仅支持Wrapper(fw.)方式调用
  • 重构MulticastBlock,支持优先级和异步调用
  • 控制器生命周期去掉didLayoutSubviews状态
  • ImagePlugin新增queryMemoryData选项

FWFramework

Pod Version Pod Platform Pod License Carthage compatible

Tutorial

iOS development framework, mainly solves the routine and pain points in native development, and builds a modular project structure to facilitate iOS development.

* Modular architecture design, with built-in Mediator middleware, Router routing and other components
* Supports advanced features such as Swift coroutine async, await, property annotation propertyWrapper, macro, etc.
* Easily customizable UI plug-ins, including pop-up windows, toast, empty interface, pull-down refresh, image selection and other plug-ins
* Completely replaceable network images and network request layer, compatible with SDWebImage, Alamofire, etc. by default
* Automatically updated AutoLayout chain layout, commonly used UI view components are all available
* Extensible Model, View, and Controller architecture encapsulation to quickly write business code
* Compatible with SwiftUI, easily implement UIKit and SwiftUI hybrid interface development
* Any replaceable fw. code prefix, commonly used Toolkit methods, Theme, multi-language processing
* Everything you want is available here

All Swizzles in this framework will not take effect by default and will not affect existing projects. They need to be manually opened or invoked to take effect. This library has been used in formal projects, and will continue to be maintained and expanded in the future. Everyone is welcome to use and provide valuable comments to grow together.

Installation

It is recommended to use CocoaPods or Swift Package Manager to install and automatically manage dependencies.

CocoaPods

This framework supports CocoaPods, Podfile example:

platform :ios, '13.0'
use_frameworks!

target 'Example' do
  # Import the default subspecs
  pod 'FWFramework'
  
  # Import the macro subspecs
  # pod 'FWFramework', :subspecs => ['FWFramework', 'FWPlugin/Macros']   
  # Import the specified subspecs, see the podspec file for the list of subspecs
  # pod 'FWFramework', :subspecs => ['FWFramework', 'FWSwiftUI']
end

Swift Package Manager

This framework supports Swift Package Manager, just add and check the required modules, Package example:

https://github.com/lszzy/FWFramework.git

# Check and import the default submodule
import FWFramework

# Check and import the macro submodule
import FWPluginMacros
# Check and import the specified sub-modules, see the Package.swift file for the list of sub-modules
import FWSwiftUI

The document is located in the docs folder, just open index.html in the browser, or run docs.sh to automatically generate the Api document.

Custom code prefix is app example:

public typealias APP = WrapperGlobal

extension WrapperCompatible {
	public static var app: Wrapper<Self>.Type { get { wrapperExtension } set {} }
	public var app: Wrapper<Self> { get { wrapperExtension } set {} }
}

Example of importing default fw code prefix:

@_spi(FW) import FWFramework

As this framework is constantly upgrading, optimizing and expanding new functions, the Api of each version may be slightly changed. If a compilation error is reported when the new version is upgraded, the solution is as follows:

1. Just change to specify the pod version number to import, the recommended way, does not affect the project progress, upgrade to the new version only when you have time, example: pod 'FWFramework', '5.4.0'
2. Upgrade to the new version, please pay attention to the version update log

Swift

From version 5.0, only compatible with Swift, compatible with iOS 13+. The 5.x version is completely refactored using Swift and is incompatible with some APIs of the 4.x version. When migrating, old users not only use the new API to fix compilation errors, but also need to test whether the relevant functions are normal. We apologize for the inconvenience caused to you.

Objective-C

For OC compatibility, please use version 4.x, compatible with iOS 11+. Subsequent versions of version 4.x will only fix bugs and no new features will be added.

Vendor

This framework uses a lot of third-party libraries. Thanks to the authors of all third-party libraries. I will not list them all here. For details, please refer to the relevant links of the source file.

In the introduction of third-party libraries, in order to be compatible with existing project pod dependencies, as well as to customize changes and bug fixes of third-party libraries, and to facilitate subsequent maintenance, this framework uniformly modified the class prefix and method prefix. If there is any inconvenience during use, Please understand.
If you are the author of a third-party open source library, if this library violates your rights, please let me know, and I will immediately remove the use of the third-party open source library. 

Support

wuyong.site

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

Last updated: Wed May 15 2024 07:39:05 GMT-0900 (Hawaii-Aleutian Daylight Time)