[英]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.