2023-02-21 iOS工程接入flutter模块的实现流程

IOSapp接入FlutterModule按照官方文档操作,我们使用使用 CocoaPods 和 Flutter SDK 集成:
https://flutter.cn/docs/development/add-to-app/ios/project-setup

IOSapp代码中接入Flutter页面方式:
https://flutter.cn/docs/development/add-to-app/ios/add-flutter-screen?tab=engine-uikit-objc-tab

在工程中我们没有看到App.framework
Flutter.framework,这些怎么在编译的时候又加进来的呢?

image.png

可以看到编译app后 App.framework 和Flutter.framework链接进来的:

image.png

这其实就是flutter 的podhelper.rb中完成的操作:

  • 第1步, flutter pub get 生成, .ios/Flutter/podhelper.rb
  • 第2步,在app的工程中的podfile添加脚本
flutter_application_path = '../fluttermodule'
load File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')

target 'flutter-app' do
  use_frameworks!
  install_all_flutter_pods(flutter_application_path)
end

post_install do |installer|
  flutter_post_install(installer) if defined?(flutter_post_install)
end

在 .ios/Flutter/podhelper.rb 的方法 install_all_flutter_pods

def install_all_flutter_pods(flutter_application_path = nil)
  # defined_in_file is a Pathname to the Podfile set by CocoaPods.
  pod_contents = File.read(defined_in_file)
  unless pod_contents.include? 'flutter_post_install'
    puts  <<~POSTINSTALL
Add `flutter_post_install(installer)` to your Podfile `post_install` block to build Flutter plugins:

post_install do |installer|
  flutter_post_install(installer)
end
POSTINSTALL
    raise 'Missing `flutter_post_install(installer)` in Podfile `post_install` block'
  end

  require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

  flutter_application_path ||= File.join('..', '..')
  install_flutter_engine_pod(flutter_application_path)
  install_flutter_plugin_pods(flutter_application_path)
  install_flutter_application_pod(flutter_application_path)
end
1. install_flutter_engine_pod(flutter_application_path)方法:
def install_flutter_engine_pod(flutter_application_path = nil)
  flutter_application_path ||= File.join('..', '..')
  ios_application_path = File.join(flutter_application_path, '.ios')

  # flutter_install_ios_engine_pod is in Flutter root podhelper.rb
  flutter_install_ios_engine_pod(ios_application_path)
end

这个方法会调用flutter 中的podhelper.rb脚本: flutter_tools/bin/podhelper.rb

def flutter_install_ios_engine_pod(ios_application_path = nil)
  # defined_in_file is set by CocoaPods and is a Pathname to the Podfile.
  ios_application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)
  raise 'Could not find iOS application path' unless ios_application_path

  podspec_directory = File.join(ios_application_path, 'Flutter')
  copied_podspec_path = File.expand_path('Flutter.podspec', podspec_directory)

  # Generate a fake podspec to represent the Flutter framework.
  # This is only necessary because plugin podspecs contain `s.dependency 'Flutter'`, and if this Podfile
  # does not add a `pod 'Flutter'` CocoaPods will try to download it from the CocoaPods trunk.
  File.open(copied_podspec_path, 'w') { |podspec|
    podspec.write <<~EOF
      #
      # NOTE: This podspec is NOT to be published. It is only used as a local source!
      #       This is a generated file; do not edit or check into version control.
      #

      Pod::Spec.new do |s|
        s.name             = 'Flutter'
        s.version          = '1.0.0'
        s.summary          = 'A UI toolkit for beautiful and fast apps.'
        s.homepage         = 'https://flutter.dev'
        s.license          = { :type => 'BSD' }
        s.author           = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
        s.source           = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
        s.ios.deployment_target = '11.0'
        # Framework linking is handled by Flutter tooling, not CocoaPods.
        # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
        s.vendored_frameworks = 'path/to/nothing1234567'
      end
    EOF
  }

  # Keep pod path relative so it can be checked into Podfile.lock.
  pod 'Flutter', :path => flutter_relative_path_from_podfile(podspec_directory)
end

这里作用就是创建一个Flutter的podspec,导入Flutter pod仓库。但是这时候只是提供一个pod 名。 实际上Flutter.framework并没有导入到app工程中。


