How to add iOS native libraries and use it on nativescript?












0














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?










share|improve this question






















  • Do you want to publish it or just use it within your project?
    – Manoj
    Nov 20 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 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 at 13:28
















0














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?










share|improve this question






















  • Do you want to publish it or just use it within your project?
    – Manoj
    Nov 20 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 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 at 13:28














0












0








0







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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 20 at 9:46









Meysam Mahmoodi

11111




11111












  • Do you want to publish it or just use it within your project?
    – Manoj
    Nov 20 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 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 at 13:28


















  • Do you want to publish it or just use it within your project?
    – Manoj
    Nov 20 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 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 at 13:28
















Do you want to publish it or just use it within your project?
– Manoj
Nov 20 at 13:17




Do you want to publish it or just use it within your project?
– Manoj
Nov 20 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 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 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 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 at 13:28

















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
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin