Closed PanayotCankov closed 7 years ago
The plugin will copy KeychainSharing.entitlements from the plugin into the Xcode project and will add CODE_SIGN_ENTITLEMENTS that use the entitlement in the build process but this will not allow the developers to extend the capabilities of their app further than the keychain sharing. There are other capabilities that are set in the
I was adding .entitlements by placing such file in the App_Resources/iOS/app.entitlements and was referencing it with the build.xcconfig:
// Entitlements
CODE_SIGN_ENTITLEMENTS = nativescriptmarketplacedemo/Resources/nativescriptmarketplacedemo.entitlements;
I am not sure my approach will work now with your plugin. Nor the:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
</dict>
</plist>
Will be merged with the:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)__KEYCHAIN_ACCESS_GROUP__</string>
</array>
</dict>
</plist>
Hmm, good points.. tough one..
Tried enabling a few capabilities and this is what's written to
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.healthkit</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)org.nativescript.firebasedemo</string>
</array>
</dict>
</plist>
So we def need to change this.
What about detecting whether or not plist
npm package to add the keychain-access-groups
bit in case it's not there yet?
Honestly I don't know.
No worries, I'll take a stab at it shortly 👍
Btw the PR #222 may fix this issue.
Also I would be happy to get more input into: https://github.com/NativeScript/NativeScript/issues/3157
Executing after-prepare hook from /Users/cankov/git/NativeScript/nativescript-marketplace-demo/hooks/after-prepare/firebase-install-ios-entitlements.js fs.js:808 return binding.readdir(pathModule._makeLong(path)); ^
Error: ENOENT: no such file or directory, scandir 'platforms/ios' at Error (native) at Object.fs.readdirSync (fs.js:808:18) at Object. (/Users/cankov/git/NativeScript/nativescript-marketplace-demo/hooks/after-prepare/firebase-install-ios-entitlements.js:3709:15)
at __webpack_require__ (/Users/cankov/git/NativeScript/nativescript-marketplace-demo/hooks/after-prepare/firebase-install-ios-entitlements.js:20:30)
at /Users/cankov/git/NativeScript/nativescript-marketplace-demo/hooks/after-prepare/firebase-install-ios-entitlements.js:64:18
at Object. (/Users/cankov/git/NativeScript/nativescript-marketplace-demo/hooks/after-prepare/firebase-install-ios-entitlements.js:67:10)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
That's when building for android.