Skip to content

Commit d4cadd0

Browse files
authored
Fix telephone links (#10) (#11)
* Fixed tel: links for Android * Update project for a new beta release
1 parent 20ab0af commit d4cadd0

File tree

12 files changed

+124
-59
lines changed

12 files changed

+124
-59
lines changed

frontend_app/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
**/doc/api/
2424
.dart_tool/
2525
.flutter-plugins
26+
.flutter-plugins-dependencies
2627
.packages
2728
.pub-cache/
2829
.pub/
2930
build/
3031

3132
# Android related
33+
**/android/.gitignore
3234
**/android/**/gradle-wrapper.jar
3335
**/android/.gradle
3436
**/android/captures/
@@ -38,6 +40,7 @@ build/
3840
**/android/**/GeneratedPluginRegistrant.java
3941

4042
# iOS/XCode related
43+
**/ios/.gitignore
4144
**/ios/**/*.mode1v3
4245
**/ios/**/*.mode2v3
4346
**/ios/**/*.moved-aside
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="eu.netmobiel.frontendapp">
3+
<!-- Flutter needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package eu.netmobiel.frontendapp;
2+
3+
import io.flutter.embedding.android.FlutterActivity;
4+
5+
public class MainActivity extends FlutterActivity {
6+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="eu.netmobiel.frontendapp">
3+
<!-- Flutter needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>

frontend_app/ios/Podfile

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,75 @@
44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
66

7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
713
def parse_KV_file(file, separator='=')
814
file_abs_path = File.expand_path(file)
915
if !File.exists? file_abs_path
1016
return [];
1117
end
12-
pods_ary = []
18+
generated_key_values = {}
1319
skip_line_start_symbols = ["#", "/"]
14-
File.foreach(file_abs_path) { |line|
15-
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
16-
plugin = line.split(pattern=separator)
17-
if plugin.length == 2
18-
podname = plugin[0].strip()
19-
path = plugin[1].strip()
20-
podpath = File.expand_path("#{path}", file_abs_path)
21-
pods_ary.push({:name => podname, :path => podpath});
22-
else
23-
puts "Invalid plugin specification: #{line}"
24-
end
25-
}
26-
return pods_ary
20+
File.foreach(file_abs_path) do |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+
generated_key_values[podname] = podpath
28+
else
29+
puts "Invalid plugin specification: #{line}"
30+
end
31+
end
32+
generated_key_values
2733
end
2834

2935
target 'Runner' do
30-
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
31-
# referring to absolute paths on developers' machines.
32-
system('rm -rf .symlinks')
33-
system('mkdir -p .symlinks/plugins')
36+
# Flutter Pod
3437

35-
# Flutter Pods
36-
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
37-
if generated_xcode_build_settings.empty?
38-
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
39-
end
40-
generated_xcode_build_settings.map { |p|
41-
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
42-
symlink = File.join('.symlinks', 'flutter')
43-
File.symlink(File.dirname(p[:path]), symlink)
44-
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
38+
copied_flutter_dir = File.join(__dir__, 'Flutter')
39+
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
40+
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
41+
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
42+
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
43+
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
44+
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
45+
46+
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
47+
unless File.exist?(generated_xcode_build_settings_path)
48+
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
49+
end
50+
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
51+
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
52+
53+
unless File.exist?(copied_framework_path)
54+
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
55+
end
56+
unless File.exist?(copied_podspec_path)
57+
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
4558
end
46-
}
59+
end
60+
61+
# Keep pod path relative so it can be checked into Podfile.lock.
62+
pod 'Flutter', :path => 'Flutter'
4763

4864
# Plugin Pods
65+
66+
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
67+
# referring to absolute paths on developers' machines.
68+
system('rm -rf .symlinks')
69+
system('mkdir -p .symlinks/plugins')
4970
plugin_pods = parse_KV_file('../.flutter-plugins')
50-
plugin_pods.map { |p|
51-
symlink = File.join('.symlinks', 'plugins', p[:name])
52-
File.symlink(p[:path], symlink)
53-
pod p[:name], :path => File.join(symlink, 'ios')
54-
}
71+
plugin_pods.each do |name, path|
72+
symlink = File.join('.symlinks', 'plugins', name)
73+
File.symlink(path, symlink)
74+
pod name, :path => File.join(symlink, 'ios')
75+
end
5576
end
5677

5778
post_install do |installer|

frontend_app/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
30A8C2FAC1505D50291A48B0 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B46F70FCE36C9956EFBA34A1 /* libPods-Runner.a */; };
1212
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-
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16-
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1713
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
1814
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
1915
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
@@ -30,8 +26,6 @@
3026
dstPath = "";
3127
dstSubfolderSpec = 10;
3228
files = (
33-
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
34-
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
3529
);
3630
name = "Embed Frameworks";
3731
runOnlyForDeploymentPostprocessing = 0;
@@ -42,13 +36,11 @@
4236
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
4337
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
4438
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
45-
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
4639
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4740
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4841
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
4942
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
5043
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
51-
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
5244
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
5345
97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
5446
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
@@ -67,8 +59,6 @@
6759
isa = PBXFrameworksBuildPhase;
6860
buildActionMask = 2147483647;
6961
files = (
70-
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
71-
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
7262
30A8C2FAC1505D50291A48B0 /* libPods-Runner.a in Frameworks */,
7363
);
7464
runOnlyForDeploymentPostprocessing = 0;
@@ -88,9 +78,7 @@
8878
9740EEB11CF90186004384FC /* Flutter */ = {
8979
isa = PBXGroup;
9080
children = (
91-
3B80C3931E831B6300D905FE /* App.framework */,
9281
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
93-
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9482
9740EEB21CF90195004384FC /* Debug.xcconfig */,
9583
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9684
9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -262,7 +250,7 @@
262250
);
263251
runOnlyForDeploymentPostprocessing = 0;
264252
shellPath = /bin/sh;
265-
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
253+
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
266254
};
267255
8D6FBF18FE52C43BF14935AC /* [CP] Embed Pods Frameworks */ = {
268256
isa = PBXShellScriptBuildPhase;
@@ -271,7 +259,7 @@
271259
);
272260
inputPaths = (
273261
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
274-
"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
262+
"${PODS_ROOT}/../Flutter/Flutter.framework",
275263
);
276264
name = "[CP] Embed Pods Frameworks";
277265
outputPaths = (
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>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

frontend_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings renamed to frontend_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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>Original</string>
5+
<key>PreviewsEnabled</key>
6+
<false/>
77
</dict>
88
</plist>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import UIKit
2+
import Flutter
3+
4+
@UIApplicationMain
5+
@objc class AppDelegate: FlutterAppDelegate {
6+
override func application(
7+
_ application: UIApplication,
8+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9+
) -> Bool {
10+
GeneratedPluginRegistrant.register(with: self)
11+
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12+
}
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#import "GeneratedPluginRegistrant.h"

0 commit comments

Comments
 (0)