-
Notifications
You must be signed in to change notification settings - Fork 2
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
Release 2.0.0 #13
Release 2.0.0 #13
Conversation
path: "ios/Plugin" | ||
), | ||
.target( | ||
name: "UaCapacitorAirship", |
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.
SPM you cant have mixed source targets so I had to break this up into its own file to do the bootloader
} | ||
|
||
override fun createConfigBuilder(context: Context): AirshipConfigOptions.Builder { | ||
val pluginConfig = CapConfig.loadDefault(context).getPluginConfiguration("Airship") | ||
val proxyConfig = ProxyConfig(JsonValue.wrapOpt(pluginConfig.getObject("config")).optMap()) | ||
val builder = AirshipConfigOptions.newBuilder().applyDefaultProperties(context) | ||
val builder = AirshipConfigOptions.newBuilder() | ||
try { builder.tryApplyDefaultProperties(context) } catch (_: Exception) {} |
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.
Prevents logging that it cant find the config
#else | ||
#import <Capacitor/ | ||
#import "UACapacitorAirship-Swift.h" | ||
@import UaCapacitorAirshipPlugin; |
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.
SPM fallback
proxy.push.isNotificationChannelEnabled(arg.requireString()) | ||
} else { | ||
true | ||
scope.launch { |
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.
Same as before, I just moved this to be launched in the scope so its called on the main thread
Update for Capacitor 6.
I tested SPM support but ran into this issue with a hardcoded ios 13 platform version. I created a feature request to make it configurable - ionic-team/capacitor#7544
Modifying the template I was able to verify the plugin works with SPM and Pods