Skip to content

Commit 4e23a52

Browse files
authored
Swift conversion v2 (#50)
* Swift conversion * Updated example app with Play/Pause
1 parent ef0021f commit 4e23a52

File tree

25 files changed

+568
-580
lines changed

25 files changed

+568
-580
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ A VLC-powered alternative to Flutter's video_player that supports iOS and Androi
55

66
## Installation
77

8+
### Version 3.0 Upgrade For Existing Apps
9+
For migration to version 3, the project is based in swift. Your existing project will need to migratate
10+
11+
Delete existing ios folder from root of flutter project.
12+
Run this command flutter create -i swift .
13+
14+
This command will create only ios directory with swift support. See https://stackoverflow.com/questions/52244346/how-to-enable-swift-support-for-existing-project-in-flutter
15+
16+
Change your project to use 9.0
17+
# Uncomment this line to define a global platform for your project
18+
platform :ios, '9.0'
19+
20+
821
### iOS
922
For iOS, you need to opt into the Flutter embedded views preview.
1023
This is done by adding the following to your project's `<project root>/ios/Runner/Info.plist` file (see example for details):

example/ios/.gitignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
*.mode1v3
2+
*.mode2v3
3+
*.moved-aside
4+
*.pbxuser
5+
*.perspectivev3
6+
**/*sync/
7+
.sconsign.dblite
8+
.tags*
9+
**/.vagrant/
10+
**/DerivedData/
11+
Icon?
12+
**/Pods/
13+
**/.symlinks/
14+
profile
15+
xcuserdata
16+
**/.generated/
17+
Flutter/App.framework
18+
Flutter/Flutter.framework
19+
Flutter/Flutter.podspec
20+
Flutter/Generated.xcconfig
21+
Flutter/app.flx
22+
Flutter/app.zip
23+
Flutter/flutter_assets/
24+
Flutter/flutter_export_environment.sh
25+
ServiceDefinitions.json
26+
Runner/GeneratedPluginRegistrant.*
27+
28+
# Exceptions to above rules.
29+
!default.mode1v3
30+
!default.mode2v3
31+
!default.pbxuser
32+
!default.perspectivev3

example/ios/Flutter/.last_build_id

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9a6723ad18e3f950fccdc81adda11616

example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleDevelopmentRegion</key>
6-
<string>en</string>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
77
<key>CFBundleExecutable</key>
88
<string>App</string>
99
<key>CFBundleIdentifier</key>

example/ios/Podfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ def parse_KV_file(file, separator='=')
3333
end
3434

3535
target 'Runner' do
36+
use_frameworks!
37+
use_modular_headers!
38+
3639
# Flutter Pod
3740

3841
copied_flutter_dir = File.join(__dir__, 'Flutter')
@@ -75,9 +78,6 @@ target 'Runner' do
7578
end
7679
end
7780

78-
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system.
79-
install! 'cocoapods', :disable_input_output_paths => true
80-
8181
post_install do |installer|
8282
installer.pods_project.targets.each do |target|
8383
target.build_configurations.each do |config|

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 80 additions & 211 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>PreviewsEnabled</key>
6+
<false/>
7+
</dict>
8+
</plist>

example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1130"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -27,6 +27,8 @@
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
3032
<MacroExpansion>
3133
<BuildableReference
3234
BuildableIdentifier = "primary"
@@ -36,8 +38,8 @@
3638
ReferencedContainer = "container:Runner.xcodeproj">
3739
</BuildableReference>
3840
</MacroExpansion>
39-
<Testables>
40-
</Testables>
41+
<AdditionalOptions>
42+
</AdditionalOptions>
4143
</TestAction>
4244
<LaunchAction
4345
buildConfiguration = "Debug"
@@ -59,6 +61,8 @@
5961
ReferencedContainer = "container:Runner.xcodeproj">
6062
</BuildableReference>
6163
</BuildableProductRunnable>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
6266
</LaunchAction>
6367
<ProfileAction
6468
buildConfiguration = "Profile"

example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>BuildSystemType</key>
6-
<string>Latest</string>
75
<key>PreviewsEnabled</key>
86
<false/>
97
</dict>

example/ios/Runner/AppDelegate.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)