1.iOS原有项目集成flutter
官方文档:flutter官方开发文档地址
1.第一步:首先我们要在同级工程目录podfile下创建flutter工程。
终端命令:
flutter create --template module my_flutter
文件名就是my_flutter
当然也可以通过vscode 或者 android studio来创建此工程在指定位置下。
因为是完整的空flutter项目 所以也可以独立运行
2.第二步:配置podfile文件
在原有iOS项目里想要调用flutter,其实就是一个本地模块。类似与我们pod引用本地模块一样的方式。
podfile配置如下:
在target ” do 配置上面加上
## ==============Flutter ==============_
flutter_application_path = 'flutter_moudle'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')
install_all_flutter_pods(flutter_application_path)
## ==============Flutter ==============_
flutter_application_path 指向你的flutter工程名称,我这里的工程名称是flutter_moudle为例。
load File.join(flutter_application_path, ‘.ios’, ‘Flutter’, ‘podhelper.rb’)
的含义是指向flutter_moudle工程目录下的 .ios/Flutter/podhelper.rb
如果你的工程没有.ios文件,那你需要用flutter build ios 命令来初始化flutter iOS工程。
之后执行 pod install –verbose
运行成功会在iOS工程的pod目录下有如图目录:
3.第三步:xcode 配置flutter
在xcode的general 里配置flutter.xcframework
4.AppDelegate配置
- AppDelegate.h里添加引用
#import <Flutter/Flutter.h>
#import <FlutterPluginRegistrant/GeneratedPluginRegistrant.h>
并在interface里声明flutter引擎对象
@property (nonatomic,strong)FlutterEngine *flutterEngine;
- AppDelegate.m 里找到didFinishLaunchingWithOptions方法。在应用启动完成时添加引擎初始化。
self.flutterEngine = [[FlutterEngine alloc] initWithName:@"my flutter engine"];
// Runs the default Dart entrypoint with a default Flutter route.
[self.flutterEngine run];
// Used to connect plugins (only if you have plugins with iOS platform code).
[GeneratedPluginRegistrant registerWithRegistry:self.flutterEngine];
return YES;
这里基本就是配置完成了
5.调用flutter引擎 跳转到fluter页面
在你想调用的地方添加
FlutterEngine *flutterEngine =
((AppDelegate *)UIApplication.sharedApplication.delegate).flutterEngine;
FlutterViewController *flutterViewController =
[[FlutterViewController alloc] initWithEngine:flutterEngine nibName:nil bundle:nil];
[self.viewController.navigationController pushViewController:flutterViewController animated:NO];
直接运行工程就可以看到效果了。
2.常见集成问题
- 1.编译报错:target 9.0问题和undefined method `flutter_additional_ios_build_settings’
解决方案:
podfile里将flutter_additional_ios_build_settings注释掉即可
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_T>ARGET'] = '9.0'
end
# flutter_additional_ios_build_settings(target)
end
end
- 2.Xcode Command PhaseScriptExecution failed with a nonzero exit code
解决方案:
清缓存
在Xcode菜单栏选择File -> Workspace Setting -> Build System new Build System(Default) 重新运行即可。
binsunvipp.com
보육원에서 성장하는 아이들은 새끼에게 개별적으로 먹이를주기 시작했습니다.
amruthaborewells.com
“오.” Fang Jifan이 고개를 끄덕이며 “또 뭐야?”
chasemusik.com
결국 리동양은 여전히 늠름한 표정을 지었지만 얼굴은 못생겼지만 그저 미소를 지을 뿐이었다.
chutneyb.com
무명에서 지금에 이르기까지 3년 동안 복숭아와 자두는 어디에나 있다.
smcasino7.com
마침내 Hongzhi 황제의 시선은 감자를 곁들인 로스트 비프 접시에 떨어졌습니다.
lfchungary.com
Hongzhi 황제는 금과 같은 말을 소중히 여기는이 Ouyang Zhi를 점점 더 좋아한다고 느꼈습니다.
gabapentin for mental health
yangsfitness.com
Fang Jifan은 약간 짜증이났습니다. “왜 그렇게 참을성이 없습니까?”
lfchungary.com
그는 마음 속으로 조용히 말했습니다. 바보야, 이건 원래 내 편곡이야.
hihouse420.com
갑자기 병상에 누워 있던 홍지황제가 기침을 했다.
pragmatic-ko.com
진라왕은 장병들이 소동을 일으키고 있다는 소식을 듣고 이미 얼굴이 어두워졌다.
pragmatic-ko.com
몇 차례의 화살비 후 반란군의 진형은 완전히 무너졌습니다.
jbustinphoto.com
큰 텐트에서 기침이 나고 폐하가 일어나기를 기다릴 시간이었습니다.
khasiss.com
이때… 밖에 있던 사람들이 움직임을 듣고 속속 뛰어들었다.
escitalopram dosages
yangsfitness.com
Xiao Jing과 여러 내시가 반대편에 서서 Dowager 황후를 조심스럽게 돌 보았습니다.
raytalktech.com
이 시대의 분위기는 이렇습니다. 나는 남자이고 공주는 여자입니다.
twichclip.com
그런데… 이제 상대가 줄을 서서 공격을 가한다.
smcasino-game.com
Liu 의사는 겁에 질려 소변을 보고 바닥에 쓰러졌습니다. “아니요… 그렇게 말하지 않았습니다.”
pchelografiya.com
Fang Jifan은 항상 그가 가져온 것에서 뭔가 빠진 것이 있을 수 있다고 느꼈습니다.
bistroduet.com
그는 입을 열었고, 마침내 공격적이어야 할 말을 다시 뱃속으로 삼켰다.
raytalktech.com
사실 조금 부끄럽지만 항상 한 챕터만 뜨는 건 좋지 않아요.
l-inkproject.com
Liu Jian의 마음은 혼란 스러웠지만 폐하의 말을 듣고 진정해야했습니다.
chutneyb.com
군가는 농노처럼 사는 것이 죽는 것보다 더 나쁘고, 옷은 너덜너덜하고, 극도로 비참하다.
qiyezp.com
주태후(周太后)가 그를 곁눈질하며 여유롭게 말했다. “무엇이 두렵습니까?”
qiyezp.com
그는 전하의 성미에 정통하며 전하가 장군을 도발하는 가장 참을 수 없는 방법임을 알고 있습니다.
qiyezp.com
Nuan Pavilion을 떠난 지 얼마되지 않아 Wang Ao는 “Captain”이라고 재빨리 앞으로 나아갔습니다.
tvlore.com
“뇌발작이 있는 건 아닐까?” 홍지황제는 격노했다.
qiyezp.com
비정상적인 것이 악마라는 전설이 아닐까요?
qiyezp.com
Fang Jifan은 순종적으로 교실로 돌아왔고 그는 Xie Qian을 흘끗 보았습니다.
nikontinoll.com
그는 그런 오프닝을 열었고 모두 리동양을 바라봤다.
sandyterrace.com
그런데… 그렇게 거대한 차가 갑자기 진동하기 시작했다.
difference between repaglinide and nateglinide
PBN sites
We will generate a structure of privately-owned blog network sites!
Merits of our PBN network:
We execute everything SO THAT GOOGLE doesn’t understand THAT this is A privately-owned blog network!!!
1- We acquire domains from different registrars
2- The primary site is hosted on a virtual private server (Virtual Private Server is fast hosting)
3- The remaining sites are on distinct hostings
4- We assign a separate Google ID to each site with confirmation in Search Console.
5- We develop websites on WP, we do not utilize plugins with assistance from which malware penetrate and through which pages on your websites are created.
6- We do not reiterate templates and use only exclusive text and pictures
We never work with website design; the client, if wanted, can then edit the websites to suit his wishes