├── bin └── .gitkeep ├── etc └── .gitkeep ├── tool └── .gitkeep ├── VERSION ├── lib ├── src │ ├── .gitkeep │ ├── errors.dart │ └── thread.dart └── flutter_lua.dart ├── doc └── .gitignore ├── ios ├── Assets │ └── .gitkeep ├── Frameworks │ └── .gitignore ├── Classes │ ├── FlutterLuaPlugin.h │ ├── FlutterLuaPlugin.m │ └── SwiftFlutterLuaPlugin.swift ├── .gitignore └── flutter_lua.podspec ├── TODO.md ├── CREDITS.md ├── AUTHORS ├── .test_config ├── android ├── gradle.properties ├── settings.gradle ├── libs │ └── .gitignore ├── .gitignore ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── github │ │ └── drydart │ │ └── flutter_lua │ │ ├── FlutterMethodCallHandler.java │ │ ├── FlutterLuaPlugin.java │ │ └── FlutterLuaThreadHandler.java └── build.gradle ├── example ├── android │ ├── gradle.properties │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ └── ic_launcher.png │ │ │ │ │ ├── values │ │ │ │ │ │ └── styles.xml │ │ │ │ │ └── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── java │ │ │ │ │ └── com │ │ │ │ │ │ └── github │ │ │ │ │ │ └── drydart │ │ │ │ │ │ └── flutter_lua_example │ │ │ │ │ │ └── MainActivity.java │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle ├── ios │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Info.plist │ │ └── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── xcschemes │ │ │ │ └── Runner.xcscheme │ │ └── project.pbxproj │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── WorkspaceSettings.xcsettings │ ├── Podfile.lock │ └── Podfile ├── scripts │ ├── answer.lua │ └── hello.lua ├── .metadata ├── README.md ├── test │ └── widget_test.dart ├── .gitignore ├── pubspec.yaml └── lib │ └── main.dart ├── Makefile ├── README ├── .travis.yml ├── .metadata ├── .gitignore ├── pubspec.yaml ├── test └── flutter_lua_test.dart ├── UNLICENSE ├── CHANGELOG.md ├── flutter_lua_vm.go └── README.md /bin/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /etc/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tool/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 0.3.1 2 | -------------------------------------------------------------------------------- /lib/src/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/.gitignore: -------------------------------------------------------------------------------- 1 | api 2 | -------------------------------------------------------------------------------- /ios/Assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | To-Dos 2 | ====== 3 | -------------------------------------------------------------------------------- /CREDITS.md: -------------------------------------------------------------------------------- 1 | Credits 2 | ======= 3 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | * Arto Bendiken 2 | -------------------------------------------------------------------------------- /.test_config: -------------------------------------------------------------------------------- 1 | { 2 | "test_package": true 3 | } 4 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'flutter_lua' 2 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /ios/Frameworks/.gitignore: -------------------------------------------------------------------------------- 1 | # GoMobile build output 2 | #Flutter_lua_vm.framework/ 3 | -------------------------------------------------------------------------------- /android/libs/.gitignore: -------------------------------------------------------------------------------- 1 | # GoMobile build output 2 | #flutter_lua_vm.aar 3 | flutter_lua_vm-sources.jar 4 | -------------------------------------------------------------------------------- /example/scripts/answer.lua: -------------------------------------------------------------------------------- 1 | -- This is free and unencumbered software released into the public domain. 2 | 3 | return 6 * 7 4 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/scripts/hello.lua: -------------------------------------------------------------------------------- 1 | -- This is free and unencumbered software released into the public domain. 2 | 3 | print("Hello, world! (from Lua!)") 4 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | FLUTTER ?= flutter 2 | PANDOC ?= pandoc 3 | PUB ?= pub 4 | 5 | check: 6 | $(FLUTTER) test 7 | 8 | .PHONY: check 9 | .SECONDARY: 10 | .SUFFIXES: 11 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Flutter Lua Plugin 2 | ================== 3 | 4 | See for documentation. 5 | 6 | Use for bug reports. 7 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/drydart/flutter_lua/HEAD/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # See: https://drycop.org 2 | language: go 3 | go: 4 | - 1.12 5 | git: 6 | depth: 1 7 | install: 8 | - go get -u github.com/dryproject/drycop/drycop 9 | script: 10 | - drycop check -v 11 | -------------------------------------------------------------------------------- /ios/Classes/FlutterLuaPlugin.h: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #import 4 | 5 | @interface FlutterLuaPlugin : NSObject 6 | @end 7 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713 8 | channel: beta 9 | 10 | project_type: plugin 11 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /ios/Classes/FlutterLuaPlugin.m: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | #import "FlutterLuaPlugin.h" 4 | #import 5 | 6 | @implementation FlutterLuaPlugin 7 | + (void)registerWithRegistrar:(NSObject*)registrar { 8 | [SwiftFlutterLuaPlugin registerWithRegistrar:registrar]; 9 | } 10 | @end 11 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # macOS 2 | .DS_Store 3 | 4 | # Editor backup files 5 | *~ 6 | 7 | # rst2html outputs 8 | *.html 9 | 10 | # Dart artifacts 11 | .dart_tool/ 12 | .packages 13 | build/ 14 | pubspec.lock 15 | 16 | # VS Code artifacts 17 | .vscode/ 18 | android/.classpath 19 | android/.project 20 | android/.settings/ 21 | example/android/.project 22 | example/android/.settings/ 23 | example/android/app/.classpath 24 | example/android/app/.project 25 | example/android/app/.settings/ 26 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/github/drydart/flutter_lua_example/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.github.drydart.flutter_lua_example; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/Generated.xcconfig 37 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - flutter_lua (0.2.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `.symlinks/flutter/ios`) 8 | - flutter_lua (from `.symlinks/plugins/flutter_lua/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: ".symlinks/flutter/ios" 13 | flutter_lua: 14 | :path: ".symlinks/plugins/flutter_lua/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a 18 | flutter_lua: 3515a6c5531ac9db83fc7f25bfd914cf4b46df7c 19 | 20 | PODFILE CHECKSUM: ebd43b443038e611b86ede96e613bd6033c49497 21 | 22 | COCOAPODS: 1.6.1 23 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # flutter_lua_example 2 | 3 | Demonstrates how to use the flutter_lua plugin. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | # See: https://www.dartlang.org/tools/pub/pubspec 2 | name: flutter_lua 3 | version: 0.3.1 4 | description: >- 5 | Lua interpreter and runtime for executing dynamic scripts in Flutter apps. 6 | author: Arto Bendiken 7 | homepage: https://github.com/drydart/flutter_lua 8 | documentation: 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | meta: ^1.1.6 13 | dev_dependencies: 14 | flutter_test: 15 | sdk: flutter 16 | test: any 17 | dependency_overrides: 18 | environment: 19 | sdk: '>=2.1.0 <3.0.0' 20 | executables: 21 | flutter: 22 | plugin: 23 | androidPackage: com.github.drydart.flutter_lua 24 | pluginClass: FlutterLuaPlugin 25 | -------------------------------------------------------------------------------- /test/flutter_lua_test.dart: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | import 'package:flutter/services.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | import 'package:flutter_lua/flutter_lua.dart'; 6 | 7 | void main() { 8 | const MethodChannel channel = MethodChannel('flutter_lua'); 9 | 10 | setUp(() { 11 | channel.setMockMethodCallHandler((MethodCall methodCall) async { 12 | return '42'; 13 | }); 14 | }); 15 | 16 | tearDown(() { 17 | channel.setMockMethodCallHandler(null); 18 | }); 19 | 20 | test('getPlatformVersion', () async { 21 | expect(await FlutterLua.platformVersion, '42'); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /lib/src/errors.dart: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | import 'package:flutter/services.dart' show PlatformException; 4 | 5 | import 'dart:io'; 6 | 7 | /// A Lua VM error. 8 | class LuaError implements IOException { 9 | final String message; 10 | 11 | const LuaError(this.message); 12 | 13 | LuaError.from(final PlatformException exception) 14 | : message = exception.message; 15 | 16 | @override 17 | String toString() { 18 | final buffer = StringBuffer(); 19 | buffer.write("LuaError"); 20 | if (message.isNotEmpty) { 21 | buffer..write(": ")..write(message); 22 | } 23 | return buffer.toString(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | group 'com.github.drydart.flutter_lua' 2 | version '1.0-SNAPSHOT' 3 | 4 | buildscript { 5 | repositories { 6 | google() 7 | jcenter() 8 | } 9 | 10 | dependencies { 11 | classpath 'com.android.tools.build:gradle:3.2.1' 12 | } 13 | } 14 | 15 | rootProject.allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | apply plugin: 'com.android.library' 23 | 24 | android { 25 | compileSdkVersion 28 26 | 27 | defaultConfig { 28 | minSdkVersion 16 29 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 30 | } 31 | lintOptions { 32 | disable 'InvalidPackage' 33 | } 34 | } 35 | 36 | dependencies { 37 | implementation fileTree(include: ['*.aar'], dir: 'libs') 38 | } 39 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/flutter_lua.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 3 | # 4 | Pod::Spec.new do |s| 5 | s.name = 'flutter_lua' 6 | s.version = File.read('../VERSION').chomp 7 | s.summary = 'Lua interpreter and runtime.' 8 | s.description = 'Lua interpreter and runtime for executing dynamic scripts in Flutter apps.' 9 | s.homepage = 'https://github.com/drydart/flutter_lua' 10 | s.license = { :file => '../UNLICENSE' } 11 | s.author = { 'Arto Bendiken' => 'arto@bendiken.net' } 12 | s.source = { :path => '.' } 13 | s.source_files = 'Classes/**/*' 14 | s.public_header_files = 'Classes/**/*.h' 15 | s.dependency 'Flutter' 16 | s.ios.deployment_target = '8.0' 17 | 18 | # Generated by GoMobile: 19 | s.vendored_frameworks = 'Frameworks/Flutter_lua_vm.framework' 20 | s.preserve_paths = 'Frameworks/Flutter_lua_vm.framework' 21 | s.xcconfig = { 'OTHER_LDFLAGS' => '-framework Flutter_lua_vm' } 22 | end 23 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_lua_example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Verify Platform version', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that platform version is retrieved. 19 | expect( 20 | find.byWidgetPredicate( 21 | (Widget widget) => widget is Text && 22 | widget.data.startsWith('Running on:'), 23 | ), 24 | findsOneWidget, 25 | ); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Changelog 2 | --------- 3 | 4 | All notable changes to this project will be documented in this file. 5 | 6 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 7 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 8 | 9 | ## [0.3.1] - 2019-04-24 10 | ### Changed 11 | - Improved the example app 12 | 13 | ## [0.3.0] - 2019-03-14 14 | ### Added 15 | - Added initial iOS platform support (#1) 16 | - `Lua.eval()` static method 17 | - `Lua.evalAsset()` static method 18 | - `Lua.evalFile()` static method 19 | ### Removed 20 | - `Lua.doString()` method (use `Lua.eval()`) 21 | - `Lua.doFile()` method (use `Lua.evalFile()`) 22 | 23 | ## [0.2.0] - 2019-03-10 24 | ### Added 25 | - `LuaError` exception class 26 | ### Changed 27 | - Implemented `PlatformException` wrapping 28 | 29 | ## [0.1.0] - 2019-02-27 30 | ### Added 31 | - `Lua.version` static getter 32 | - `LuaThread#eval()` method 33 | - `LuaThread#evalAsset()` method 34 | - `LuaThread#evalFile()` method 35 | - `LuaThread#exec()` method 36 | - `LuaThread#execAsset()` method 37 | - `LuaThread#execFile()` method 38 | 39 | [0.3.1]: https://github.com/drydart/flutter_lua/compare/0.3.0...0.3.1 40 | [0.3.0]: https://github.com/drydart/flutter_lua/compare/0.2.0...0.3.0 41 | [0.2.0]: https://github.com/drydart/flutter_lua/compare/0.1.0...0.2.0 42 | [0.1.0]: https://github.com/drydart/flutter_lua/compare/0.0.0...0.1.0 43 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_lua_example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /flutter_lua_vm.go: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | // Package flutter_lua_vm 4 | package flutter_lua_vm 5 | 6 | import ( 7 | "fmt" 8 | 9 | lua "github.com/Shopify/go-lua" 10 | ) 11 | 12 | // State 13 | type State struct { 14 | s *lua.State 15 | } 16 | 17 | // NewState 18 | func NewState() *State { 19 | s := lua.NewStateEx() 20 | lua.OpenLibraries(s) 21 | return &State{s: s} 22 | } 23 | 24 | // Version 25 | func Version() string { 26 | state := lua.NewState() 27 | version := int(*lua.Version(state)) 28 | return fmt.Sprintf("%d.%d", version/100, version%100) 29 | } 30 | 31 | // ExecFile 32 | func (state *State) ExecFile(path string) error { 33 | return lua.DoFile(state.s, path) 34 | } 35 | 36 | // ExecString 37 | func (state *State) ExecString(code string) error { 38 | return lua.DoString(state.s, code) 39 | } 40 | 41 | // HasResult 42 | func (state *State) HasResult() bool { 43 | return state.s.Top() > 0 44 | } 45 | 46 | // ResultType 47 | func (state *State) ResultType() int { 48 | return int(state.s.TypeOf(1)) 49 | } 50 | 51 | // BoolValue 52 | func (state *State) BoolValue() bool { 53 | return state.s.ToBoolean(1) 54 | } 55 | 56 | // IntValue 57 | func (state *State) IntValue() int { 58 | value, _ := state.s.ToInteger(1) 59 | return value 60 | } 61 | 62 | // LongValue 63 | func (state *State) LongValue() int { 64 | value, _ := state.s.ToInteger(1) 65 | return value 66 | } 67 | 68 | // DoubleValue 69 | func (state *State) DoubleValue() float64 { 70 | value, _ := state.s.ToNumber(1) 71 | return value 72 | } 73 | 74 | // StringValue 75 | func (state *State) StringValue() string { 76 | value, _ := state.s.ToString(1) 77 | return value 78 | } 79 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/flutter_lua.dart: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | /// Lua interpreter for Flutter. 4 | library flutter_lua; 5 | 6 | export 'src/errors.dart' show LuaError; 7 | export 'src/thread.dart' show LuaThread; 8 | 9 | import 'dart:async' show Future; 10 | import 'dart:io' show File; 11 | 12 | import 'package:flutter/services.dart' show MethodChannel, PlatformException; 13 | 14 | import 'src/errors.dart' show LuaError; 15 | 16 | const MethodChannel _channel = const MethodChannel('flutter_lua'); 17 | 18 | abstract class Lua { 19 | /// The current Lua runtime version. 20 | static Future get version async { 21 | return await _channel.invokeMethod('getVersion'); 22 | } 23 | 24 | /// Evaluates a Lua code snippet, returning a result. 25 | static Future eval(final String code) async { 26 | try { 27 | return await _channel.invokeMethod('evalString', code); 28 | } on PlatformException catch (error) { 29 | throw LuaError.from(error); 30 | } 31 | } 32 | 33 | /// Evaluates a bundled Lua source file, returning a result. 34 | static Future evalAsset(final String assetName) async { 35 | try { 36 | return await _channel.invokeMethod('evalAsset', assetName); 37 | } on PlatformException catch (error) { 38 | throw LuaError.from(error); 39 | } 40 | } 41 | 42 | /// Evaluates a Lua source file, returning a result. 43 | static Future evalFile(final File path) async { 44 | try { 45 | final absolutePath = path.isAbsolute ? path : path.absolute; 46 | return await _channel.invokeMethod('evalFile', absolutePath.toString()); 47 | } on PlatformException catch (error) { 48 | throw LuaError.from(error); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 28 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.github.drydart.flutter_lua_example" 37 | minSdkVersion 16 38 | targetSdkVersion 28 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_lua_example 2 | description: Demonstrates how to use the flutter_lua plugin. 3 | publish_to: 'none' 4 | 5 | environment: 6 | sdk: ">=2.1.0 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | 12 | # The following adds the Cupertino Icons font to your application. 13 | # Use with the CupertinoIcons class for iOS style icons. 14 | cupertino_icons: ^0.1.2 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | 20 | flutter_lua: 21 | path: ../ 22 | 23 | # For information on the generic Dart part of this file, see the 24 | # following page: https://www.dartlang.org/tools/pub/pubspec 25 | 26 | # The following section is specific to Flutter. 27 | flutter: 28 | 29 | # The following line ensures that the Material Icons font is 30 | # included with your application, so that you can use the icons in 31 | # the material Icons class. 32 | uses-material-design: true 33 | 34 | # To add assets to your application, add an assets section, like this: 35 | assets: 36 | - scripts/ 37 | 38 | # An image asset can refer to one or more resolution-specific "variants", see 39 | # https://flutter.dev/assets-and-images/#resolution-aware. 40 | 41 | # For details regarding adding assets from package dependencies, see 42 | # https://flutter.dev/assets-and-images/#from-packages 43 | 44 | # To add custom fonts to your application, add a fonts section here, 45 | # in this "flutter" section. Each entry in this list should have a 46 | # "family" key with the font family name, and a "fonts" key with a 47 | # list giving the asset and other descriptors for the font. For 48 | # example: 49 | # fonts: 50 | # - family: Schyler 51 | # fonts: 52 | # - asset: fonts/Schyler-Regular.ttf 53 | # - asset: fonts/Schyler-Italic.ttf 54 | # style: italic 55 | # - family: Trajan Pro 56 | # fonts: 57 | # - asset: fonts/TrajanPro.ttf 58 | # - asset: fonts/TrajanPro_Bold.ttf 59 | # weight: 700 60 | # 61 | # For details regarding fonts from package dependencies, 62 | # see https://flutter.dev/custom-fonts/#from-packages 63 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | 38 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 39 | # referring to absolute paths on developers' machines. 40 | system('rm -rf .symlinks') 41 | system('mkdir -p .symlinks/plugins') 42 | 43 | # Flutter Pods 44 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 45 | if generated_xcode_build_settings.empty? 46 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 47 | end 48 | generated_xcode_build_settings.map { |p| 49 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 50 | symlink = File.join('.symlinks', 'flutter') 51 | File.symlink(File.dirname(p[:path]), symlink) 52 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 53 | end 54 | } 55 | 56 | # Plugin Pods 57 | plugin_pods = parse_KV_file('../.flutter-plugins') 58 | plugin_pods.map { |p| 59 | symlink = File.join('.symlinks', 'plugins', p[:name]) 60 | File.symlink(p[:path], symlink) 61 | pod p[:name], :path => File.join(symlink, 'ios') 62 | } 63 | end 64 | 65 | post_install do |installer| 66 | installer.pods_project.targets.each do |target| 67 | target.build_configurations.each do |config| 68 | config.build_settings['ENABLE_BITCODE'] = 'NO' 69 | end 70 | end 71 | end 72 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Flutter Lua Plugin 2 | ================== 3 | 4 | [![Project license](https://img.shields.io/badge/license-Public%20Domain-blue.svg)](https://unlicense.org) 5 | [![Pub package](https://img.shields.io/pub/v/flutter_lua.svg)](https://pub.dartlang.org/packages/flutter_lua) 6 | [![Dartdoc reference](https://img.shields.io/badge/dartdoc-reference-blue.svg)](https://pub.dartlang.org/documentation/flutter_lua/latest/) 7 | [![Travis CI build status](https://img.shields.io/travis/drydart/flutter_lua/master.svg)](https://travis-ci.org/drydart/flutter_lua) 8 | [![Liberapay patrons](http://img.shields.io/liberapay/patrons/drydart.svg?logo=liberapay)](https://liberapay.com/drydart/donate) 9 | 10 | This is a [Flutter](https://flutter.dev) plugin that embeds 11 | a [Lua](https://www.lua.org/) interpreter and runtime for executing dynamic 12 | scripts from Flutter apps. 13 | 14 | Features 15 | -------- 16 | 17 | - Embeds a [Lua 5.2](https://www.lua.org/manual/5.2/) interpreter into your 18 | Flutter app. 19 | 20 | - Executes Lua code on a background thread (*not* on the main UI thread). 21 | 22 | - Supports executing source code snippets from strings as well as from 23 | source files bundled in your app's asset bundle. 24 | 25 | Compatibility 26 | ------------- 27 | 28 | Android and iOS both. 29 | 30 | Examples 31 | -------- 32 | 33 | ### Checking the Lua runtime version 34 | 35 | ```dart 36 | import 'package:flutter_lua/flutter_lua.dart' show Lua; 37 | 38 | print(await Lua.version); 39 | ``` 40 | 41 | ### Spawning a new Lua interpreter thread 42 | 43 | ```dart 44 | import 'package:flutter_lua/flutter_lua.dart' show LuaThread; 45 | 46 | var thread = await LuaThread.spawn(); 47 | ``` 48 | 49 | ### Evaluating a Lua code snippet 50 | 51 | ```dart 52 | import 'package:flutter_lua/flutter_lua.dart' show LuaThread; 53 | 54 | var thread = await LuaThread.spawn(); 55 | 56 | await thread.eval("return 6 * 7"); //=> 42.0 57 | ``` 58 | 59 | ### Executing a bundled Lua source file 60 | 61 | ```dart 62 | import 'package:flutter_lua/flutter_lua.dart' show LuaThread; 63 | 64 | var thread = await LuaThread.spawn(); 65 | 66 | await thread.execAsset("scripts/myscript.lua"); 67 | ``` 68 | 69 | Frequently Asked Questions 70 | -------------------------- 71 | 72 | ### How much does using this plugin increase my final app size? 73 | 74 | About 3.8 MiB, at present. 75 | 76 | Caveats 77 | ------- 78 | 79 | - **Currently the only supported result datatypes from `LuaThread#eval*()` 80 | methods are booleans, floating-point numbers (doubles), and strings.** 81 | This will be extended further over the next releases. 82 | -------------------------------------------------------------------------------- /lib/src/thread.dart: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | import 'dart:async' show Future; 4 | import 'dart:io' show File; 5 | 6 | import 'package:flutter/services.dart' show MethodChannel, PlatformException; 7 | 8 | import 'errors.dart' show LuaError; 9 | 10 | const MethodChannel _global = const MethodChannel('flutter_lua'); 11 | 12 | /// A Lua thread. 13 | class LuaThread { 14 | final int id; 15 | final MethodChannel _thread; 16 | 17 | LuaThread._(this.id) : _thread = MethodChannel('flutter_lua/#$id'); 18 | 19 | /// Spawns a new Lua interpreter thread. 20 | static Future spawn() async { 21 | try { 22 | final int id = await _global.invokeMethod('spawnThread'); 23 | return LuaThread._(id); 24 | } on PlatformException catch (error) { 25 | throw LuaError.from(error); 26 | } 27 | } 28 | 29 | /// Evaluates a Lua code snippet, returning a result. 30 | Future eval(final String code) async { 31 | try { 32 | return await _thread.invokeMethod('evalString', code); 33 | } on PlatformException catch (error) { 34 | throw LuaError.from(error); 35 | } 36 | } 37 | 38 | /// Evaluates a bundled Lua source file, returning a result. 39 | Future evalAsset(final String assetName) async { 40 | try { 41 | return await _thread.invokeMethod('evalAsset', assetName); 42 | } on PlatformException catch (error) { 43 | throw LuaError.from(error); 44 | } 45 | } 46 | 47 | /// Evaluates a Lua source file, returning a result. 48 | Future evalFile(final File path) async { 49 | try { 50 | final absolutePath = path.isAbsolute ? path : path.absolute; 51 | return await _thread.invokeMethod('evalFile', absolutePath.toString()); 52 | } on PlatformException catch (error) { 53 | throw LuaError.from(error); 54 | } 55 | } 56 | 57 | /// Executes a Lua code snippet, for its side effects. 58 | Future exec(final String code) async { 59 | try { 60 | await _thread.invokeMethod('evalString', code); 61 | } on PlatformException catch (error) { 62 | throw LuaError.from(error); 63 | } 64 | } 65 | 66 | /// Executes a bundled Lua source file, for its side effects. 67 | Future execAsset(final String assetName) async { 68 | try { 69 | await _thread.invokeMethod('evalAsset', assetName); 70 | } on PlatformException catch (error) { 71 | throw LuaError.from(error); 72 | } 73 | } 74 | 75 | /// Executes a Lua source file, for its side effects. 76 | Future execFile(final File path) async { 77 | try { 78 | final absolutePath = path.isAbsolute ? path : path.absolute; 79 | await _thread.invokeMethod('evalFile', absolutePath.toString()); 80 | } on PlatformException catch (error) { 81 | throw LuaError.from(error); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /android/src/main/java/com/github/drydart/flutter_lua/FlutterMethodCallHandler.java: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | package com.github.drydart.flutter_lua; 4 | 5 | import android.content.res.AssetFileDescriptor; 6 | import android.content.res.AssetManager; 7 | import android.graphics.Bitmap; 8 | import android.graphics.BitmapFactory; 9 | 10 | import io.flutter.plugin.common.MethodCall; 11 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler; 12 | import io.flutter.plugin.common.PluginRegistry.Registrar; 13 | 14 | import java.io.ByteArrayOutputStream; 15 | import java.io.IOException; 16 | import java.io.InputStream; 17 | 18 | /** FlutterMethodCallHandler */ 19 | @SuppressWarnings("unchecked") 20 | abstract class FlutterMethodCallHandler implements MethodCallHandler { 21 | final Registrar registrar; 22 | 23 | FlutterMethodCallHandler(final Registrar registrar) { 24 | this.registrar = registrar; 25 | } 26 | 27 | AssetManager 28 | getAssets() { 29 | return registrar.context().getAssets(); 30 | } 31 | 32 | AssetFileDescriptor 33 | openAsset(final String assetName) throws IOException { 34 | final String assetKey = registrar.lookupKeyForAsset(assetName); 35 | return getAssets().openFd(assetKey); 36 | } 37 | 38 | String 39 | readAssetText(final String assetName) throws IOException { 40 | final String assetKey = registrar.lookupKeyForAsset(assetName); 41 | final InputStream assetStream = getAssets().open(assetKey, AssetManager.ACCESS_STREAMING); 42 | final ByteArrayOutputStream result = new ByteArrayOutputStream(); 43 | { 44 | final byte[] buffer = new byte[8192]; 45 | int length; 46 | while ((length = assetStream.read(buffer)) != -1) { 47 | result.write(buffer, 0, length); 48 | } 49 | } 50 | return result.toString("UTF-8"); 51 | } 52 | 53 | Bitmap 54 | loadBitmap(final String assetName) throws IOException { 55 | return loadBitmap(assetName, null); 56 | } 57 | 58 | Bitmap 59 | loadBitmap(final String assetName, 60 | final BitmapFactory.Options options) throws IOException { 61 | final InputStream stream = openAsset(assetName).createInputStream(); 62 | return BitmapFactory.decodeStream(stream, null, options); 63 | } 64 | 65 | static T 66 | getRequiredArgument(final MethodCall call, 67 | final String name) { 68 | assert(call != null); 69 | assert(name != null); 70 | 71 | if (!call.hasArgument(name)) { 72 | throw new AssertionError(); 73 | } 74 | final T arg = call.argument(name); 75 | if (arg == null) { 76 | throw new AssertionError(); 77 | } 78 | return arg; 79 | } 80 | 81 | static T 82 | getOptionalArgument(final MethodCall call, 83 | final String name) { 84 | return getOptionalArgument(call, name, (T)null); 85 | } 86 | 87 | static T 88 | getOptionalArgument(final MethodCall call, 89 | final String name, 90 | final T defaultValue) { 91 | assert(call != null); 92 | assert(name != null); 93 | 94 | return call.hasArgument(name) && call.argument(name) != null ? 95 | (T)call.argument(name) : defaultValue; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | import 'dart:async' show Future; 4 | 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter/services.dart'; 7 | import 'package:flutter_lua/flutter_lua.dart' show Lua, LuaThread; 8 | 9 | void main() async { 10 | final version = await Lua.version; 11 | print("Lua $version"); 12 | 13 | final thread = await LuaThread.spawn(); 14 | print(await thread.eval('return 6*7')); 15 | 16 | runApp(MyApp()); 17 | } 18 | 19 | class MyApp extends StatefulWidget { 20 | @override 21 | _MyAppState createState() => _MyAppState(); 22 | } 23 | 24 | class _MyAppState extends State { 25 | final _codeController = TextEditingController(text: "return 6*7"); 26 | String _luaVersion = "Unknown"; 27 | LuaThread _luaThread; 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | initPlatformState(); 33 | } 34 | 35 | // Platform messages are asynchronous, so we initialize in an async method. 36 | Future initPlatformState() async { 37 | String luaVersion; 38 | LuaThread luaThread; 39 | 40 | // Platform messages may fail, so we catch platform exceptions: 41 | try { 42 | luaVersion = await Lua.version; 43 | luaThread = await LuaThread.spawn(); 44 | } on PlatformException { 45 | luaVersion = "Failed to get platform version."; 46 | } 47 | 48 | // If the widget was removed from the tree while the asynchronous platform 49 | // message was in flight, we want to discard the reply rather than calling 50 | // setState to update our non-existent appearance: 51 | if (!mounted) return; 52 | 53 | setState(() { 54 | _luaVersion = luaVersion; 55 | _luaThread = luaThread; 56 | }); 57 | } 58 | 59 | @override 60 | Widget build(final BuildContext context) { 61 | return MaterialApp( 62 | home: Scaffold( 63 | appBar: AppBar( 64 | title: Text("Flutter Lua plugin"), 65 | ), 66 | body: Builder( 67 | builder: (final BuildContext context) { 68 | return Center( 69 | child: ListView( 70 | shrinkWrap: true, 71 | padding: EdgeInsets.only(left: 24, right: 24), 72 | children: [ 73 | Center(child: Text("Lua $_luaVersion")), 74 | SizedBox(height: 8), 75 | TextFormField( 76 | controller: _codeController, 77 | maxLines: 10, 78 | autofocus: true, 79 | autocorrect: false, 80 | keyboardType: TextInputType.multiline, 81 | decoration: InputDecoration( 82 | hintText: "Your code", 83 | contentPadding: EdgeInsets.fromLTRB(20, 10, 20, 10), 84 | border: OutlineInputBorder(borderRadius: BorderRadius.circular(16)), 85 | ), 86 | ), 87 | SizedBox(height: 8), 88 | RaisedButton( 89 | child: Text("Evaluate", style: TextStyle(color: Colors.white)), 90 | onPressed: (_luaThread != null) ? () => _evaluate(context) : null, 91 | shape: RoundedRectangleBorder( 92 | borderRadius: BorderRadius.circular(24), 93 | ), 94 | padding: EdgeInsets.all(12), 95 | color: Colors.blueAccent, 96 | ), 97 | ], 98 | ), 99 | ); 100 | }, 101 | ), 102 | ), 103 | ); 104 | } 105 | 106 | void _evaluate(final BuildContext context) async { 107 | final result = await _luaThread.eval(_codeController.text); 108 | Scaffold.of(context).showSnackBar( 109 | SnackBar( 110 | content: Text(result.toString(), textAlign: TextAlign.center), 111 | ), 112 | ); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /android/src/main/java/com/github/drydart/flutter_lua/FlutterLuaPlugin.java: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | package com.github.drydart.flutter_lua; 4 | 5 | import com.github.drydart.flutter_lua_vm.Flutter_lua_vm; 6 | import com.github.drydart.flutter_lua_vm.State; 7 | 8 | import io.flutter.plugin.common.MethodCall; 9 | import io.flutter.plugin.common.MethodChannel; 10 | import io.flutter.plugin.common.MethodChannel.Result; 11 | import io.flutter.plugin.common.PluginRegistry.Registrar; 12 | 13 | import java.io.IOException; 14 | 15 | /** FlutterLuaPlugin */ 16 | public class FlutterLuaPlugin extends FlutterMethodCallHandler { 17 | private static final String TAG = "FlutterLuaPlugin"; 18 | public static final String CHANNEL = "flutter_lua"; 19 | 20 | private long threadID; 21 | 22 | FlutterLuaPlugin(final Registrar registrar) { 23 | super(registrar); 24 | } 25 | 26 | /** Plugin registration. */ 27 | public static void registerWith(final Registrar registrar) { 28 | assert(registrar != null); 29 | 30 | (new MethodChannel(registrar.messenger(), CHANNEL)) 31 | .setMethodCallHandler(new FlutterLuaPlugin(registrar)); 32 | } 33 | 34 | @Override 35 | public void onMethodCall(final MethodCall call, final Result result) { 36 | assert(call != null); 37 | assert(result != null); 38 | 39 | assert(call.method != null); 40 | switch (call.method) { 41 | 42 | case "getVersion": { 43 | result.success(Flutter_lua_vm.version()); 44 | break; 45 | } 46 | 47 | case "spawnThread": { 48 | this.threadID++; 49 | new FlutterLuaThreadHandler(this.registrar, this.threadID); 50 | result.success(this.threadID); 51 | break; 52 | } 53 | 54 | case "evalString": { 55 | final State state = new State(); 56 | try { 57 | state.execString((String)call.arguments); 58 | result.success(popResult(state)); 59 | } 60 | catch (final Exception error) { 61 | result.error("Exception", error.getMessage(), error.toString()); 62 | } 63 | break; 64 | } 65 | 66 | case "evalAsset": { 67 | final State state = new State(); 68 | final String assetName = (String)call.arguments; 69 | final String code; 70 | try { 71 | code = readAssetText(assetName); 72 | } 73 | catch (final IOException error) { 74 | result.error("IOException", error.getMessage(), error.toString()); 75 | break; 76 | } 77 | try { 78 | state.execString(code); 79 | result.success(popResult(state)); 80 | } 81 | catch (final Exception error) { 82 | result.error("Exception", error.getMessage(), error.toString()); 83 | } 84 | break; 85 | } 86 | 87 | case "evalFile": { 88 | final State state = new State(); 89 | try { 90 | state.execFile((String)call.arguments); 91 | result.success(popResult(state)); 92 | } 93 | catch (final Exception error) { 94 | result.error("Exception", error.getMessage(), error.toString()); 95 | } 96 | break; 97 | } 98 | 99 | default: { 100 | result.notImplemented(); 101 | } 102 | } 103 | } 104 | 105 | static Object popResult(final State state) { 106 | if (!state.hasResult()) return null; 107 | switch ((int)state.resultType()) { 108 | case 0: // lua.TypeNil 109 | return null; 110 | case 1: // lua.TypeBoolean 111 | return state.boolValue(); 112 | case 2: // lua.TypeLightUserData 113 | return null; // TODO 114 | case 3: // lua.TypeNumber 115 | return state.doubleValue(); // TODO: support integers 116 | case 4: // lua.TypeString 117 | return state.stringValue(); 118 | case 5: // lua.TypeTable 119 | return null; // TODO 120 | case 6: // lua.TypeFunction 121 | return null; // TODO 122 | case 7: // lua.TypeUserData 123 | return null; // TODO 124 | case 8: // lua.TypeThread 125 | return null; // TODO 126 | case 9: // lua.TypeCount 127 | case -1: // lua.TypeNone 128 | default: 129 | assert(false); // unreachable 130 | return null; // unreachable 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /ios/Classes/SwiftFlutterLuaPlugin.swift: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | import Flutter 4 | import Flutter_lua_vm 5 | import UIKit 6 | 7 | var _threadID: Int = 0 8 | 9 | public class SwiftFlutterLuaPlugin: NSObject, FlutterPlugin { 10 | public static func register(with registrar: FlutterPluginRegistrar) { 11 | let channel = FlutterMethodChannel(name: "flutter_lua", binaryMessenger: registrar.messenger()) 12 | let instance = SwiftFlutterLuaPlugin(registrar: registrar) 13 | registrar.addMethodCallDelegate(instance, channel: channel) 14 | } 15 | 16 | let registrar: FlutterPluginRegistrar 17 | 18 | init(registrar: FlutterPluginRegistrar) { 19 | self.registrar = registrar 20 | super.init() 21 | } 22 | 23 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 24 | switch (call.method) { 25 | case "getVersion": 26 | result(Flutter_lua_vmVersion()) 27 | 28 | case "spawnThread": 29 | _threadID += 1 30 | FlutterLuaThreadHandler.register(with: registrar) 31 | result(_threadID) 32 | 33 | case "evalString": 34 | let state = Flutter_lua_vmState()! 35 | let code = call.arguments as! String 36 | DispatchQueue.global().async { [weak self] in 37 | do { 38 | try state.execString(code) 39 | let response = popResult(state) 40 | DispatchQueue.main.async { [weak self] in 41 | result(response) 42 | } 43 | } 44 | catch { 45 | DispatchQueue.main.async { [weak self] in 46 | result(FlutterError(code: "Exception", message: "", details: "")) // TODO: improve error handling 47 | } 48 | } 49 | } 50 | 51 | case "evalAsset": 52 | result(FlutterMethodNotImplemented) // TODO: implement this 53 | 54 | case "evalFile": 55 | result(FlutterMethodNotImplemented) // TODO: implement this 56 | 57 | default: 58 | result(FlutterMethodNotImplemented) 59 | } 60 | } 61 | } 62 | 63 | private class FlutterLuaThreadHandler: NSObject, FlutterPlugin { 64 | public static func register(with registrar: FlutterPluginRegistrar) { 65 | let channel = FlutterMethodChannel(name: "flutter_lua/#\(_threadID)", binaryMessenger: registrar.messenger()) 66 | let instance = FlutterLuaThreadHandler(registrar: registrar, threadID: _threadID) 67 | registrar.addMethodCallDelegate(instance, channel: channel) 68 | } 69 | 70 | let registrar: FlutterPluginRegistrar 71 | let threadID: Int 72 | let state: Flutter_lua_vmState 73 | 74 | init(registrar: FlutterPluginRegistrar, threadID: Int) { 75 | self.registrar = registrar 76 | self.threadID = threadID 77 | self.state = Flutter_lua_vmState()! 78 | super.init() 79 | } 80 | 81 | public func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { 82 | switch (call.method) { 83 | case "evalString": 84 | let state = self.state 85 | let code = call.arguments as! String 86 | DispatchQueue.global().async { [weak self] in 87 | do { 88 | try state.execString(code) 89 | let response = popResult(state) 90 | DispatchQueue.main.async { [weak self] in 91 | result(response) 92 | } 93 | } 94 | catch { 95 | DispatchQueue.main.async { [weak self] in 96 | result(FlutterError(code: "Exception", message: "", details: "")) // TODO: improve error handling 97 | } 98 | } 99 | } 100 | 101 | case "evalAsset": 102 | result(FlutterMethodNotImplemented) // TODO: implement this 103 | 104 | case "evalFile": 105 | result(FlutterMethodNotImplemented) // TODO: implement this 106 | 107 | default: 108 | result(FlutterMethodNotImplemented) 109 | } 110 | } 111 | } 112 | 113 | private func popResult(_ state: Flutter_lua_vmState) -> NSObject { 114 | if (!state.hasResult()) { 115 | return NSNull() 116 | } 117 | switch (state.resultType()) { 118 | case 0: // lua.TypeNil 119 | return NSNull() 120 | case 1: // lua.TypeBoolean 121 | return NSNumber(value: state.boolValue()) 122 | case 2: // lua.TypeLightUserData 123 | return NSNull() // TODO 124 | case 3: // lua.TypeNumber 125 | return NSNumber(value: state.doubleValue()) // TODO: support integers 126 | case 4: // lua.TypeString 127 | return NSString(string: state.stringValue()) 128 | case 5: // lua.TypeTable 129 | return NSNull() // TODO: NSArray or NSDictionary 130 | case 6: // lua.TypeFunction 131 | return NSNull() // TODO 132 | case 7: // lua.TypeUserData 133 | return NSNull() // TODO 134 | case 8: // lua.TypeThread 135 | return NSNull() // TODO 136 | case 9, -1: // lua.TypeCount, lua.TypeNone 137 | return NSNull() // TODO 138 | default: 139 | //assert(false) // unreachable 140 | return NSNull() // unreachable 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /android/src/main/java/com/github/drydart/flutter_lua/FlutterLuaThreadHandler.java: -------------------------------------------------------------------------------- 1 | /* This is free and unencumbered software released into the public domain. */ 2 | 3 | package com.github.drydart.flutter_lua; 4 | 5 | import com.github.drydart.flutter_lua_vm.Flutter_lua_vm; 6 | import com.github.drydart.flutter_lua_vm.State; 7 | 8 | import io.flutter.plugin.common.MethodCall; 9 | import io.flutter.plugin.common.MethodChannel; 10 | import io.flutter.plugin.common.MethodChannel.Result; 11 | import io.flutter.plugin.common.PluginRegistry.Registrar; 12 | 13 | import java.io.IOException; 14 | import java.util.concurrent.CompletableFuture; 15 | import java.util.concurrent.Executors; 16 | import java.util.concurrent.ExecutorService; 17 | import java.util.function.BiConsumer; 18 | import java.util.function.Supplier; 19 | 20 | /** FlutterLuaThreadHandler */ 21 | @SuppressWarnings("unchecked") 22 | final class FlutterLuaThreadHandler extends FlutterMethodCallHandler { 23 | private static final String TAG = "FlutterLuaThreadHandler"; 24 | public static final String CHANNEL_PREFIX = FlutterLuaPlugin.CHANNEL; 25 | 26 | private final MethodChannel channel; 27 | private final ExecutorService executor; 28 | private final State state; 29 | 30 | FlutterLuaThreadHandler(final Registrar registrar, 31 | final long threadID) { 32 | super(registrar); 33 | final String channelName = String.format("%s/#%d", CHANNEL_PREFIX, threadID); 34 | this.channel = new MethodChannel(registrar.messenger(), channelName); 35 | this.executor = Executors.newSingleThreadScheduledExecutor(); 36 | this.state = Flutter_lua_vm.newState(); 37 | channel.setMethodCallHandler(this); 38 | } 39 | 40 | static private class ResultCompleter implements BiConsumer { 41 | final Result result; 42 | 43 | ResultCompleter(final Result result) { 44 | this.result = result; 45 | } 46 | 47 | @Override 48 | public void accept(final Object value, 49 | final Throwable error) { 50 | if (error != null) { 51 | //error.printStackTrace(); // DEBUG 52 | final Throwable cause = getRootCause(error); 53 | this.result.error("LuaError", cause.getMessage(), null); 54 | } 55 | else { 56 | this.result.success(value); 57 | } 58 | } 59 | 60 | private Throwable getRootCause(final Throwable throwable) { 61 | final Throwable cause = throwable.getCause(); 62 | return (cause != null) ? getRootCause(cause) : throwable; 63 | } 64 | } 65 | 66 | @Override 67 | public void onMethodCall(final MethodCall call, 68 | final Result result) { 69 | assert(call != null); 70 | assert(result != null); 71 | 72 | assert(call.method != null); 73 | switch (call.method) { 74 | 75 | case "evalString": { 76 | final State state = this.state; 77 | final String code = (String)call.arguments; 78 | CompletableFuture 79 | .supplyAsync(new Supplier() { 80 | @Override 81 | public Object get() { 82 | try { 83 | state.execString(code); 84 | return FlutterLuaPlugin.popResult(state); 85 | } 86 | catch (final Exception error) { 87 | throw new RuntimeException(error); 88 | } 89 | } 90 | }, this.executor) 91 | .whenComplete(new ResultCompleter(result)); 92 | break; 93 | } 94 | 95 | case "evalAsset": { 96 | final State state = this.state; 97 | final String assetName = (String)call.arguments; 98 | final String code; 99 | try { 100 | code = readAssetText(assetName); 101 | } 102 | catch (final IOException error) { 103 | result.error("IOException", error.getMessage(), error.toString()); 104 | return; 105 | } 106 | CompletableFuture 107 | .supplyAsync(new Supplier() { 108 | @Override 109 | public Object get() { 110 | try { 111 | state.execString(code); 112 | return FlutterLuaPlugin.popResult(state); 113 | } 114 | catch (final Exception error) { 115 | throw new RuntimeException(error); 116 | } 117 | } 118 | }, this.executor) 119 | .whenComplete(new ResultCompleter(result)); 120 | break; 121 | } 122 | 123 | case "evalFile": { 124 | final State state = this.state; 125 | final String path = (String)call.arguments; 126 | CompletableFuture 127 | .supplyAsync(new Supplier() { 128 | @Override 129 | public Object get() { 130 | try { 131 | state.execFile(path); 132 | return FlutterLuaPlugin.popResult(state); 133 | } 134 | catch (final Exception error) { 135 | throw new RuntimeException(error); 136 | } 137 | } 138 | }, this.executor) 139 | .whenComplete(new ResultCompleter(result)); 140 | break; 141 | } 142 | 143 | default: { 144 | result.notImplemented(); 145 | } 146 | } 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3746CD7AAC14A59F3976698F /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA694DE621D07F2E5E4F7E20 /* Pods_Runner.framework */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXCopyFilesBuildPhase section */ 25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 26 | isa = PBXCopyFilesBuildPhase; 27 | buildActionMask = 2147483647; 28 | dstPath = ""; 29 | dstSubfolderSpec = 10; 30 | files = ( 31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 33 | ); 34 | name = "Embed Frameworks"; 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXCopyFilesBuildPhase section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 42 | 2AC69F3A09B181286C15A174 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 43 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 44 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 45 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 46 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 47 | 769A0DA39F1EFA6A5DD9ECAA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 48 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 51 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 52 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 54 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 55 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 56 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | CA694DE621D07F2E5E4F7E20 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | D2E000A12A7A4BE756E9E736 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | 3746CD7AAC14A59F3976698F /* Pods_Runner.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | /* End PBXFrameworksBuildPhase section */ 73 | 74 | /* Begin PBXGroup section */ 75 | 4AD9024718CE1CB914B2425C /* Frameworks */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | CA694DE621D07F2E5E4F7E20 /* Pods_Runner.framework */, 79 | ); 80 | name = Frameworks; 81 | sourceTree = ""; 82 | }; 83 | 540E5E8D9F3DC79862F60A00 /* Pods */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | D2E000A12A7A4BE756E9E736 /* Pods-Runner.debug.xcconfig */, 87 | 2AC69F3A09B181286C15A174 /* Pods-Runner.release.xcconfig */, 88 | 769A0DA39F1EFA6A5DD9ECAA /* Pods-Runner.profile.xcconfig */, 89 | ); 90 | name = Pods; 91 | path = Pods; 92 | sourceTree = ""; 93 | }; 94 | 9740EEB11CF90186004384FC /* Flutter */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 3B80C3931E831B6300D905FE /* App.framework */, 98 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 99 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 100 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 101 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 102 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 103 | ); 104 | name = Flutter; 105 | sourceTree = ""; 106 | }; 107 | 97C146E51CF9000F007C117D = { 108 | isa = PBXGroup; 109 | children = ( 110 | 9740EEB11CF90186004384FC /* Flutter */, 111 | 97C146F01CF9000F007C117D /* Runner */, 112 | 97C146EF1CF9000F007C117D /* Products */, 113 | 540E5E8D9F3DC79862F60A00 /* Pods */, 114 | 4AD9024718CE1CB914B2425C /* Frameworks */, 115 | ); 116 | sourceTree = ""; 117 | }; 118 | 97C146EF1CF9000F007C117D /* Products */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 97C146EE1CF9000F007C117D /* Runner.app */, 122 | ); 123 | name = Products; 124 | sourceTree = ""; 125 | }; 126 | 97C146F01CF9000F007C117D /* Runner */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 130 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 131 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 132 | 97C147021CF9000F007C117D /* Info.plist */, 133 | 97C146F11CF9000F007C117D /* Supporting Files */, 134 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 135 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 136 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 137 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 138 | ); 139 | path = Runner; 140 | sourceTree = ""; 141 | }; 142 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | ); 146 | name = "Supporting Files"; 147 | sourceTree = ""; 148 | }; 149 | /* End PBXGroup section */ 150 | 151 | /* Begin PBXNativeTarget section */ 152 | 97C146ED1CF9000F007C117D /* Runner */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 155 | buildPhases = ( 156 | 6ABFD783C82CD2A667C33E19 /* [CP] Check Pods Manifest.lock */, 157 | 9740EEB61CF901F6004384FC /* Run Script */, 158 | 97C146EA1CF9000F007C117D /* Sources */, 159 | 97C146EB1CF9000F007C117D /* Frameworks */, 160 | 97C146EC1CF9000F007C117D /* Resources */, 161 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 162 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 163 | AC05B129E44CEA8E0C3392F0 /* [CP] Embed Pods Frameworks */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | ); 169 | name = Runner; 170 | productName = Runner; 171 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 172 | productType = "com.apple.product-type.application"; 173 | }; 174 | /* End PBXNativeTarget section */ 175 | 176 | /* Begin PBXProject section */ 177 | 97C146E61CF9000F007C117D /* Project object */ = { 178 | isa = PBXProject; 179 | attributes = { 180 | LastUpgradeCheck = 0910; 181 | ORGANIZATIONNAME = "The Chromium Authors"; 182 | TargetAttributes = { 183 | 97C146ED1CF9000F007C117D = { 184 | CreatedOnToolsVersion = 7.3.1; 185 | LastSwiftMigration = 0910; 186 | }; 187 | }; 188 | }; 189 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 190 | compatibilityVersion = "Xcode 3.2"; 191 | developmentRegion = English; 192 | hasScannedForEncodings = 0; 193 | knownRegions = ( 194 | en, 195 | Base, 196 | ); 197 | mainGroup = 97C146E51CF9000F007C117D; 198 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 199 | projectDirPath = ""; 200 | projectRoot = ""; 201 | targets = ( 202 | 97C146ED1CF9000F007C117D /* Runner */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | 97C146EC1CF9000F007C117D /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 213 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 214 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 215 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 216 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXResourcesBuildPhase section */ 221 | 222 | /* Begin PBXShellScriptBuildPhase section */ 223 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 224 | isa = PBXShellScriptBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | ); 228 | inputPaths = ( 229 | ); 230 | name = "Thin Binary"; 231 | outputPaths = ( 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | shellPath = /bin/sh; 235 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 236 | }; 237 | 6ABFD783C82CD2A667C33E19 /* [CP] Check Pods Manifest.lock */ = { 238 | isa = PBXShellScriptBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | ); 242 | inputFileListPaths = ( 243 | ); 244 | inputPaths = ( 245 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 246 | "${PODS_ROOT}/Manifest.lock", 247 | ); 248 | name = "[CP] Check Pods Manifest.lock"; 249 | outputFileListPaths = ( 250 | ); 251 | outputPaths = ( 252 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 253 | ); 254 | runOnlyForDeploymentPostprocessing = 0; 255 | shellPath = /bin/sh; 256 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 257 | showEnvVarsInLog = 0; 258 | }; 259 | 9740EEB61CF901F6004384FC /* Run Script */ = { 260 | isa = PBXShellScriptBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | ); 264 | inputPaths = ( 265 | ); 266 | name = "Run Script"; 267 | outputPaths = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | shellPath = /bin/sh; 271 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 272 | }; 273 | AC05B129E44CEA8E0C3392F0 /* [CP] Embed Pods Frameworks */ = { 274 | isa = PBXShellScriptBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | inputFileListPaths = ( 279 | ); 280 | inputPaths = ( 281 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 282 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 283 | "${BUILT_PRODUCTS_DIR}/flutter_lua/flutter_lua.framework", 284 | ); 285 | name = "[CP] Embed Pods Frameworks"; 286 | outputFileListPaths = ( 287 | ); 288 | outputPaths = ( 289 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 290 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_lua.framework", 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | shellPath = /bin/sh; 294 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 295 | showEnvVarsInLog = 0; 296 | }; 297 | /* End PBXShellScriptBuildPhase section */ 298 | 299 | /* Begin PBXSourcesBuildPhase section */ 300 | 97C146EA1CF9000F007C117D /* Sources */ = { 301 | isa = PBXSourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 305 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 306 | ); 307 | runOnlyForDeploymentPostprocessing = 0; 308 | }; 309 | /* End PBXSourcesBuildPhase section */ 310 | 311 | /* Begin PBXVariantGroup section */ 312 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 313 | isa = PBXVariantGroup; 314 | children = ( 315 | 97C146FB1CF9000F007C117D /* Base */, 316 | ); 317 | name = Main.storyboard; 318 | sourceTree = ""; 319 | }; 320 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 321 | isa = PBXVariantGroup; 322 | children = ( 323 | 97C147001CF9000F007C117D /* Base */, 324 | ); 325 | name = LaunchScreen.storyboard; 326 | sourceTree = ""; 327 | }; 328 | /* End PBXVariantGroup section */ 329 | 330 | /* Begin XCBuildConfiguration section */ 331 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 332 | isa = XCBuildConfiguration; 333 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_ANALYZER_NONNULL = YES; 337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 338 | CLANG_CXX_LIBRARY = "libc++"; 339 | CLANG_ENABLE_MODULES = YES; 340 | CLANG_ENABLE_OBJC_ARC = YES; 341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 342 | CLANG_WARN_BOOL_CONVERSION = YES; 343 | CLANG_WARN_COMMA = YES; 344 | CLANG_WARN_CONSTANT_CONVERSION = YES; 345 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 346 | CLANG_WARN_EMPTY_BODY = YES; 347 | CLANG_WARN_ENUM_CONVERSION = YES; 348 | CLANG_WARN_INFINITE_RECURSION = YES; 349 | CLANG_WARN_INT_CONVERSION = YES; 350 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 351 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 353 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 354 | CLANG_WARN_STRICT_PROTOTYPES = YES; 355 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 356 | CLANG_WARN_UNREACHABLE_CODE = YES; 357 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 358 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 359 | COPY_PHASE_STRIP = NO; 360 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 361 | ENABLE_NS_ASSERTIONS = NO; 362 | ENABLE_STRICT_OBJC_MSGSEND = YES; 363 | GCC_C_LANGUAGE_STANDARD = gnu99; 364 | GCC_NO_COMMON_BLOCKS = YES; 365 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 366 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 367 | GCC_WARN_UNDECLARED_SELECTOR = YES; 368 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 369 | GCC_WARN_UNUSED_FUNCTION = YES; 370 | GCC_WARN_UNUSED_VARIABLE = YES; 371 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 372 | MTL_ENABLE_DEBUG_INFO = NO; 373 | SDKROOT = iphoneos; 374 | TARGETED_DEVICE_FAMILY = "1,2"; 375 | VALIDATE_PRODUCT = YES; 376 | }; 377 | name = Profile; 378 | }; 379 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 380 | isa = XCBuildConfiguration; 381 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 382 | buildSettings = { 383 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 384 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 385 | DEVELOPMENT_TEAM = S8QB4VV633; 386 | ENABLE_BITCODE = NO; 387 | FRAMEWORK_SEARCH_PATHS = ( 388 | "$(inherited)", 389 | "$(PROJECT_DIR)/Flutter", 390 | ); 391 | INFOPLIST_FILE = Runner/Info.plist; 392 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 393 | LIBRARY_SEARCH_PATHS = ( 394 | "$(inherited)", 395 | "$(PROJECT_DIR)/Flutter", 396 | ); 397 | PRODUCT_BUNDLE_IDENTIFIER = com.github.drydart.flutterLuaExample; 398 | PRODUCT_NAME = "$(TARGET_NAME)"; 399 | SWIFT_VERSION = 4.0; 400 | VERSIONING_SYSTEM = "apple-generic"; 401 | }; 402 | name = Profile; 403 | }; 404 | 97C147031CF9000F007C117D /* Debug */ = { 405 | isa = XCBuildConfiguration; 406 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 407 | buildSettings = { 408 | ALWAYS_SEARCH_USER_PATHS = NO; 409 | CLANG_ANALYZER_NONNULL = YES; 410 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 411 | CLANG_CXX_LIBRARY = "libc++"; 412 | CLANG_ENABLE_MODULES = YES; 413 | CLANG_ENABLE_OBJC_ARC = YES; 414 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 415 | CLANG_WARN_BOOL_CONVERSION = YES; 416 | CLANG_WARN_COMMA = YES; 417 | CLANG_WARN_CONSTANT_CONVERSION = YES; 418 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 419 | CLANG_WARN_EMPTY_BODY = YES; 420 | CLANG_WARN_ENUM_CONVERSION = YES; 421 | CLANG_WARN_INFINITE_RECURSION = YES; 422 | CLANG_WARN_INT_CONVERSION = YES; 423 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 424 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 425 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 426 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 427 | CLANG_WARN_STRICT_PROTOTYPES = YES; 428 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 429 | CLANG_WARN_UNREACHABLE_CODE = YES; 430 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 431 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 432 | COPY_PHASE_STRIP = NO; 433 | DEBUG_INFORMATION_FORMAT = dwarf; 434 | ENABLE_STRICT_OBJC_MSGSEND = YES; 435 | ENABLE_TESTABILITY = YES; 436 | GCC_C_LANGUAGE_STANDARD = gnu99; 437 | GCC_DYNAMIC_NO_PIC = NO; 438 | GCC_NO_COMMON_BLOCKS = YES; 439 | GCC_OPTIMIZATION_LEVEL = 0; 440 | GCC_PREPROCESSOR_DEFINITIONS = ( 441 | "DEBUG=1", 442 | "$(inherited)", 443 | ); 444 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 445 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 446 | GCC_WARN_UNDECLARED_SELECTOR = YES; 447 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 448 | GCC_WARN_UNUSED_FUNCTION = YES; 449 | GCC_WARN_UNUSED_VARIABLE = YES; 450 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 451 | MTL_ENABLE_DEBUG_INFO = YES; 452 | ONLY_ACTIVE_ARCH = YES; 453 | SDKROOT = iphoneos; 454 | TARGETED_DEVICE_FAMILY = "1,2"; 455 | }; 456 | name = Debug; 457 | }; 458 | 97C147041CF9000F007C117D /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 461 | buildSettings = { 462 | ALWAYS_SEARCH_USER_PATHS = NO; 463 | CLANG_ANALYZER_NONNULL = YES; 464 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 465 | CLANG_CXX_LIBRARY = "libc++"; 466 | CLANG_ENABLE_MODULES = YES; 467 | CLANG_ENABLE_OBJC_ARC = YES; 468 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 469 | CLANG_WARN_BOOL_CONVERSION = YES; 470 | CLANG_WARN_COMMA = YES; 471 | CLANG_WARN_CONSTANT_CONVERSION = YES; 472 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 473 | CLANG_WARN_EMPTY_BODY = YES; 474 | CLANG_WARN_ENUM_CONVERSION = YES; 475 | CLANG_WARN_INFINITE_RECURSION = YES; 476 | CLANG_WARN_INT_CONVERSION = YES; 477 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 478 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 479 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 480 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 481 | CLANG_WARN_STRICT_PROTOTYPES = YES; 482 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 483 | CLANG_WARN_UNREACHABLE_CODE = YES; 484 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 485 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 486 | COPY_PHASE_STRIP = NO; 487 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 488 | ENABLE_NS_ASSERTIONS = NO; 489 | ENABLE_STRICT_OBJC_MSGSEND = YES; 490 | GCC_C_LANGUAGE_STANDARD = gnu99; 491 | GCC_NO_COMMON_BLOCKS = YES; 492 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 493 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 494 | GCC_WARN_UNDECLARED_SELECTOR = YES; 495 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 496 | GCC_WARN_UNUSED_FUNCTION = YES; 497 | GCC_WARN_UNUSED_VARIABLE = YES; 498 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 499 | MTL_ENABLE_DEBUG_INFO = NO; 500 | SDKROOT = iphoneos; 501 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 502 | TARGETED_DEVICE_FAMILY = "1,2"; 503 | VALIDATE_PRODUCT = YES; 504 | }; 505 | name = Release; 506 | }; 507 | 97C147061CF9000F007C117D /* Debug */ = { 508 | isa = XCBuildConfiguration; 509 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 510 | buildSettings = { 511 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 512 | CLANG_ENABLE_MODULES = YES; 513 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 514 | ENABLE_BITCODE = NO; 515 | FRAMEWORK_SEARCH_PATHS = ( 516 | "$(inherited)", 517 | "$(PROJECT_DIR)/Flutter", 518 | ); 519 | INFOPLIST_FILE = Runner/Info.plist; 520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 521 | LIBRARY_SEARCH_PATHS = ( 522 | "$(inherited)", 523 | "$(PROJECT_DIR)/Flutter", 524 | ); 525 | PRODUCT_BUNDLE_IDENTIFIER = com.github.drydart.flutterLuaExample; 526 | PRODUCT_NAME = "$(TARGET_NAME)"; 527 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 528 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 529 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 530 | SWIFT_VERSION = 4.0; 531 | VERSIONING_SYSTEM = "apple-generic"; 532 | }; 533 | name = Debug; 534 | }; 535 | 97C147071CF9000F007C117D /* Release */ = { 536 | isa = XCBuildConfiguration; 537 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 538 | buildSettings = { 539 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 540 | CLANG_ENABLE_MODULES = YES; 541 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 542 | ENABLE_BITCODE = NO; 543 | FRAMEWORK_SEARCH_PATHS = ( 544 | "$(inherited)", 545 | "$(PROJECT_DIR)/Flutter", 546 | ); 547 | INFOPLIST_FILE = Runner/Info.plist; 548 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 549 | LIBRARY_SEARCH_PATHS = ( 550 | "$(inherited)", 551 | "$(PROJECT_DIR)/Flutter", 552 | ); 553 | PRODUCT_BUNDLE_IDENTIFIER = com.github.drydart.flutterLuaExample; 554 | PRODUCT_NAME = "$(TARGET_NAME)"; 555 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 556 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 557 | SWIFT_VERSION = 4.0; 558 | VERSIONING_SYSTEM = "apple-generic"; 559 | }; 560 | name = Release; 561 | }; 562 | /* End XCBuildConfiguration section */ 563 | 564 | /* Begin XCConfigurationList section */ 565 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 97C147031CF9000F007C117D /* Debug */, 569 | 97C147041CF9000F007C117D /* Release */, 570 | 249021D3217E4FDB00AE95B9 /* Profile */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 576 | isa = XCConfigurationList; 577 | buildConfigurations = ( 578 | 97C147061CF9000F007C117D /* Debug */, 579 | 97C147071CF9000F007C117D /* Release */, 580 | 249021D4217E4FDB00AE95B9 /* Profile */, 581 | ); 582 | defaultConfigurationIsVisible = 0; 583 | defaultConfigurationName = Release; 584 | }; 585 | /* End XCConfigurationList section */ 586 | }; 587 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 588 | } 589 | --------------------------------------------------------------------------------