How to add iOS native libraries and use it on nativescript?
I'm trying to add an iOS native library, Jumio, to my nativescript project. I follow nativescript document instruction. as it said, I did these steps:
1- Create cli project:
tns create MYCocoaPodsApp
cd MYCocoaPodsApp
tns platform add ios
2- Wrap the Library as NativeScript Plugin
cd ..
mkdir my-plugin
cd my-plugin
3- Create a package.json inside of my-plugin
with the following content
{
"name": "my-plugin",
"version": "0.0.1",
"nativescript": {
"platforms": {
"ios": "1.3.0"
}
}
}
4- Create a Podfile inside of my-plugin/platforms/ios/Podfile
file with following content (I copied it from the native library document):
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks! # Required for proper framework handling
pod 'JumioMobileSDK', '~>2.13' # If you use BAM Checkout along Netverify in your app. Frameworks supporting device architectures only.
pod 'JumioMobileSDK/Netverify', '~>2.13' # Specify Netverify as subspec to only use Netverify, Fastfill or Document Verification
pod 'JumioMobileSDK/BAMCheckout', '~>2.13' # Specify BAMCheckout as subspec to only use BAM Checkout
It looks like this
my-plugin/
├── package.json
└── platforms/
└── ios/
└── Podfile
5- Install and Build project
tns plugin add ../my-plugin
tns build ios
It will install and build successfully but I don't know how should I use it in my project.
Any Idea?
nativescript
add a comment |
I'm trying to add an iOS native library, Jumio, to my nativescript project. I follow nativescript document instruction. as it said, I did these steps:
1- Create cli project:
tns create MYCocoaPodsApp
cd MYCocoaPodsApp
tns platform add ios
2- Wrap the Library as NativeScript Plugin
cd ..
mkdir my-plugin
cd my-plugin
3- Create a package.json inside of my-plugin
with the following content
{
"name": "my-plugin",
"version": "0.0.1",
"nativescript": {
"platforms": {
"ios": "1.3.0"
}
}
}
4- Create a Podfile inside of my-plugin/platforms/ios/Podfile
file with following content (I copied it from the native library document):
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks! # Required for proper framework handling
pod 'JumioMobileSDK', '~>2.13' # If you use BAM Checkout along Netverify in your app. Frameworks supporting device architectures only.
pod 'JumioMobileSDK/Netverify', '~>2.13' # Specify Netverify as subspec to only use Netverify, Fastfill or Document Verification
pod 'JumioMobileSDK/BAMCheckout', '~>2.13' # Specify BAMCheckout as subspec to only use BAM Checkout
It looks like this
my-plugin/
├── package.json
└── platforms/
└── ios/
└── Podfile
5- Install and Build project
tns plugin add ../my-plugin
tns build ios
It will install and build successfully but I don't know how should I use it in my project.
Any Idea?
nativescript
Do you want to publish it or just use it within your project?
– Manoj
Nov 20 '18 at 13:17
From that point on you need to covert the Obj-C code to JavaScript (or TypeScript depending what you prefer to work with) by following the marshalling techniques in NativeScript and the specific conversion syntax docs.nativescript.org/angular/core-concepts/ios-runtime/…
– Nick Iliev
Nov 20 '18 at 13:24
E.g. the Obj-c codeBAMCheckoutConfiguration *config = [BAMCheckoutConfiguration new];
should becomelet confit = BAMCheckoutConfiguration.new()
orlet confit = new BAMCheckoutConfiguration()
I think both syntax are valid in this case
– Nick Iliev
Nov 20 '18 at 13:28
add a comment |
I'm trying to add an iOS native library, Jumio, to my nativescript project. I follow nativescript document instruction. as it said, I did these steps:
1- Create cli project:
tns create MYCocoaPodsApp
cd MYCocoaPodsApp
tns platform add ios
2- Wrap the Library as NativeScript Plugin
cd ..
mkdir my-plugin
cd my-plugin
3- Create a package.json inside of my-plugin
with the following content
{
"name": "my-plugin",
"version": "0.0.1",
"nativescript": {
"platforms": {
"ios": "1.3.0"
}
}
}
4- Create a Podfile inside of my-plugin/platforms/ios/Podfile
file with following content (I copied it from the native library document):
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks! # Required for proper framework handling
pod 'JumioMobileSDK', '~>2.13' # If you use BAM Checkout along Netverify in your app. Frameworks supporting device architectures only.
pod 'JumioMobileSDK/Netverify', '~>2.13' # Specify Netverify as subspec to only use Netverify, Fastfill or Document Verification
pod 'JumioMobileSDK/BAMCheckout', '~>2.13' # Specify BAMCheckout as subspec to only use BAM Checkout
It looks like this
my-plugin/
├── package.json
└── platforms/
└── ios/
└── Podfile
5- Install and Build project
tns plugin add ../my-plugin
tns build ios
It will install and build successfully but I don't know how should I use it in my project.
Any Idea?
nativescript
I'm trying to add an iOS native library, Jumio, to my nativescript project. I follow nativescript document instruction. as it said, I did these steps:
1- Create cli project:
tns create MYCocoaPodsApp
cd MYCocoaPodsApp
tns platform add ios
2- Wrap the Library as NativeScript Plugin
cd ..
mkdir my-plugin
cd my-plugin
3- Create a package.json inside of my-plugin
with the following content
{
"name": "my-plugin",
"version": "0.0.1",
"nativescript": {
"platforms": {
"ios": "1.3.0"
}
}
}
4- Create a Podfile inside of my-plugin/platforms/ios/Podfile
file with following content (I copied it from the native library document):
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks! # Required for proper framework handling
pod 'JumioMobileSDK', '~>2.13' # If you use BAM Checkout along Netverify in your app. Frameworks supporting device architectures only.
pod 'JumioMobileSDK/Netverify', '~>2.13' # Specify Netverify as subspec to only use Netverify, Fastfill or Document Verification
pod 'JumioMobileSDK/BAMCheckout', '~>2.13' # Specify BAMCheckout as subspec to only use BAM Checkout
It looks like this
my-plugin/
├── package.json
└── platforms/
└── ios/
└── Podfile
5- Install and Build project
tns plugin add ../my-plugin
tns build ios
It will install and build successfully but I don't know how should I use it in my project.
Any Idea?
nativescript
nativescript
asked Nov 20 '18 at 9:46
Meysam MahmoodiMeysam Mahmoodi
11111
11111
Do you want to publish it or just use it within your project?
– Manoj
Nov 20 '18 at 13:17
From that point on you need to covert the Obj-C code to JavaScript (or TypeScript depending what you prefer to work with) by following the marshalling techniques in NativeScript and the specific conversion syntax docs.nativescript.org/angular/core-concepts/ios-runtime/…
– Nick Iliev
Nov 20 '18 at 13:24
E.g. the Obj-c codeBAMCheckoutConfiguration *config = [BAMCheckoutConfiguration new];
should becomelet confit = BAMCheckoutConfiguration.new()
orlet confit = new BAMCheckoutConfiguration()
I think both syntax are valid in this case
– Nick Iliev
Nov 20 '18 at 13:28
add a comment |
Do you want to publish it or just use it within your project?
– Manoj
Nov 20 '18 at 13:17
From that point on you need to covert the Obj-C code to JavaScript (or TypeScript depending what you prefer to work with) by following the marshalling techniques in NativeScript and the specific conversion syntax docs.nativescript.org/angular/core-concepts/ios-runtime/…
– Nick Iliev
Nov 20 '18 at 13:24
E.g. the Obj-c codeBAMCheckoutConfiguration *config = [BAMCheckoutConfiguration new];
should becomelet confit = BAMCheckoutConfiguration.new()
orlet confit = new BAMCheckoutConfiguration()
I think both syntax are valid in this case
– Nick Iliev
Nov 20 '18 at 13:28
Do you want to publish it or just use it within your project?
– Manoj
Nov 20 '18 at 13:17
Do you want to publish it or just use it within your project?
– Manoj
Nov 20 '18 at 13:17
From that point on you need to covert the Obj-C code to JavaScript (or TypeScript depending what you prefer to work with) by following the marshalling techniques in NativeScript and the specific conversion syntax docs.nativescript.org/angular/core-concepts/ios-runtime/…
– Nick Iliev
Nov 20 '18 at 13:24
From that point on you need to covert the Obj-C code to JavaScript (or TypeScript depending what you prefer to work with) by following the marshalling techniques in NativeScript and the specific conversion syntax docs.nativescript.org/angular/core-concepts/ios-runtime/…
– Nick Iliev
Nov 20 '18 at 13:24
E.g. the Obj-c code
BAMCheckoutConfiguration *config = [BAMCheckoutConfiguration new];
should become let confit = BAMCheckoutConfiguration.new()
or let confit = new BAMCheckoutConfiguration()
I think both syntax are valid in this case– Nick Iliev
Nov 20 '18 at 13:28
E.g. the Obj-c code
BAMCheckoutConfiguration *config = [BAMCheckoutConfiguration new];
should become let confit = BAMCheckoutConfiguration.new()
or let confit = new BAMCheckoutConfiguration()
I think both syntax are valid in this case– Nick Iliev
Nov 20 '18 at 13:28
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390208%2fhow-to-add-ios-native-libraries-and-use-it-on-nativescript%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390208%2fhow-to-add-ios-native-libraries-and-use-it-on-nativescript%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you want to publish it or just use it within your project?
– Manoj
Nov 20 '18 at 13:17
From that point on you need to covert the Obj-C code to JavaScript (or TypeScript depending what you prefer to work with) by following the marshalling techniques in NativeScript and the specific conversion syntax docs.nativescript.org/angular/core-concepts/ios-runtime/…
– Nick Iliev
Nov 20 '18 at 13:24
E.g. the Obj-c code
BAMCheckoutConfiguration *config = [BAMCheckoutConfiguration new];
should becomelet confit = BAMCheckoutConfiguration.new()
orlet confit = new BAMCheckoutConfiguration()
I think both syntax are valid in this case– Nick Iliev
Nov 20 '18 at 13:28