小编Sta*_*tas的帖子

iOS 6 Facebook发布程序最终以"remote_app_id与存储的id不匹配"结束

这是关于在Facebook上发帖的第三个问题.

虽然这可能是Mac OS X的重复Facebook登录失败 - 没有为应用程序存储remote_app_id但我决定发布单独的问题,因为我们在这里有iOS而不是MAC OS.

前几天我发布了一个问题iOS 6 Facebook发布程序最终以"remote_app_id与存储的id不匹配"错误问题仍然是一样的我无法执行帖子但现在我有一个错误:

error is: Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: remote_app_id does not match stored id." UserInfo=0xa260270 {NSLocalizedDescription=The Facebook server could not fulfill this access request: remote_app_id does not match stored id.}

您在我之前的问题中可能找到的代码.
有谁知道发生了什么?
什么是远程和存储的应用程序ID?

iphone facebook objective-c ios

46
推荐指数
3
解决办法
3万
查看次数

模拟器名称在Xcode 6.2中以id而不是os名称显示

我在安装Xcode 6.2之后安装了额外的ios模拟器(7.1),现在模拟器名称如下所示:

在此输入图像描述

如何更改名称?

iphone objective-c ios-simulator xcode6

28
推荐指数
2
解决办法
4034
查看次数

iOS 6 Facebook发布程序最终以"remote_app_id与存储ID不匹配"错误结束

我正在尝试执行一个简单的发布过程:

