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
feat(ios): use @objc for bridge and auxiliary APIs #4
feat(ios): use @objc for bridge and auxiliary APIs #4
Conversation
LGTM, thanks for the contribution! |
@NathanWalker I looked a little closer at your code example there, the |
Oh nice lemme try the latest version and will see if we can get that to work - previously at least on 0.4.1 the only way we could make the plugins active was to use |
The actual registration actually happens down in Capacitor, so that's interesting that the plugin wouldn't load for you before. I know Android requires explicitly registering them, but in our e-commerce demo one of our Portals (the profile page specifically) uses the CapacitorCamera plugin, which is never explicitly registered anywhere in the iOS application. Also, on a side note, we had an issue with how we were cutting releases for a specific branch of Capacitor we use and you may have some breakage. Unfortunately, you'll have to update to 0.5.1 as it's the only version of Portals that will work. Specifically the frame parameter in the |
Ok excellent thanks for this info - will take me few days to confirm things but will post back here once I know more (likely early next week). |
@Steven0351 I've been having trouble with 0.5.1 due to |
I’ll take a look at this tomorrow, as far as I’m aware IonicLiveUpdates was built with swift module evolution support. We had some issues like that with Carthage though. Is this reproducible with the NativeScript plug-in? |
We haven't published the update yet but working on getting 0.5.1 operational in this branch: Explored several things like setting If you ended up trying it, could try these exact steps (would require
If helpful, you can open the demo app in Xcode via:
Some relevant files to see some settings in place:
|
I was able to reproduce with the NativeScript demo. I was also able to get it to compile by making IonicLiveUpdates a local podspec reference and building from source, so there's definitely something going on with the compiled binary SDK. What makes me curious (and concerned) is not having seen this same issue pop up with our demo application. We also didn't have any issues with that when doing some stuff with React Native. |
If you get a chance, would you try compiling the iOS project of our e-commerce demo and let me know if it builds fine for you? The thing that's boggling my mind the most is that contrary to the build error, ZipFoundation's minimum iOS target is actually 12.0. In fact, the only library in the entire dependency tree that has a 14.0 minimum target is IonicPortals itself. |
@Steven0351 just quick update - I got above to build; was a combination of ensuring the 'IonicPortals' pod had declared at least |
Still working through the API changes and will update more here as I know this week if the changes in this PR are indeed still needed. |
I think the changes are fine to stay regardless, exposing those pieces to objective-c isn't really much of a maintenance burden. |
This allows Capacitor plugins to be registered with the bridge, for example:
NativeScript/plugins@644b896#diff-8ccbf3f8847b6a1b15944609e0e0610409a8b5e910076d7298aeab62cd998e84R46