我将我的项目从xcode 5加载到xcode 6并看到错误myProject-prefix.pch在myProjectTests中找不到,我添加此文件并看到新的错误
Ld /Users/willrock/Library/Developer/Xcode/DerivedData/??????????_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator/??????????\ Extreme\ FitnessTests.xctest/??????????\ Extreme\ FitnessTests normal x86_64
cd /Users/willrock/Desktop/ExtremeFitness
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/willrock/Library/Developer/Xcode/DerivedData/??????????_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator -F/Users/willrock/Library/Developer/Xcode/DerivedData/??????????_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk/Developer/Library/Frameworks -filelist /Users/willrock/Library/Developer/Xcode/DerivedData/??????????_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Intermediates/??????????\ Extreme\ Fitness.build/Debug-iphonesimulator/??????????\ Extreme\ FitnessTests.build/Objects-normal/x86_64/??????????\ Extreme\ FitnessTests.LinkFileList -bundle_loader /Users/willrock/Library/Developer/Xcode/DerivedData/??????????_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator/extreme_fitness.app/extreme_fitness -Xlinker -objc_abi_version -Xlinker 2 -framework XCTest -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.1 -framework XCTest -framework UIKit -framework Foundation -Xlinker -dependency_info -Xlinker /Users/willrock/Library/Developer/Xcode/DerivedData/??????????_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Intermediates/??????????\ Extreme\ Fitness.build/Debug-iphonesimulator/??????????\ Extreme\ FitnessTests.build/Objects-normal/x86_64/??????????\ Extreme\ FitnessTests_dependency_info.dat -o /Users/willrock/Library/Developer/Xcode/DerivedData/??????????_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator/??????????\ Extreme\ FitnessTests.xctest/??????????\ Extreme\ FitnessTests
Run Code Online (Sandbox Code Playgroud)
升d: file not found: /Users/willrock/Library/Developer/Xcode/DerivedData/??????????_Extreme_Fitness-cdfxpafcwvsczkfjvlwznradvmhm/Build/Products/Debug-iphonesimulator/extreme_fitness.app/extreme_fitness
clang: error: …
我有UITableview多个带有样式组的部分,滚动后的轻型自定义标题视图,标题不会粘在顶部,而且不可见
我需要滚动UITableview和节标题栏在顶视图和可见,如电话簿
如何制作它?
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320,50)];
UILabel *labelHeader = [[UILabel alloc] initWithFrame:CGRectMake(20, 5, 120, 40)];
labelHeader.text = [[_groups objectAtIndex:section] objectForKey:@"nameExerciseGroup"];
labelHeader.textColor = [UIColor blackColor];
[labelHeader setFont:[UIFont systemFontOfSize:20]];
[headerView addSubview:labelHeader];
return headerView;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 50;
}
Run Code Online (Sandbox Code Playgroud) 我使用函数并看到
Run Code Online (Sandbox Code Playgroud)BSSID = "d4:ca:6d:d4:e:89"; SSID = "ExtremeFitness_FreeInternet"; SSIDDATA = <45787472 656d6546 69746e65 73735f46 72656549 6e746572 6e6574>;
但来自 wifi 指针的 mac 地址 d4:ca:6d:d4:0e:89
之后,我将当前的 wifi bssid 与数据库中的 mac 地址进行比较,比较 NSString
为什么我在这段代码中看不到 0 ?
+(NSString *) getMac{
CFArrayRef myArray = CNCopySupportedInterfaces();
CFDictionaryRef captiveNetWork = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));
//NSLog(@"Connected at : %@", captiveNetWork);
NSDictionary *myDictionnary = (__bridge NSDictionary *)captiveNetWork;
NSString *bssid = [myDictionnary objectForKey:@"BSSID"];
if (bssid.length == 0) {
return @"";
}
return bssid;
}
-(void)compareMacAddress{
for (int i = 0; i < _clubs.count; …Run Code Online (Sandbox Code Playgroud) 我在我的应用程序中包含谷歌firebase - 创建谷歌帐户,创建谷歌应用程序,上传APNS认证(.pem和在另一项服务中工作),并从控制台发送推送通知,我的应用程序没有收到它.在Firebase控制台中,我看到状态已完成但设备的近似数量为" - "
当然,我更新了条款配置文件和APNS证书
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Register for remote notifications
if #available(iOS 8.0, *) {
let settings: UIUserNotificationSettings =
UIUserNotificationSettings(forTypes: [.Alert, .Badge, .Sound], categories: nil)
application.registerUserNotificationSettings(settings)
application.registerForRemoteNotifications()
} else {
// Fallback
let types: UIRemoteNotificationType = [.Alert, .Badge, .Sound]
application.registerForRemoteNotificationTypes(types)
}
FIRApp.configure()
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(self.tokenRefreshNotificaiton),
name: kFIRInstanceIDTokenRefreshNotification, object: nil)
}
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject],
fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
print(userInfo)
}
func tokenRefreshNotificaiton(notification: NSNotification) …Run Code Online (Sandbox Code Playgroud) apple-push-notifications ios firebase firebase-notifications