-
-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Hi,
I am having problem with integrating 3rd party framework into my nativescript + angular app. I am using most recent versions (Angular 8 & Nativescript 6).
I tried to do this by importing framework from CocoaPods (example here: https://github.com/Nevaan/nativescript-dotpay-ios-sdk-showcase/tree/podfile-attempt ). In this case app builds correctly, but I cannot generate typings for imported SDK nor access framework objects from my project.
SDK provider shares also the whole *.framework directory, so I tried this way - I placed this in /platforms/ios directory, but in that case project throws errors in compile phase (https://github.com/Nevaan/nativescript-dotpay-ios-sdk-showcase/tree/unmodified-sdk-source)
The bundle at $PROJECT/node_modules/nativescript-tns-dotpay/platforms/ios/DotPaySDK.framework does not appear to be a dynamic framework.
I tried to add module.modulemap file, in root /platforms/ios directory and in /platforms/ios/DotPaySDK.framework/Modules containing this;
framework module DotPaySDK {
umbrella header "DotPaySDK.h"
export *
module * { export * }
}
But the same error occurs.
After adding --log trace flag and diving into stacktrace, I've found that it breaks because of SDK's Info.plist entry - CFBundlePackageType set to BNDL. I tried to change it manually to FMWK (value expected by tns) but I guess that this is not the way to do this properly, and after doing this application complains about missing dependencies (https://github.com/Nevaan/nativescript-dotpay-ios-sdk-showcase/tree/modified-sdk-source).
None of my attempts is generating typings for my SDK with this command:
TNS_TYPESCRIPT_DECLARATIONS_PATH="$(pwd)/typings" tns build ios
Just in case, I also created repo based on plugin seed - https://github.com/Nevaan/nativescript-dotpay - but errors remains the same.
Do anyone know what is the issue and how to fix this?
Related stackoverflow question: https://stackoverflow.com/questions/57460922/using-3rd-party-native-sdk-in-nativescript-project-framework-does-not-appear