feat: Add sdk pack to IOS and invoke it's method in main plugin application #5228
Replies: 2 comments
-
The first method called on a plugin initialization is the load method, you can try putting any initalization code you need there example: |
Beta Was this translation helpful? Give feedback.
-
updates for what I've done on this issue: `import Foundation /**
}
}` |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request
need integrate this package into custom plugin main
iOS SDK Development Manual.docx
Plugin
Custome plugin is working, inside m file of IOS I have
CAP_PLUGIN(ContactsPlugin, "ContactsPlugin",
CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise);
)
and in swift file I have the function:
@objc func echo(_ call: CAPPluginCall) {
let value = call.getString("value") ?? ""
call.success([
"value": value
])
}
which is perfectly working with plugin, however..
Description
I added a sdk package to it, I want to init The SDK before invoking its functional interface:
[AirbnkSDK initAirbnkSDK];
return YES;
}
and then,Set up the delegate where necessary:
@interface LockViewController ()
@EnD
@implementation LockViewController
[super viewDidLoad];
[AirbnkSDK handleDelegate:self];
}
Platform(s)
IOS platform, need to add a function to invoke the sdk package
Preferred Solution
then I try to add this:
@interface AppDelegate : UIResponder
@Property (strong, nonatomic) UIWindow *window;
@EnD
@interface AppDelegate ()
@EnD
@implementation AppDelegate
[AirbnkSDK initAirbnkSDK:@"airbnkHaha123456"];
return YES;
}
@EnD
to initiate this additional package
Alternatives
Can I then invoke method something like this please??
class LockViewController {
func scanAndConnect() {
hud = HudUtils.createMBProgressHUD(withStr: "", inView: view)
AirbnkSDK.connect(toLock: UserDefaults.standard.object(forKey: SNINFO_KEY))
}
Additional Context
my goal is to invoke the method from sdk package to the plugin swift file so that call function in main method of the plugin
thanks for any suggests/helps
Beta Was this translation helpful? Give feedback.
All reactions