I am trying to share class and database from my app to app extension . I have tried to add classes from the TARGET Membership, but on adding following issue comes
Could any one help me to access my class and database in share extension.
Thanks in advance
To access UIApplication object you must import the UIKit framework like:
import UIKit
or if you only want to import UIApplication class you can write
import class UIKit.UIApplication
Also note that if you want to use CoreData in your Share extension, you will need to create new container and set the storeURL to point to created container.
Related
i want to import a Layout in Roomle, but i can only see the function to make it myself. Is there a function to import a ".dwg" or a ".dxf"
We have the task to change a existing Layout in Roomle.
Thanks in advance.
It's not possible to import a plan into Roomle using a .dwg or .dxf file.
You can change an existing plan in the iOS App or in the Web App (https://www.roomle.com/app/login).
I generated a Core Data model with a table called ReadHistory. I selected to have this table codeine using Category/Extension as I needed to extend a transient property. I want to use this class inside of a today extension but when I try to build I get the error that this file could not be found.
#import "ReadHistory+CoreDataProperties.h"
I do not see that file to be added via compile sources.
How can I get the autogenerated classes to show in the today extension?
You need to check the file named ReadHistory+CoreDataProperties.m as a target to the extension also
I have created a service and placed it in a new folder 'service' under app folder.
When I am trying to import the service in component its showing error as follows:
But, the same is getting imported in app module.
Someone please help me out...
Here is my project structure below
My alert service is in service folder.
And trying to import it in home.component which is in home folder
I figured it out.
Need to mention
import {AlertService} from '../service/alert.service';
My user needs to create lists with 2 or 3 columns. It will be a pain to do one-by-one with iOS keyboard.
So, is there any way the user can import XLS or CSV files into the application? How can I do this? Maybe a document picker?
PS: this is not a file already on app. This is a file user can create on computer and then import to application.
I really need some simple code for me how to read CoreData in TodayWidget
This steps I made:
Create new project with using CoreData (in AppDelegate)
Make an Entity in CoreData model and some Attributes like a name or date
in ViewController of App fill name and date with one record like "Martin" "10/11"
And Now I need to read this name in TodayViewController
Please really post here just some simple code from it, or how to edit AppDelegate for using appgroup ...
Thanks !
Widgets have to be able to read the data in their code. In order to do this, you need to setup your CoreData files to be located in a 'group' folder in your project (You can set your CoreData Stack to relocate it's files in this folder). Then you'll configure a CoreData Stack in your extension that points to the same files. These group folders are folders that can be access across multiple targets/applications that have permissions for the group.
I will point out that it's far easier to use and sync NSUserDefaults across a widget and it's appropriate application than it is CoreData.
You'll want to read Apple's documentation about sharing extension data below:
Apple docs
Note the following section:
Sharing Data with Your Containing App
Even though an app extension bundle is nested within its containing
app’s bundle, the running app extension and containing app have no
direct access to each other’s containers.
BACKGROUND
To learn about containers, read About the iOS File System in File
System Programming Guide.
You can, however, enable data sharing. For example, you might want to
allow your app extension and its containing app to share a single
large set of data, such as prerendered assets.