这个问题让我真的很疯狂.Xcode正在我项目的不同位置寻找故事板.我尝试删除文件,再次添加,清理项目等,但没有运气.
这是错误.
cd /Users/fmartin91/Projects/loovin/loovin-ios
setenv IBSC_MINIMUM_COMPATIBILITY_VERSION 7.0
setenv 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"
setenv XCODE_DEVELOPER_USR_PATH /Applications/Xcode.app/Contents/Developer/usr/bin/..
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool --errors --warnings --notices --minimum-deployment-target 7.0 --output-format human-readable-text --compile /Users/fmartin91/Projects/loovin/loovin-ios/Build/Products/Debug-iphonesimulator/loovin.app/Base.lproj/LOOVProductIndex.storyboardc /Users/fmartin91/Projects/Base.lproj/LOOVProductIndex.storyboard
/* com.apple.ibtool.errors */
/Users/fmartin91/Projects/Base.lproj/LOOVProductIndex.storyboard:
error: Interface Builder could not open the document
"LOOVProductIndex.storyboard" because it does not exist.
Run Code Online (Sandbox Code Playgroud) 我在使AFNetworking Reachability模块工作时遇到了一些麻烦.我已经使用ReachabilityStatusChangeBlock设置了AFHTTPRequestOperationManager,但它永远不会被调用.
self.manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://192.168.1.2:3000"]];
self.manager.responseSerializer = [AFJSONResponseSerializer serializer];
NSOperationQueue *operationQueue = self.manager.operationQueue;
[self.manager.reachabilityManager setReachabilityStatusChangeBlock:^(AFNetworkReachabilityStatus status) {
switch (status) {
case AFNetworkReachabilityStatusNotReachable:
// we need to notify a delegete when internet conexion is lost.
// [delegate internetConexionLost];
NSLog(@"No Internet Conexion");
break;
case AFNetworkReachabilityStatusReachableViaWiFi:
NSLog(@"WIFI");
break;
case AFNetworkReachabilityStatusReachableViaWWAN:
NSLog(@"3G");
break;
default:
NSLog(@"Unkown network status");
[operationQueue setSuspended:YES];
break;
}
Run Code Online (Sandbox Code Playgroud)
我已经在我的.pch中导入了SystemConfiguration/SystemConfiguration.h,正如文档所述.每当我要求状态时,我得到值-1.
有帮助吗?
更新:
我在这里添加我的PodFile:
pod 'AFNetworking' ,'~> 2.0.0'
pod 'AFNetworking/Reachability' ,'~> 2.0.0'
Run Code Online (Sandbox Code Playgroud) 我目前正在测试与JSON API通信的iOS应用。在运行测试之前,我需要启动sinatra服务器。服务器充当真实API的模拟。
有什么办法可以像这样运行一行脚本ruby /path/to/server.rb吗?
谢谢