Skip to content
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

3rd party static libraries: Example with Google Maps SDK for iOS #141

Closed
PanayotCankov opened this issue May 20, 2015 · 8 comments
Closed

Comments

@PanayotCankov
Copy link
Contributor

No description provided.

@PanayotCankov
Copy link
Contributor Author

@PanayotCankov PanayotCankov changed the title 3rd party static libraries: Google Maps SDK for iOS 3rd party static libraries: Example with Google Maps SDK for iOS May 22, 2015
@vijaysharm
Copy link

It looks like this example repo was removed. Any other examples available on how to add a static library through a nativescript plugin?

@ivanbuhov
Copy link
Contributor

@vijaysharm Check out the nativescript plugin docs. In few words you should have the following directory structure:

my-plugin/
├── ...
└── platforms/
    ├── ios/
        ├── MyStaticiOSLibrary.a
        └── include/
            └── MyStaticiOSLibrary/
                └── ...

@vijaysharm
Copy link

Thanks @ivanbuhov, I'll take a look at the link. do i need to include the module map file as well?

@ivanbuhov
Copy link
Contributor

@vijaysharm No. The NativeScript CLI will generate default on which most of the cases works out of the box.

@vijaysharm
Copy link

Thanks for your help @ivanbuhov, this worked in-so-far as I was able to see my iOS library get built as part of the app. I ran into compilation failures because the static libraries has dependencies on AVFoundation and SystemConfiguration. I edited my build.xcconfig to include the libraries. This helped pass the compilation phase, but wound up crashing at Runtime because it was not able to resolve the class in the header. I replaced my static library with a framework, and this seems to work, however, this isn't ideal for me, but will have to do in the interim. I'd much rather the static library worked. I may have to revisit this another time, but I wanted to thank you for your help!

@ivanbuhov
Copy link
Contributor

@vijaysharm

...because it was not able to resolve the class in the header...

Can you be more specific on this? Do you receive an error? You can instruct the metadata generator to generate yaml files or TS declarations in order to verify that metadata is generated for the class in question. Therefore, we will know if the problem is in the metadata generator.

@amirofy2002
Copy link

is there any sample for this work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants