嗨我面临着运行Xcode5最新版本Mountain Lion mac with 10.8.5更新的奇怪问题.
从昨天起我无法在模拟器中运行应用程序.我在运行app时收到了错误消息.

我在Stack Overflow中阅读了一些相关的问题,并且还执行了以下步骤来修复此问题,但仍面临同样的问题.
我正在尝试重置内容和设置模拟器
从Derive数据文件夹中删除所有Build.
重启mac系统完成上述两步后很多次.
从模拟器文件夹中删除所有项目构建

我叮叮当当关注相关问题
Xcode 5 - 每次切换模拟器时"iOS模拟器都无法安装应用程序"
虽然我试图在模拟器中运行项目我得到上面的错误和模拟器包含只有黑屏我无法看到默认的应用程序或安装应用程序.
对于测试我只是在Xcode5中创建新的单一视图项目并尝试运行我也得到了相同的错误.请指导我并帮助我解决这个问题.
是否可以创建一个可以在iOS 5具有新功能的设备上执行的应用程序Xcode 5?在软件更新页面上,在应用程序商店中,有一个Xcode 5可用的更新,但我想知道更新到Xcode 5是否明智的做法.
我主要担心的是我是否仍然可以创建针对iOS 5的应用程序,如果我仍然可以使用旧项目定位iOS 5.
我搜索过SO,但似乎还没有太多相关资源.请详细说明一下.谢谢!
我有一个视频,我正在使用MPMoviePlayerViewController播放,我希望每1秒捕获一次屏幕截图,因为我想对捕获的图像上的个体执行某些操作.
我使用以下代码捕获截图----
CGRect contectRect = CGRectMake(0, 0, 1024,768);
UIGraphicsBeginImageContext(CGSizeMake(1024,768));
[_player.moviePlayer.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
NSLog(@"view size %f %f",viewImage.size.width,viewImage.size.height);
UIGraphicsGetImageFromCurrentImageContext();
CGImageRef imageRef1 = CGImageCreateWithImageInRect([viewImage CGImage], contectRect);
UIImage *image = [UIImage imageWithCGImage:imageRef1 scale:1.0orientation:viewImage.imageOrientation];
Run Code Online (Sandbox Code Playgroud)
但在这方面我总是得到一个黑色的图像.
我知道还有另一种从视频获取图像的方式,即跟随但我不想使用这些图像,因为这些图像不符合我的要求.
AVAsset *asset = [AVAsset assetWithURL:[NSURL URLWithString:path]];
AVAssetImageGenerator *imageGenerator = [[AVAssetImageGenerator alloc]initWithAsset:asset];
CMTime time = CMTimeMake(1, 1);
UIImage *thumbnail = [UIImage imageWithCGImage:[imageGenerator copyCGImageAtTime:time actualTime:NULL error:NULL]];
[UIImagePNGRepresentation(thumbnail) writeToFile:imgName atomically:YES];
Run Code Online (Sandbox Code Playgroud) iOS 6提供新的视图控制器来显示游戏中心信息:GKGameCenterViewController.
是否iOS 5.1提供类似的东西(except separate controllers for Leader-board and Achievements)?
我正在努力将图像附加到MFMailComposeViewController一切都很好的工作但我想知道这是可能给动画的附件?
对于Ex: - 当我们在iPhone设备中附加照片库中的图像时.并选择邮件按钮,所有选择的图像移动MailComposeViewcontroller与尼斯动画.
所以,任何伙伴都可以指导我这些东西是否有可能.如果是,那么我该如何设置动画附件.
这就是我要的.它加载到我的一些视图控制器上.
大家好,
我疯狂地试图使我所有viewControllers的色调都一样.有些人看起来比其他人暗得多.我想要的只是整个浅色......

有时我会得到这种丑陋的深灰色......我不确定我做错了什么.我检查了.m文件,并没有设置色调或任何东西......不确定为什么它在每个viewController上都不一致...

任何帮助都会很棒.谢谢!
我正在尝试使用facebook SDK使用以下方法从我的iOS原生应用程序向Facebook好友发送App邀请.
-(IBAction)ShowFiendDialog:(id)sender
{
NSDictionary *parameters = @{@"to":@""};
[FBWebDialogs presentRequestsDialogModallyWithSession:FBSession.activeSession
message:@"my message"
title:@"my title"
parameters:parameters
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
{
if(error)
{
NSLog(@"Some errorr: %@", [error description]);
UIAlertView *alrt = [[UIAlertView alloc] initWithTitle:@"Invitiation Sending Failed" message:@"Unable to send inviation at this Moment, please make sure your are connected with internet" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil];
[alrt show];
//[alrt release];
}
else
{
if (![resultURL query])
{
return;
}
NSDictionary *params = [self parseURLParams:[resultURL query]];
NSMutableArray *recipientIDs = [[NSMutableArray alloc] …Run Code Online (Sandbox Code Playgroud) 我想在地理围栏中添加100个区域.(苹果限制为20)任何人都有更好的想法.请帮助我.
目前我正在使用重要的位置变化.当重要的位置变化时,
- (void) locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
Run Code Online (Sandbox Code Playgroud)
方法我用当前位置调用API并获得最近的区域设置并添加到地理围栏中.这种方法有效.但我从网上听到重要的位置变化火依赖于手机信号塔.如果有更少的手机信号塔那么它将是问题.其他的事情是在后台调用api时它会对电池产生影响.
我们正在使用Google Firebase 3.x版本,我们遇到了来自Firebase的奇怪问题.我们使用Swift 3.0并获取用户详细信息,我们使用以下代码段:
func getUserDetails(uid text:String!, userBlock:@escaping (_ details:AnyObject) -> Void) {
//check DB Reference is nil or not.
if self.rootDBRef == nil {
self.rootDBRef = FIRDatabase.database().reference()
}
//check input text must not be empty
if text.trim().characters.count == 0 {
userBlock("" as AnyObject)
return
}
let query = self.rootDBRef.child("users").queryOrdered(byChild: "uid").queryEqual(toValue: text)
query.observeSingleEvent(of: .value, with: { (dbSnapshot) in
guard let snap: FIRDataSnapshot? = dbSnapshot else {
print("No Result Found")
return
}
if snap?.value is NSNull {
//block(found: false)
userBlock("" as …Run Code Online (Sandbox Code Playgroud) 我正在处理丰富的通知Notification Content Extension,并且能够加载images并gif成功地喜欢以下屏幕截图:
现在我正在尝试播放视频,我正在按照代码播放它.
- (void)didReceiveNotification:(UNNotification *)notification {
//self.label.text = @"HELLO world";//notification.request.content.body;
if(notification.request.content.attachments.count > 0)
{
UNNotificationAttachment *Attachen = notification.request.content.attachments.firstObject;
NSLog(@"====url %@",Attachen.URL);
AVAsset *asset = [AVAsset assetWithURL:Attachen.URL];
AVPlayerItem *item = [AVPlayerItem playerItemWithAsset:asset];
AVPlayer *player = [AVPlayer playerWithPlayerItem:item];
AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:player];
playerLayer.contentsGravity = AVLayerVideoGravityResizeAspect;
player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
playerLayer.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
[self.VideoPlayerView.layer addSublayer:playerLayer];
[player play];
}
}
Run Code Online (Sandbox Code Playgroud)
在NSLog中,我也获得了视频的文件URL.但那不会玩.如果任何人有这个解决方案,请帮助.
谢谢.
objective-c push-notification apple-push-notifications ios rich-notifications
ios ×9
iphone ×4
objective-c ×4
ios7 ×3
xcode ×2
xcode5 ×2
facebook ×1
firebase ×1
game-center ×1
geofencing ×1
geolocation ×1
ios5 ×1
mfmailcomposeviewcontroller ×1
sdk ×1
swift ×1
swift3 ×1