- (IBAction)directPostClick:(id)sender {
    self.statusLabel.text = @"Waiting for authorization...";
    if (self.accountStore == nil) {
        self.accountStore = [[ACAccountStore alloc] init];
    }   
    ACAccountType * facebookAccountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
    NSArray * permissions = @[@"publish_stream", @"user_checkins", @"publish_checkins", @"user_likes", @"user_videos"];
    NSDictionary * dict = @{ACFacebookAppIdKey : @"My app id here", ACFacebookPermissionsKey : permissions, ACFacebookAudienceKey : ACFacebookAudienceOnlyMe};
    [self.accountStore requestAccessToAccountsWithType:facebookAccountType options:dict completion:^(BOOL granted, NSError *error) {
        __block NSString * statusText = nil;
        if (granted) {
            statusText = @"Logged in";
            NSArray * accounts = [self.accountStore accountsWithAccountType:facebookAccountType];
            self.facebookAccount = …
Run Code Online (Sandbox Code Playgroud)

iphone facebook objective-c

27
推荐指数
2
解决办法
2万
查看次数

iOS 6 - Facebook共享程序失败,出现错误"代理应用程序尚未安装"

虽然,有这样一个问题Facebook错误(7)iOS 6它已经关闭,没有任何答案!在获取用户的Facebook帐户访问权限时,我遇到了错误: error is: Error Domain=com.apple.accounts Code=7 "The Facebook server could not fulfill this access request: The proxied app is not already installed." UserInfo=0xa260270 {NSLocalizedDescription=The Facebook server could not fulfill this access request: The proxied app is not already installed.}

我正在执行这样的请求:

self.statusLabel.text = @"Waiting for authorization...";
if (self.accountStore == nil) {
    self.accountStore = [[ACAccountStore alloc] init];
}   
ACAccountType * facebookAccountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];

NSDictionary * dict = @{ACFacebookAppIdKey : FB_APP_ID, ACFacebookAudienceKey : ACFacebookAudienceEveryone};
[self.accountStore requestAccessToAccountsWithType:facebookAccountType options:dict completion:^(BOOL granted, …
Run Code Online (Sandbox Code Playgroud)

iphone facebook objective-c ios6

23
推荐指数
3
解决办法
1万
查看次数

了解iOS 6界面方向更改

补充: 我看到我的问题经常在没有赞成的情况下被查看,所以我决定你们没有得到你搜索的内容.重定向到有关如何处理iOS6中的方向更改的答案非常好的问题

方向变化的具体要求: 限制轮换

欢迎Upvotes :)


我已经从Master Detail模板创建了一个新项目,并尝试以横向方向启动它.如你所知

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

方法已弃用,我们必须使用

- (NSUInteger)supportedInterfaceOrientations

和/或

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation

这是我的代码:

- (NSUInteger)supportedInterfaceOrientations {
    NSLog(@"supported called");
    return UIInterfaceOrientationMaskAll;//Which is actually a default value
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    NSLog(@" preferred called");//This method is never called. WHY?
    return UIInterfaceOrientationLandscapeRight;
}
Run Code Online (Sandbox Code Playgroud)

正如你所看到的那样,我试图在首选方法中返回横向,但它永远不会被调用.ps文档说明:

讨论系统在全屏显示视图控制器时调用此方法.当视图控制器支持两个或更多方向时,您可以实现此方法,但内容在其中一个方向中最佳.

如果视图控制器实现此方法,则在显示时,其视图将以首选方向显示(尽管稍后可以将其旋转到另一个受支持的旋转).如果未实现此方法,系统将使用状态栏的当前方向显示视图控制器.

所以,问题是:为什么永远不会调用prefferredOrientation方法?我们应该如何在不同的控制器中处理不同的方向?谢谢!PS不会将问题标记为重复.我调查了所有类似的问题,他们没有我的答案.

iphone objective-c uiinterfaceorientation ios6

23
推荐指数
2
解决办法
2万
查看次数

如何在iOS中处理不同的方向

增加:您可以在github ios6rotations上访问此项目


很抱歉在iOS 6中询问有关屏幕旋转的问题,但这确实是一个痛苦的问题.我仍然无法完全理解它 - 由于某种原因,它在某些情况下表现不同.

我的测试应用程序中有以下简单的视图层次结构:

我想要实现的是 - 将蓝色控制器仅保留在风景中,红色控制器仅保留在纵向中.

我有一个UINavigationController的子类,里面有这样的代码:

@implementation CustomNavController

- (BOOL)shouldAutorotate
{
    return [[self.viewControllers lastObject] shouldAutorotate];
}

- (NSUInteger)supportedInterfaceOrientations
{
    return  [[self.viewControllers lastObject] supportedInterfaceOrientations];
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return [[self.viewControllers lastObject] preferredInterfaceOrientationForPresentation];
}

@end
Run Code Online (Sandbox Code Playgroud)

在我的蓝色控制器中我实现了这个:

- (BOOL)shouldAutorotate {
    return YES;
}

- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskLandscape;
}
Run Code Online (Sandbox Code Playgroud)

而在红色控制器这:

- (BOOL)shouldAutorotate {
    return YES;
}

- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskPortrait;
}
Run Code Online (Sandbox Code Playgroud)

现在我有以下行为:

  1. 应用程序从横向开始(OK)
  2. 当我按下按钮时,我的红色控制器也在景观中推入(这不好,因为它必须以肖像显示)
  3. 它成功旋转到纵向但不向后旋转到横向
  4. 如果我将红色控制器置于纵向模式,我的蓝色控制器(仅限于横向)将以纵向模式显示.

PS所有我的旋转方法(上面发布的)都被正常调用.(顺便说一下为什么这些方法每次屏幕转换被调用这么多次 - 5-6次)

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation 没有被推动调用

所有(portraitUpsideDown除外)方向都包含在plist中.

问题是 - …

iphone objective-c rotation ios

19
推荐指数
2
解决办法
1万
查看次数

iOS 6社交集成 - 转到设置问题

我正在尝试将Facebook共享程序集成到我的应用程序中.我这样使用UIActivityViewController:

NSArray * activityItems = @[self.imgView.image, self.txtField.text];
UIActivityViewController * activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:nil];
[self presentViewController:activityVC animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)

直到现在一切都运转良好.但我遇到了这样的问题 - 当我点击Facebook图标并进入Facebook共享屏幕时,会出现alertView:

在此输入图像描述

所以问题是 - 当我点击设置我的控制器刚被解雇,没有任何反应.对于Twitter,一切运行良好 - 当点击"设置"按钮时,我的应用程序将进入后台并打开"设置".为什么这对Facebook无效?任何帮助都会得到满足.

增加:使用SLComposeViewController导致相同的行为 - 设置无法打开

iphone facebook objective-c

12
推荐指数
1
解决办法
5565
查看次数

GKPeerPickerController已在iOS 7中弃用

我需要允许在两个设备之间通过蓝牙进行数据交换的功能.我知道GKPeerPickerController用于此目的.但是自iOS 7以来,这个类已被弃用.互联网搜索和文档都没有说明要使用的内容(通常如此).有什么建议?

GKPeerPickerController类参考

iphone bluetooth objective-c ios7

11
推荐指数
1
解决办法
2571
查看次数

设置图像的UIButton方法之间的区别

请告诉我两个UIButton方法之间的区别是什么:

- (void)setBackgroundImage:(UIImage *)image forState:(UIControlState)state
Run Code Online (Sandbox Code Playgroud)

- (void)setImage:(UIImage *)image forState:(UIControlState)state
Run Code Online (Sandbox Code Playgroud)

Apple文档没有提及它.

uibutton ios

8
推荐指数
1
解决办法
3120
查看次数

我们何时使用ACAccountStore类的saveAccount:(ACAccount*)帐户?

请告诉我什么时候使用这种方法? - (void)saveAccount:(ACAccount *)account withCompletionHandler:(ACAccountStoreSaveCompletionHandler)completionHandler

据我所知,我们可以通过OAuth访问该帐户,但我们无法获得用户的凭据.那么我们如何创建一个帐户呢?我发现ACAccount只有一种创建方法: - (id)initWithAccountType:(ACAccountType *)type 当我们以这种方式创建帐户时会发生什么?我们现在可以保存吗?

iphone facebook objective-c ios

7
推荐指数
1
解决办法
2150
查看次数