You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IonicPortalManager.publishTopic('hello', { name: 'data from NativeScript' });
70
+
```
64
71
72
+
- Subscribe to events sent from any web portal:
65
73
66
-
*`IonicPortalManager.create(portalId: string, startDir?: string)`: Create a Portal
67
-
*`portalId`: The portal id to register
68
-
*`startDir`: Set the web applications directory. By default it will look for a folder named the same as the portalId as the location of the web assets. Use this optional 2nd arg if you would like the folder name to be different that the portalId.
74
+
```
75
+
const subscriptionId = IonicPortalManager.subscribeToTopic('useful-web-event', result => {
76
+
console.log('received web portal useful-web-event with data:', result.data);
77
+
});
78
+
```
79
+
80
+
- Unsubscribe from events sent from any web portal:
Refer [to this blog post](https://blog.nativescript.org/ionic-portals-with-capacitor-plugins).
73
134
74
135
## Notes
75
136
76
-
> For iOS:
137
+
> For iOS:
77
138
> You may need to add `IPHONEOS_DEPLOYMENT_TARGET = 12.0` to your `App_Resources/iOS/build.xcconfig` file.
78
139
> If your project contains `App_Resources/iOS/Podfile`, you may need to remove any post install handling which removes deployment targets, for example:
79
140
> Remove anything like this: `config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'`
0 commit comments