image.png
2. install_flutter_plugin_pods
def install_flutter_plugin_pods(flutter_application_path)
  flutter_application_path ||= File.join('..', '..')
  ios_application_path = File.join(flutter_application_path, '.ios')
  # flutter_install_plugin_pods is in Flutter root podhelper.rb
  flutter_install_plugin_pods(ios_application_path, '.symlinks', 'ios')

  # Keep pod path relative so it can be checked into Podfile.lock.
  relative = flutter_relative_path_from_podfile(ios_application_path)
  pod 'FlutterPluginRegistrant', :path => File.join(relative, 'Flutter', 'FlutterPluginRegistrant'), :inhibit_warnings => true
end

这里是安装FlutterPluginRegistrant 仓库

3. install_flutter_application_pod
def install_flutter_application_pod(flutter_application_path)
  flutter_application_path ||= File.join('..', '..')

  export_script_directory = File.join(flutter_application_path, '.ios', 'Flutter')

  # Keep script phase paths relative so they can be checked into source control.
  relative = flutter_relative_path_from_podfile(export_script_directory)

  flutter_export_environment_path = File.join('${SRCROOT}', relative, 'flutter_export_environment.sh');

  # Compile App.framework and move it and Flutter.framework to "BUILT_PRODUCTS_DIR"
  script_phase :name => 'Run Flutter Build fluttermodule Script',
    :script => "set -e\nset -u\nsource \"#{flutter_export_environment_path}\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build",
    :execution_position => :before_compile

  # Embed App.framework AND Flutter.framework.
  script_phase :name => 'Embed Flutter Build fluttermodule Script',
    :script => "set -e\nset -u\nsource \"#{flutter_export_environment_path}\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh embed_and_thin",
    :execution_position => :after_compile
end

script_phase 这个是一个ruby函数,他的实现应该是cocoapods提供的基本功能。
作用就是给xcode工程编译的时候插入脚本,
before_compile,after_compile 编译前和编译后,分别执行脚本。


image.png

我们可以学习这种写入脚本的方法,写一些别的脚本干点事情,例如:

 
def install_flutter_application_pod
  flutter_export_environment_path = '123'
  script_phase :name => 'Run Flutter Build fluttermodule Script',
    :script => "set -e\nset -u\nsource \"#{flutter_export_environment_path}\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh build",
    :execution_position => :before_compile
  script_phase :name => 'Embed Flutter Build fluttermodule Script',
    :script => "set -e\nset -u\nsource \"#{flutter_export_environment_path}\"\nexport VERBOSE_SCRIPT_LOGGING=1 && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/xcode_backend.sh embed_and_thin",
    :execution_position => :after_compile
end

target 'tt' do
  use_frameworks!
  install_flutter_application_pod
end
4. flutter_post_install
post_install do |installer|
  flutter_post_install(installer) if defined?(flutter_post_install)
end
  • 首先是flutter module里面的podhelper.rb
def flutter_post_install(installer, skip: false)
  return if skip

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |build_configuration|
      # flutter_additional_ios_build_settings is in Flutter root podhelper.rb
      flutter_additional_ios_build_settings(target)
    end
  end
end
  • 然后是flutter里面的podhelper.rb
    flutter_additional_ios_build_settings
