將原項(xiàng)目轉(zhuǎn)換成module的形式
進(jìn)入項(xiàng)目使用命令行打包
flutter build ios-framework --output=../flutter_app
-
打出包后怜跑,分為
debug心俗、profile嘱函、release
三種形式
debug包只能在模擬器運(yùn)行
profile和release包在真機(jī)運(yùn)行
進(jìn)入App.xcframework->iOS...->App.framework->flutter_assets
對比debug和release
,發(fā)現(xiàn)release中少了幾個(gè)文件列另,profile
和release
一樣康吵。
這樣就導(dǎo)致當(dāng)我們在模擬器運(yùn)行時(shí),引入profile或者release
的framework
時(shí)會(huì)報(bào)錯(cuò)
所以在模擬器調(diào)試時(shí)访递,一定不要用
debug
關(guān)于module中存在plugin
當(dāng)module中存在plugin
時(shí),首先將plugin
導(dǎo)入
其次要對plugin
進(jìn)行注冊
沒有注冊的話同辣,會(huì)報(bào)錯(cuò)
[VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)