Skip to content
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

Merged
merged 5 commits into from
Jul 3, 2024
Merged

Release 2.0.0 #13

merged 5 commits into from
Jul 3, 2024

Conversation

rlepinski
Copy link
Contributor

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

@rlepinski rlepinski requested a review from a team as a code owner July 2, 2024 23:17
path: "ios/Plugin"
),
.target(
name: "UaCapacitorAirship",
Copy link
Contributor Author

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) {}
Copy link
Contributor Author

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;
Copy link
Contributor Author

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 {
Copy link
Contributor Author

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

@rlepinski rlepinski merged commit 8524f8e into main Jul 3, 2024
1 check passed
@rlepinski rlepinski deleted the release-2.0.0 branch July 3, 2024 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants