简体   繁体   English

iOS 8自定义键盘扩展程序不允许与包含的应用程序共享数据吗?

[英]iOS 8 Custom Keyboard extension don't allow share data with containing app?

Refer to this article: http://www.glimsoft.com/06/28/ios-8-today-extension-tutorial/ . 请参阅此文章: http : //www.glimsoft.com/06/28/ios-8-today-extension-tutorial/ I did a Today extension can share data with containing app. 我做了一个Today扩展程序,可以与包含的应用程序共享数据。

But when I move the same code into my Custom Keyboard extension, My custom keyboard never read data from containing app NSUserDefaults file. 但是,当我将相同代码移入“自定义键盘”扩展程序时,我的自定义键盘从不读取包含应用程序NSUserDefaults文件的数据。

I want to know if ios8 don't allow Keyboard extension sharing data with containing app? 我想知道ios8是否不允许Keyboard Extension与包含应用程序的用户共享数据?

xcode 6 (beta5) + ios8 beta5 xcode 6(beta5)+ ios8 beta5

Containing app and extensions are considered as different apps. 包含应用程序和扩展程序被视为不同的应用程序。 You can use: 您可以使用:

NSUserDefaults *ud = [[NSUserDefaults alloc] initWithSuiteName:@"com.yourname.yourapp"];

To sync data between app and extension. 在应用程序和扩展程序之间同步数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何允许用户从iOS相册应用中选择照片并在应用中打开? 而且我不想使用SHARE EXTENSION - How can I allow user to select photo from iOS Photos app and open in my application? And I don't want to use SHARE EXTENSION iOS8-自定义键盘扩展(允许完全访问) - iOS8 - Custom Keyboard Extension(Allow Full access) 使用钥匙串在 iOS 扩展程序及其包含的应用程序之间共享? - Share between an iOS extension and its containing app with the keychain? 发布NSUserDefaults在iOS键盘扩展和包含应用之间进行更改吗? - Post NSUserDefaults changes between iOS Keyboard Extension and Containing app? iOS分享扩展关闭键盘 - iOS share extension dismiss keyboard 是否可以在iOS中启用不带键盘扩展名的自定义应用内键盘? - Is it possible to enable a custom keyboard in-app without a keyboard extension in iOS? 共享扩展以打开包含应用程序 - Share Extension to open containing app 如何使用NSUserDefaults与包含应用程序共享数据? - 今日Extension Widget - How to share data with containing app using NSUserDefaults ? - Today Extension Widget 启动包含来自 iOS8 自定义键盘的应用程序 - launch containing app from iOS8 Custom Keyboard iOS 8自定义键盘应用程序扩展-更改方向的高度 - iOS 8 Custom Keyboard App Extension - Change height for orientation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM