-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix issue with receivers being in the wrong location and enable multidex #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,7 @@ | |
|
||
<!-- Local Notifications --> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just a note that there are other permissions mentioned in the readme that hadn't been added here |
||
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.BOOT_COMPLETED"></action> | ||
</intent-filter> | ||
</receiver> | ||
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" /> | ||
|
||
|
||
|
||
<!-- io.flutter.app.FlutterApplication is an android.app.Application that | ||
|
@@ -39,5 +34,11 @@ | |
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. receivers weren't placed in the right location |
||
<intent-filter> | ||
<action android:name="android.intent.action.BOOT_COMPLETED"></action> | ||
</intent-filter> | ||
</receiver> | ||
<receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" /> | ||
</application> | ||
</manifest> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ allprojects { | |
subprojects { | ||
project.configurations.all { | ||
resolutionStrategy.eachDependency { details -> | ||
// not sure why the first condition has been added. AndroidX is suppose to replace the support libraries | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see question here. i suspect that you should be able to remove the first if block |
||
if (details.requested.group == 'com.android.support' | ||
&& !details.requested.name.contains('multidex') ) { | ||
details.useVersion "27.1.0" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
#include "Generated.xcconfig" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
#include "Generated.xcconfig" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# 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' | ||
|
||
project 'Runner', { | ||
'Debug' => :debug, | ||
'Profile' => :release, | ||
'Release' => :release, | ||
} | ||
|
||
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') | ||
} | ||
end | ||
|
||
# Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. | ||
install! 'cocoapods', :disable_input_output_paths => true | ||
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
multidex needs to be enabled as per https://developer.android.com/studio/build/multidex