def flutter_additional_ios_build_settings(target)
  return unless target.platform_name == :ios

  # [target.deployment_target] is a [String] formatted as "8.0".
  inherit_deployment_target = target.deployment_target[/\d+/].to_i < 11

  # This podhelper script is at $FLUTTER_ROOT/packages/flutter_tools/bin.
  # Add search paths from $FLUTTER_ROOT/bin/cache/artifacts/engine.
  artifacts_dir = File.join('..', '..', '..', '..', 'bin', 'cache', 'artifacts', 'engine')
  debug_framework_dir = File.expand_path(File.join(artifacts_dir, 'ios', 'Flutter.xcframework'), __FILE__)

  unless Dir.exist?(debug_framework_dir)
    # iOS artifacts have not been downloaded.
    raise "#{debug_framework_dir} must exist. If you're running pod install manually, make sure \"flutter precache --ios\" is executed first"
  end

  release_framework_dir = File.expand_path(File.join(artifacts_dir, 'ios-release', 'Flutter.xcframework'), __FILE__)
  # Bundles are com.apple.product-type.bundle, frameworks are com.apple.product-type.framework.
  target_is_resource_bundle = target.respond_to?(:product_type) && target.product_type == 'com.apple.product-type.bundle'

  target.build_configurations.each do |build_configuration|
    # Build both x86_64 and arm64 simulator archs for all dependencies. If a single plugin does not support arm64 simulators,
    # the app and all frameworks will fall back to x86_64. Unfortunately that case is not detectable in this script.
    # Therefore all pods must have a x86_64 slice available, or linking a x86_64 app will fail.
    build_configuration.build_settings['ONLY_ACTIVE_ARCH'] = 'NO' if build_configuration.type == :debug

    # Workaround https://github.com/CocoaPods/CocoaPods/issues/11402, do not sign resource bundles.
    if target_is_resource_bundle
      build_configuration.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      build_configuration.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
      build_configuration.build_settings['CODE_SIGNING_IDENTITY'] = '-'
      build_configuration.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = '-'
    end

    # Skip other updates if it's not a Flutter plugin (transitive dependency).
    next unless target.dependencies.any? { |dependency| dependency.name == 'Flutter' }

    # Profile can't be derived from the CocoaPods build configuration. Use release framework (for linking only).
    configuration_engine_dir = build_configuration.type == :debug ? debug_framework_dir : release_framework_dir
    Dir.new(configuration_engine_dir).each_child do |xcframework_file|
      next if xcframework_file.start_with?(".") # Hidden file, possibly on external disk.
      if xcframework_file.end_with?("-simulator") # ios-arm64_x86_64-simulator
        build_configuration.build_settings['FRAMEWORK_SEARCH_PATHS[sdk=iphonesimulator*]'] = "\"#{configuration_engine_dir}/#{xcframework_file}\" $(inherited)"
      elsif xcframework_file.start_with?("ios-") # ios-arm64
        build_configuration.build_settings['FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]'] = "\"#{configuration_engine_dir}/#{xcframework_file}\" $(inherited)"
      else
        # Info.plist or another platform.
      end
    end
    build_configuration.build_settings['OTHER_LDFLAGS'] = '$(inherited) -framework Flutter'

    build_configuration.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
    # Suppress warning when pod supports a version lower than the minimum supported by Xcode (Xcode 12 - iOS 9).
    # This warning is harmless but confusing--it's not a bad thing for dependencies to support a lower version.
    # When deleted, the deployment version will inherit from the higher version derived from the 'Runner' target.
    # If the pod only supports a higher version, do not delete to correctly produce an error.
    build_configuration.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if inherit_deployment_target

    # Override legacy Xcode 11 style VALID_ARCHS[sdk=iphonesimulator*]=x86_64 and prefer Xcode 12 EXCLUDED_ARCHS.
    build_configuration.build_settings['VALID_ARCHS[sdk=iphonesimulator*]'] = '$(ARCHS_STANDARD)'
    build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = '$(inherited) i386'
    build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphoneos*]'] = '$(inherited) armv7'
  end
end

主要作用就是设置 FRAMEWORK_SEARCH_PATHS ,OTHER_LDFLAGS


image.png

看到了吗,编译时候查找的是flutter中的flutter.framework,这个目录下有各种架构和版本的Flutter.framework,真机,模拟器,release,debug,profile各种:
/Volumes/huc/myshared/opt/fvm/versions/3.3.7/bin/cache/artifacts/engine/ios/


image.png
5. xcode_backend.sh
set -e
set -u
source "${SRCROOT}/../fluttermodule/.ios/Flutter/flutter_export_environment.sh"
export VERBOSE_SCRIPT_LOGGING=1 && "$FLUTTER_ROOT"/packages/flutter_tools/bin/xcode_backend.sh build

xcode_backend.sh 调用xcode_backend.dart

我们修改一下runSync函数, 让所有脚本都输出日志:

    //if (verbose) {
      print('♦ $bin ${args.join(' ')}');
    //}
image.png

最后可以导出日志文件进行匹配,可以看看执行了哪些操作:

Searching 1 file for "♦ " (regex)

