I use SVN update the project, then my project report errors below:
My report errors code is here:
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull Mob_App_Key;) // error:Expected an Objective-C directive after '@'
+ (NSString * _Nonnull)Mob_App_Key;
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, copy) NSString * _Nonnull Mob_App_Secret;)
+ (NSString * _Nonnull)Mob_App_Secret;
But you see my defines of Mob_App_Key
or Mob_App_Secret
:
// 银行
static let 中国工商银行 = "中国工商银行"
static let 中国银行 = "中国银行"
static let 中国建设银行 = "中国建设银行"
static let 中国农业银行 = "中国农业银行"
static let 中国邮政银行 = "中国邮政银行"
/* app key */
// 1.Mob
static let Mob_App_Key = "18asd0easdas159b"
static let Mob_App_Secret = "f8asdsdasd25055eb5efd70c43a854"
// 2.Bugly
static let Bugly_App_Id = "fcasdads3"
static let Bugly_App_Secret = "f93b192d-rrrr-4ssss-b604-68bfc49b8f4e"
They are no different with Bugly_App_Id
, and in the -Swift.h
, Bugly_App_Id
did not report error, I don't know where comes the errors.
I have restart Xcode
, and clean my project, it is not work for me.
I find out the error why appear:
My project in the
SVN
, deleted theAppDelegate.h
andAppDelegate.m
andmain.m
, and replaced withAppDelegate.swift
, means replace Objective-C'sAppDelegate
to Swift'sAppDelegate
, but in my this macbook, the Objective-C'sAppDelegate
is still keep.My Objective-C's
AppDelegate
is usingMob_App_Key
andMob_App_Secret
.So I delete my Objective-C's
AppDelegate
, the issues go away.