신속하게 xcode 프로젝트를 만들고 있었지만 제대로 작동했지만 갑자기이 오류가 발생했습니다.Objective c 모듈을 만들 수 없습니다. 모듈
목표 C 모듈 '재단'
/Users/admin/Downloads/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.2.sdk/을 구축 할 수 없습니다 시스템/라이브러리/프레임 워크/Foundation.framework/헤더/NSNotification.h : 17 : 4 : 접두사 특성 다음에 인터페이스 또는 프로토콜을 사용해야합니다.
새 프로젝트를 만들고 아무것도 작성하지 않고 이 오류가 표시됩니다. 프로젝트가 만들어지지 않았습니다. 내가 오류 메시지를 클릭하면이 파일 여기 NSNotification.h
날 리드는
/* NSNotification.h
Copyright (c) 1994-2016, Apple Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
typedef NSString *NSNotificationName NS_EXTENSIBLE_STRING_ENUM;
@class NSString, NSDictionary, NSOperationQueue;
NS_ASSUME_NONNULL_BEGIN
/**************** Notifications ****************/
@interface NSNotification : NSObject <NSCopying, NSCoding>
[email protected] (nullable, readonly, retain) id object;
@property (nullable, readonly, copy) NSDictionary *userInfo;
- (instancetype)initWithName:(NSNotificationName)name object:(nullable id)object userInfo:(nullable NSDictionary *)userInfo NS_AVAILABLE(10_6, 4_0) NS_DESIGNATED_INITIALIZER;
- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;
@end
@interface NSNotification (NSNotificationCreation)
+ (instancetype)notificationWithName:(NSNotificationName)aName object: (nullable id)anObject;
+ (instancetype)notificationWithName:(NSNotificationName)aName object: (nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo;
- (instancetype)init /*NSUIImagePNGRepresentation_UNAVAILABLE*/; /* do not invoke; not a valid initializer for this class */
@end
/**************** Notification Center ****************/
@interface NSNotificationCenter : NSObject {
@package
void *_impl;
void *_callback;
void *_pad[11];
}
#if FOUNDATION_SWIFT_SDK_EPOCH_AT_LEAST(8)
@property (class, readonly, strong) NSNotificationCenter *defaultCenter;
- (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSNotificationName)aName object:(nullable id)anObject;
#endif
- (void)postNotification:(NSNotification *)notification;
- (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject;
- (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo;
- (void)removeObserver:(id)observer;
- (void)removeObserver:(id)observer name:(nullable NSNotificationName)aName object:(nullable id)anObject;
- (id <NSObject>)addObserverForName:(nullable NSNotificationName)name object:(nullable id)obj queue:(nullable NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *note))block NS_AVAILABLE(10_6, 4_0);
// The return value is retained by the system, and should be held onto by the caller in
// order to remove the observer with removeObserver: later, to stop observation.
@end
NS_ASSUME_NONNULL_END
이를 도와주세요이 파일의 내용입니다. 나는 이것에 대해 매우 감사 할 것입니다. 감사.
감사합니다. @Dave 문제가 해결되었습니다. –