Tag: ios8.1

GameCenter:endTurnWithNextParticipants不前进

在沙盒环境中,我无法将转身比赛推向下一位选手。 初始条件: 设备A和设备B上的玩家A和玩家B. 都login到沙箱 两个玩家都可以看到彼此的GC状态消息 玩家A创build一个匹配并邀请玩家B 玩家A结束 在我的“转弯”function中,我执行以下操作: NSLog(@"size = %ld", updatedMatchData.length); //move the current player to the bottom of the list NSMutableArray *nextPlayers = (NSMutableArray *)theMatch.participants; NSLog(@"%@", [nextPlayers description]); GKTurnBasedParticipant *firstGuy = nextPlayers[0]; [nextPlayers removeObjectAtIndex:0]; [nextPlayers addObject:firstGuy]; NSLog(@"——"); NSLog(@"%@", [nextPlayers description]); //send the match to the servers //"theMatch" was recorded in turnBasedMatchmakerViewController:didFindMatch [theMatch endTurnWithNextParticipants:nextPlayers […]

ALAssetsLibrary assetForURL:在iOS 8.1的“我的照片stream”中总是返回零

此代码在iOS 7中运行良好,但在iOS 8.1中,位于“我的照片stream”专辑中的所有资源都不在结果块内。 (failureBlock不叫。)普通的专辑和共享相册工作得很好。 我尝试从接受的答案: 尝试从assetForURL中分配__block ALAsset时出错:resultBlock: 也就是说,我持有一个对ALAssetsLibrary对象的引用,监听ALAssetsLibraryChangedNotification事件(这不是偶然发生的,但是哦)。我确定我的应用程序有权访问照片,我在无线上,我在我的tableView中看到了照片的缩略图。 只是当我尝试使用assetForURL:加载它们时assetForURL:它们总是零。 // example URL: assets-library://asset/asset.JPG?id=1ECB69B9-DC7A-45A7-B135-F43317D3412C&ext=JPG [self.library assetForURL:[NSURL URLWithString:url] resultBlock:^(ALAsset *asset) { NSLog(@"Asset: %@", asset); // nil 🙁 } failureBlock:^(NSError *error) { NSLog(@"Failure, wahhh!"); }]; 有没有人看到这个问题?

减lessiOS应用程序文件大小

我用Xcode 6.1和swift做了一个非常简单的iPhone应用程序。 我真的很新,ios开发和碰到一个应用程序,最终是134 MB! 当然这是不能接受的。 我有所有屏幕尺寸的背景图像,总计20 MB。 这就是它! 我将这些图像存储在xcassets,因为这是我猜的首选方式。 应用程序不应该超过25 mbs,我想。 我发现我的项目中引用了一些引用。 我删除了这些仍然是我的.app文件是89 mbs! 我究竟做错了什么? 我读了几个线程,但没有什么帮助! 我到现在为止所做的: – reduce the size of all pngs – disable the compress PNG option, as it seems to make the PNGs bigger (lol) – configured the build settings to run the fastest and smallest build – Strip Debug Symbols […]