mirror of https://github.com/flutter/samples.git
Maintenance updates for platform_view_swift (#151)
parent
497c25b154
commit
f4a8247634
@ -0,0 +1,10 @@
|
|||||||
|
# This file tracks properties of this Flutter project.
|
||||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||||
|
#
|
||||||
|
# This file should be version controlled and should not be manually edited.
|
||||||
|
|
||||||
|
version:
|
||||||
|
revision: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f
|
||||||
|
channel: stable
|
||||||
|
|
||||||
|
project_type: app
|
Before Width: | Height: | Size: 482 B |
@ -1,44 +0,0 @@
|
|||||||
.idea/
|
|
||||||
.vagrant/
|
|
||||||
.sconsign.dblite
|
|
||||||
.svn/
|
|
||||||
|
|
||||||
.DS_Store
|
|
||||||
*.swp
|
|
||||||
profile
|
|
||||||
|
|
||||||
DerivedData/
|
|
||||||
build/
|
|
||||||
GeneratedPluginRegistrant.h
|
|
||||||
GeneratedPluginRegistrant.m
|
|
||||||
|
|
||||||
.generated/
|
|
||||||
|
|
||||||
*.pbxuser
|
|
||||||
*.mode1v3
|
|
||||||
*.mode2v3
|
|
||||||
*.perspectivev3
|
|
||||||
|
|
||||||
!default.pbxuser
|
|
||||||
!default.mode1v3
|
|
||||||
!default.mode2v3
|
|
||||||
!default.perspectivev3
|
|
||||||
|
|
||||||
xcuserdata
|
|
||||||
|
|
||||||
*.moved-aside
|
|
||||||
|
|
||||||
*.pyc
|
|
||||||
*sync/
|
|
||||||
Icon?
|
|
||||||
.tags*
|
|
||||||
|
|
||||||
/Flutter/app.flx
|
|
||||||
/Flutter/app.zip
|
|
||||||
/Flutter/flutter_assets/
|
|
||||||
/Flutter/App.framework
|
|
||||||
/Flutter/Flutter.framework
|
|
||||||
/Flutter/Generated.xcconfig
|
|
||||||
/ServiceDefinitions.json
|
|
||||||
|
|
||||||
Pods/
|
|
@ -1,2 +1 @@
|
|||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
|
@ -1,2 +1 @@
|
|||||||
#include "Generated.xcconfig"
|
#include "Generated.xcconfig"
|
||||||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
|
@ -1,65 +0,0 @@
|
|||||||
# Uncomment this line to define a global platform for your project
|
|
||||||
# platform :ios, '9.0'
|
|
||||||
|
|
||||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
|
||||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
|
||||||
|
|
||||||
def parse_KV_file(file, separator='=')
|
|
||||||
file_abs_path = File.expand_path(file)
|
|
||||||
if !File.exists? file_abs_path
|
|
||||||
return [];
|
|
||||||
end
|
|
||||||
pods_ary = []
|
|
||||||
skip_line_start_symbols = ["#", "/"]
|
|
||||||
File.foreach(file_abs_path) { |line|
|
|
||||||
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
|
|
||||||
plugin = line.split(pattern=separator)
|
|
||||||
if plugin.length == 2
|
|
||||||
podname = plugin[0].strip()
|
|
||||||
path = plugin[1].strip()
|
|
||||||
podpath = File.expand_path("#{path}", file_abs_path)
|
|
||||||
pods_ary.push({:name => podname, :path => podpath});
|
|
||||||
else
|
|
||||||
puts "Invalid plugin specification: #{line}"
|
|
||||||
end
|
|
||||||
}
|
|
||||||
return pods_ary
|
|
||||||
end
|
|
||||||
|
|
||||||
target 'Runner' do
|
|
||||||
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
|
|
||||||
# referring to absolute paths on developers' machines.
|
|
||||||
system('rm -rf .symlinks')
|
|
||||||
system('mkdir -p .symlinks/plugins')
|
|
||||||
|
|
||||||
# Flutter Pods
|
|
||||||
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
|
|
||||||
if generated_xcode_build_settings.empty?
|
|
||||||
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first."
|
|
||||||
end
|
|
||||||
generated_xcode_build_settings.map { |p|
|
|
||||||
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
|
|
||||||
symlink = File.join('.symlinks', 'flutter')
|
|
||||||
File.symlink(File.dirname(p[:path]), symlink)
|
|
||||||
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
# Plugin Pods
|
|
||||||
plugin_pods = parse_KV_file('../.flutter-plugins')
|
|
||||||
plugin_pods.map { |p|
|
|
||||||
symlink = File.join('.symlinks', 'plugins', p[:name])
|
|
||||||
File.symlink(p[:path], symlink)
|
|
||||||
pod p[:name], :path => File.join(symlink, 'ios')
|
|
||||||
}
|
|
||||||
|
|
||||||
pod 'MaterialControls'
|
|
||||||
end
|
|
||||||
|
|
||||||
post_install do |installer|
|
|
||||||
installer.pods_project.targets.each do |target|
|
|
||||||
target.build_configurations.each do |config|
|
|
||||||
config.build_settings['ENABLE_BITCODE'] = 'NO'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>IDEDidComputeMac32BitWarning</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
After Width: | Height: | Size: 11 KiB |
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage.png",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"filename" : "LaunchImage@3x.png",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"version" : 1,
|
||||||
|
"author" : "xcode"
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
After Width: | Height: | Size: 68 B |
@ -0,0 +1,5 @@
|
|||||||
|
# Launch Screen Assets
|
||||||
|
|
||||||
|
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||||
|
|
||||||
|
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.
|
@ -0,0 +1,66 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||||
|
<device id="retina6_1" orientation="portrait">
|
||||||
|
<adaptation id="fullscreen"/>
|
||||||
|
</device>
|
||||||
|
<dependencies>
|
||||||
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||||
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
</dependencies>
|
||||||
|
<objects>
|
||||||
|
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PlatformViewController" customModule="Runner" customModuleProvider="target">
|
||||||
|
<connections>
|
||||||
|
<outlet property="incrementLabel" destination="Fwz-pb-Vxw" id="LtN-bK-cIm"/>
|
||||||
|
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||||
|
</connections>
|
||||||
|
</placeholder>
|
||||||
|
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||||
|
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||||
|
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Button tapped 0 times." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fwz-pb-Vxw">
|
||||||
|
<rect key="frame" x="114.5" y="379.5" width="185" height="21.5"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="18"/>
|
||||||
|
<nil key="textColor"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0Q4-1m-vDk">
|
||||||
|
<rect key="frame" x="144" y="433" width="126" height="30"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||||
|
<state key="normal" title="Increment counter"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="handleIncrement:" destination="-1" eventType="touchUpInside" id="6jY-7M-lj4"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Vb-F2-qFl">
|
||||||
|
<rect key="frame" x="125" y="495" width="164" height="30"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||||
|
<state key="normal" title="Continue in Flutter View"/>
|
||||||
|
<connections>
|
||||||
|
<action selector="switchToFlutterView:" destination="-1" eventType="touchUpInside" id="tzA-cQ-gl6"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="iOS" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QgT-DT-gSd">
|
||||||
|
<rect key="frame" x="16" y="828" width="47" height="36"/>
|
||||||
|
<fontDescription key="fontDescription" type="system" pointSize="30"/>
|
||||||
|
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
<nil key="highlightedColor"/>
|
||||||
|
</label>
|
||||||
|
</subviews>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="1Vb-F2-qFl" firstAttribute="top" secondItem="0Q4-1m-vDk" secondAttribute="bottom" constant="32" id="2Fr-G0-fL1"/>
|
||||||
|
<constraint firstItem="0Q4-1m-vDk" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="6R3-W6-Dle"/>
|
||||||
|
<constraint firstItem="1Vb-F2-qFl" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="8sv-fF-vKQ"/>
|
||||||
|
<constraint firstItem="QgT-DT-gSd" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="8yF-bR-Te3"/>
|
||||||
|
<constraint firstItem="0Q4-1m-vDk" firstAttribute="top" secondItem="Fwz-pb-Vxw" secondAttribute="bottom" constant="32" id="QNR-n2-WAr"/>
|
||||||
|
<constraint firstItem="0Q4-1m-vDk" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" id="YWH-R0-Md3"/>
|
||||||
|
<constraint firstItem="QgT-DT-gSd" firstAttribute="bottom" secondItem="i5M-Pr-FkT" secondAttribute="bottom" constant="-32" id="bIY-Nb-J3I"/>
|
||||||
|
<constraint firstItem="Fwz-pb-Vxw" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="jcd-no-9jg"/>
|
||||||
|
</constraints>
|
||||||
|
<point key="canvasLocation" x="144.92753623188406" y="64.955357142857139"/>
|
||||||
|
</view>
|
||||||
|
</objects>
|
||||||
|
</document>
|
Before Width: | Height: | Size: 86 B |
@ -0,0 +1,9 @@
|
|||||||
|
// Copyright 2018, the Flutter project authors. Please see the AUTHORS file
|
||||||
|
// for details. All rights reserved. Use of this source code is governed by a
|
||||||
|
// BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
testWidgets('This test always passes', (tester) async {});
|
||||||
|
}
|
@ -1,11 +0,0 @@
|
|||||||
// This is a basic Flutter widget test.
|
|
||||||
// To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
|
|
||||||
// provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
|
|
||||||
// find child widgets in the widget tree, read text, and verify that the values of widget properties
|
|
||||||
// are correct.
|
|
||||||
|
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
|
||||||
|
|
||||||
void main() {
|
|
||||||
testWidgets('This test always passes', (tester) async {});
|
|
||||||
}
|
|
Loading…
Reference in new issue