Home > Mobile >  MacOS - unable to obtain information file
MacOS - unable to obtain information file

Time:10-13


. Create a new contains the Main storyboard project, the AppDelegate class, read the file path is nil, the data of the return value is nil, with other projects in this class can read, this is what you need to set up?

- (void) applicationDidFinishLaunching: (NSNotification *) aNotification {
//Insert code here to initialize your application
NSData * data=https://bbs.csdn.net/topics/[NSData dataWithContentsOfFile: @ "/Users/wuli. Li/Desktop/123. TXT");
Nsstrings * string=[[nsstrings alloc] initWithData: data encoding: NSUTF8StringEncoding];
}

CodePudding user response:

Problems have been resolved: because when we are under construction in the new project, the Code Signing Entitlements is the default, just need to give this a choice after the other, the other set is empty,
  •  Tags:  
  • iOS
  • Related