~/Desktop/Build flutter-app_2023-02-22T14-20-33.txt:
  667: ♦ /Volumes/huc/myshared/opt/fvm/versions/3.3.7/bin/flutter --verbose assemble --no-version-check --output=/Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/ -dTargetPlatform=ios -dTargetFile=lib/main.dart -dBuildMode=debug -dIosArchs=x86_64 -dSdkRoot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.0.sdk -dSplitDebugInfo= -dTreeShakeIcons=false -dTrackWidgetCreation=true -dDartObfuscation=false -dEnableBitcode= --ExtraGenSnapshotOptions= --DartDefines= --ExtraFrontEndOptions= -dCodesignIdentity=- debug_ios_bundle_flutter_assets

  
  742: ♦ /Volumes/huc/myshared/opt/fvm/versions/3.3.7/bin/flutter --verbose assemble --no-version-check --output=/Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/ -dTargetPlatform=ios -dTargetFile=lib/main.dart -dBuildMode=debug -dIosArchs=x86_64 -dSdkRoot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.0.sdk -dSplitDebugInfo= -dTreeShakeIcons=false -dTrackWidgetCreation=true -dDartObfuscation=false -dEnableBitcode= --ExtraGenSnapshotOptions= --DartDefines= --ExtraFrontEndOptions= -dCodesignIdentity=- debug_ios_bundle_flutter_assets




 1475: ♦ mkdir -p -- /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Frameworks
 1476: ♦ rsync -8 -av --delete --filter - .DS_Store /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/App.framework /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Frameworks
 1477: ♦ rsync -av --delete --filter - .DS_Store /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/Flutter.framework /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Frameworks/
 1478: ♦ plutil -extract NSBonjourServices xml1 -o - /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Info.plist
 1479: ♦ plutil -insert NSBonjourServices -json ["_dartobservatory._tcp"] /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Info.plist
 1480: ♦ plutil -extract NSLocalNetworkUsageDescription xml1 -o - /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Info.plist
 1481: ♦ plutil -insert NSLocalNetworkUsageDescription -string Allow Flutter tools on your computer to connect and debug your application. This prompt will not appear on release builds. /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Info.plist




 1483: ♦ mkdir -p -- /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Frameworks
 1485: ♦ rsync -8 -av --delete --filter - .DS_Store /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/App.framework /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Frameworks
 1487: ♦ rsync -av --delete --filter - .DS_Store /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/Flutter.framework /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Frameworks/
 1489: ♦ plutil -extract NSBonjourServices xml1 -o - /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Info.plist
 1491: ♦ plutil -insert NSBonjourServices -json ["_dartobservatory._tcp"] /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Info.plist
 1493: ♦ plutil -extract NSLocalNetworkUsageDescription xml1 -o - /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Info.plist
 1495: ♦ plutil -insert NSLocalNetworkUsageDescription -string Allow Flutter tools on your computer to connect and debug your application. This prompt will not appear on release builds. /Users/a58/Library/Developer/Xcode/DerivedData/flutter-app-dknedoeqlmcgtfafasrahlcseagi/Build/Products/Debug-iphonesimulator/flutter-app.app/Info.plist

16 matches in 1 file

通过从日志匹配,看到以上操作。

  • 编译App.framework
  • 拷贝App.framework到 flutter-app.app/Frameworks包下面
  • 拷贝Flutter.framework到app包
  • Info.plist添加NSBonjourServices配置
  • Info.plist添加NSLocalNetworkUsageDescription配置
image.png

这里用到了shell命令,rsync来拷贝文件,plutil来操作plist。

可见我们在开发flutter模块过程中, app用接入flutter模块这种用flutter源代码方式接入的开发方式下,

  • flutter测新添加了pub仓库,执行flutter pub get,然后执行pod install 同步。
  • 如果没有新加pub,只是修改dart代码,ios这边只需要重新build 就可以同步最新dart代码。

到此,ios工程接入flutter module的开发过程就分析完成。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,491评论 5 459
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,856评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,745评论 0 319
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,196评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,073评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,112评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,531评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,215评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,485评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,578评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,356评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,215评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,583评论 3 299
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,898评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,174评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,497评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,697评论 2 335

推荐阅读更多精彩内容