小编MAh*_*ngh的帖子

Info.plist中的CFBundleVersion上传错误

"您上传的二进制文件无效.Info.plist文件中的密钥CFBundleVersion必须包含比以前上传版本更高的版本."

当我上传我的应用程序时,我收到此错误.

我在iTunes Connect上将更新版本设置为1.2,并且还将.plist文件更新为1.2.

我不明白为什么我会收到这个错误.任何帮助,将不胜感激.谢谢.

upload objective-c plist cfbundleidentifier

108
推荐指数
6
解决办法
6万
查看次数

使用UITableViewAutomaticDimension更新UITableViewCell后的生涩滚动

我正在构建一个具有用户提交帖子的Feed视图的应用.此视图具有UITableView自定义UITableViewCell实现.在这个单元格中,我有另一个UITableView用于显示注释.要点是这样的:

Feed TableView
  PostCell
    Comments (TableView)
      CommentCell
  PostCell
    Comments (TableView)
      CommentCell
      CommentCell
      CommentCell
      CommentCell
      CommentCell
Run Code Online (Sandbox Code Playgroud)

初始订阅源将下载3条评论进行预览,但如果有更多评论,或者用户添加或删除评论,我想PostCell通过添加或删除CommentCells评论表内部来更新Feed表视图内的位置的PostCell.我目前正在使用以下帮助程序来完成此任务:

// (PostCell.swift) Handle showing/hiding comments
func animateAddOrDeleteComments(startRow: Int, endRow: Int, operation: CellOperation) {
  let table = self.superview?.superview as UITableView

  // "table" is outer feed table
  // self is the PostCell that is updating it's comments
  // self.comments is UITableView for displaying comments inside of the PostCell
  table.beginUpdates()
  self.comments.beginUpdates()

  // This function handles …
Run Code Online (Sandbox Code Playgroud)

uitableview ios swift ios8

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

Xcode 7 ERROR ITMS-90474:"无效的捆绑包",无法提交给Apple

我有一个应用程序我想提交给Apple.我已经验证了它.我正在使用Xcode 7和Swift 2.当我尝试提交给Apple时,我收到以下错误:

ERROR ITMS-90474:"捆绑无效.iPad多任务支持需要有方向:'UIInterfaceOrientationPortrait,UIIinterfaceOrientationPortraitUpsideDown,UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight'.在捆绑中找到'UIInterfaceOrientationPortrait'.

我该怎么办?我用他们要求的名字制作一些图像吗?

xcode bundle xcode7

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

带动画的UITableview reloaddata

我有一个UItableview,它从数组和下拉列表中填充.如果我选择任何下拉列表行,则将插入具有新值的数组,并且应重新加载tableview.如何使用新的数组内容为tableview设置动画?提前致谢

动画,我想逐一显示行.我尝试过这种方法

- (void)reloadRowsAtIndexPaths:(NSArray )indexPaths withRowAnimation:(UITableViewRowAnimation)animation { 
NSIndexPath rowToReload = [NSIndexPath indexPathForRow:[names count] inSection:0];
 NSArray* rowsToReload = [NSArray arrayWithObjects:rowToReload, nil]; 
[tableDetails reloadRowsAtIndexPaths:rowsToReload withRowAnimation:UITableViewRowAnimationNone];
 }
Run Code Online (Sandbox Code Playgroud)

uitableview reloaddata ios

68
推荐指数
6
解决办法
8万
查看次数

如何将HTML插入UIWebView

我有HTML内容,正在显示UITextView.我的应用程序的下一次迭代是将HTML内容显示为UIWebView.所以,我基本上取代了我UITextViewUIWebView.但是,我无法弄清楚如何将我的HTML片段插入到视图中.它似乎需要一个URLRequest我不想要的东西.我已经将HTML内容存储在内存中,并希望从内存中加载和显示它.

有什么想法我应该继续吗?

iphone uiwebview ipad

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

Sandbox试图恢复耗材IAP

我一直在尝试在iOS上测试一些可消耗的IAP,我收到一个奇怪的错误.弹出一个警告:

"此应用内购买已经被购买.它将免费恢复.[环境:沙箱]"

我已经检查过了,我确定我的IAP可以在iTunesConnect中使用.似乎我的验证过程以某种方式失败,但我不希望这个错误消息.有人对这个有经验么?

objective-c in-app-purchase ios

5
推荐指数
2
解决办法
2468
查看次数

AVAssetExportSession无法创建文件错误-12115

出于某种原因,我总是收到此错误:

错误域= NSURLErrorDomain代码= -3000"无法创建文件"UserInfo = {NSLocalizedDescription =无法创建文件,NSUnderlyingError = 0x1321dd730 {错误域= NSOSStatusErrorDomain代码= -12115"(null)"}}

尝试将AVSession导出到m4a时.这在我的同事设备上运行良好,但每次在我的iPad Air 2(iOS 9.1)以及我们的QA iPad Mini 3上都会失败.

- (void)processSourceVideoFile:(NSURL *)mediaURL completion:(void (^)(BOOL success))completion {
    [self showProgressOverlay];

    NSString *outputFileType = AVFileTypeMPEG4;

    __block NSString *videoID = nil;
    if (self.videoAttachment == nil) {
        [MagicalRecord saveUsingEditContextWithBlockAndWait:^(NSManagedObjectContext *localContext) {
            self.videoAttachment = [SPXAttachment MR_createEntityInContext:localContext];
            self.videoAttachment.uuid = [NSString uuid];
            self.videoAttachment.clientCreatedAt = [NSDate date];
            videoID = self.videoAttachment.uuid;
        }];
    } else {
        videoID = self.videoAttachment.uuid;
    }

    self.videoAttachment = [SPXAttachment MR_findFirstByAttribute:@"uuid" withValue:videoID];

    NSString *targetPath = self.videoAttachment.filePath;
    DDLogVerbose(@"Exporting Video …
Run Code Online (Sandbox Code Playgroud)

m4a avfoundation ios avassetexportsession avasset

5
推荐指数
1
解决办法
1392
查看次数

检测AVPlayerViewController完成按钮点击?

AVPlayer在ios中写插件.我需要知道用户何时单击" 完成"按钮AVPlayerViewController(我想知道用户何时关闭视频)并且我无法访问AVPlayerViewController对象.我检查了事件,发现只有AVPlayer设置为0的速率属性,但在暂停情况下,速率设置为0.我怎么弄清楚这两种情况?谢谢大家.

objective-c ios avplayer avplayerviewcontroller

5
推荐指数
1
解决办法
2785
查看次数

以编程方式使用约束来集中UIIMageView

我正在开发一个iOS项目,我需要以编程方式为我的视图使用约束.我已经习惯了故事板,但由于项目规范的性质,我正在为这个特定项目使用xib.

我有一个MainViewController,在其中我在.h文件中创建以下属性:

@property (nonatomic, strong) IBOutlet UIImageView *backgroundImageView;
@property (nonatomic, strong) IBOutlet UIImageView *logoImage;
Run Code Online (Sandbox Code Playgroud)

我将这些UIImageView实例添加到我的XIB文件中,并通过Attributes检查器选择了适当的图像.

在我的.m文件中,我有一个addConstraints方法,它被调用viewDidLoad.在此方法中,我确保关闭将autoresizingMasks转换为约束:

self.backgroundImageView.translatesAutoresizingMaskIntoConstraints = NO;
self.logoImage.translatesAutoresizingMaskIntoConstraints = NO;
Run Code Online (Sandbox Code Playgroud)

然后,我设置了约束,以便背景图像占据整个superview:

id mainView = @{@"background": self.backgroundImageView};

//Set constraints so that the background takes up the entirety of the superview
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[background]|" options:0 metrics:nil views:mainView]];
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[background]|" options:0 metrics:nil views:mainView]];
Run Code Online (Sandbox Code Playgroud)

最后,我设置了约束,以便徽标视图位于视图的中心(这是我出错的地方):

// Width constraint
[self.view addConstraint:[NSLayoutConstraint constraintWithItem:self.logoImage
                                                 attribute:NSLayoutAttributeWidth
                                                 relatedBy:NSLayoutRelationEqual
                                                    toItem:self
                                                 attribute:NSLayoutAttributeWidth
                                                multiplier:0.5
                                                  constant:0]];

// Height constraint
[self.view addConstraint:[NSLayoutConstraint constraintWithItem:self.logoImage
                                                 attribute:NSLayoutAttributeHeight
                                                 relatedBy:NSLayoutRelationEqual …
Run Code Online (Sandbox Code Playgroud)

objective-c xib uiimageview ios autolayout

4
推荐指数
1
解决办法
7398
查看次数

iOS应用程序(WatchKit)需要1024x1024应用程序商店图标

我开始遇到Xcode 9.1(9B55)的问题.在我上次提交到应用程序商店的存档中,它现在抱怨我的WatchKit应用程序上的1024x1024应用程序商店图标.

即使我已经在几周前添加了正确的iPhone,并且一直在为其他提交工作.

我删除了应用图标,重新添加; 甚至创建了一个新的png版本,看它是否是一个透明度问题.什么都行不通,它一直在说我错过了它.

我甚至已经删除了存储所有大小的AppIcon,并重新整理了所有内容.

添加图标时,除1024x1024外,每个尺寸警告都会消失.

我在这里缺少什么,这可能是一个Xcode 9错误?

缺少App Store图标 - WatchOS应用程序必须包含PNG格式的1024x1024px App Store图标.如果未在资产目录中或通过iTunes Connect提供图标,则无法提交应用程序以进行App Review或Beta App Review. 有关更多信息,请参阅 https://developer.apple.com/watchos/human-interface-guidelines/icons-and-images/home-screen-icons/.

xcode ios watchkit

4
推荐指数
1
解决办法
3379
查看次数

openURL和canOpenURL之间的区别

我需要在野生动物园浏览器中打开链接,但我不确定,应该使用哪种方法? openURL/opencanOpenURL。谁能帮我解释一下这两种功能之间的实际区别是什么?

 if #available(iOS 10.0, *) {
       UIApplication.shared.open(URL(string: urlStr)!, options: [:], completionHandler: nil)
       UIApplication.shared.canOpenURL(URL(string: urlStr)!)

    } else {
        UIApplication.shared.openURL(URL(string: urlStr)!) //introduced: 2.0, deprecated: 10.0,

        UIApplication.shared.canOpenURL(URL(string: urlStr)!) // available(iOS 3.0, *)
    }
Run Code Online (Sandbox Code Playgroud)

openurl ios swift

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

找不到作曲家运行时安装错误卡peerAdmin

我一直遵循教程的要求,直到遇到错误为止

错误:找不到卡:PeerAdmin @ hlfv1

在下面的命令中:

 composer runtime install --card PeerAdmin@hlfv1 --businessNetworkName tutorial-network
Run Code Online (Sandbox Code Playgroud)

本教程说,通常必须创建一个peerAdmin身份,但他们已经创建了一个。

hyperledger hyperledger-fabric hyperledger-composer

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

使用 python 请求访问 Sonarqube Webapi

我很新pyhton。我只是尝试一种简单的方法来HTTP使用 python 来从声纳 Web API 中获取简单的响应

我使用请求库并尝试简单的使用:

project = requests.get(url=Sonar_Api_Projects_Search, params=param_Projects, verify=False, headers={'Authorization': 'token {}'.format(token)})
Run Code Online (Sandbox Code Playgroud)

该请求格式良好,当我在网络浏览器中使用它时工作正常。

但作为回应,我得到了这个奇怪的输出:

{“err_code”:500,“err_msg”:“未定义方法empty?' for nil:NilClass\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/lib/authenticated_system.rb:132:in login_from_basic_auth'\n\torg/jruby/RubyProc.java:290:调用中 call'\n\torg/jruby/RubyProc.java:224:in '\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/ gems/gems/actionpack-2.3.15/lib/action_controller/http_authentication.rb:126:inauthenticate_with_http_basic authenticate'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/http_authentication.rb:116:in '\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/lib/authenticated_system.rb:129:in login_from_basic_auth'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/lib/authenticated_system.rb:11:in current_user'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/app/controllers/application_controller.rb:102:inset_user_session'\n\torg/jruby/RubyKernel.java:2223:in 发送'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF /gems/gems/activesupport-2.3.15/lib/active_support/callbacks.rb:178 evaluate_method'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/activesupport-2.3.15/lib/active_support/callbacks.rb:166:in :在通话中'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3。 15/lib/action_controller/filters.rb:225:在 call'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:629:in run_before_filters'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb :615:在 call_filters'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:610:in perform_action_with_filters'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68:以 perform_action_with_benchmark'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/activesupport-2.3.15/lib/active_support/core_ext/benchmark.rb:17:in 毫秒'\n\ tjar:文件:/D:/sonarqube-5.6.6_20170214/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/1.8/benchmark.rb:308:in realtime'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/activesupport-2.3.15/lib/active_support/core_ext/benchmark.rb:17:in ms'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/benchmarking.rb:68:in perform_action_with_benchmark'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/rescue.rb:160:in Perform_action_with_rescue'\n\tD:/sonarqube -5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/flash.rb:151:发送perform_action_with_flash'\n\torg/jruby/RubyKernel.java:2223:in '\n\tD:/sonarqube-5.6.6_20170214/web/WEB- INF/gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:532:in process'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/filters.rb:606:in process_with_filters'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3 .15/lib/action_controller/base.rb:391:调用中 process'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/base.rb:386:in '\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/routing/ route_set.rb:450:在 call'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:87:in 调度'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:85:在 dispatch'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:121:in _call' \n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:130:调用 build_middleware_stack'\n\torg/jruby/RubyProc.java:290:in '\n\torg/jruby/RubyProc。 java:224: call'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:29:in 调用'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in cache'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:9:in 缓存'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/query_cache.rb:28: call'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in 调用中'\n\tD:/sonarqube -5.6.6_20170214/web/WEB-INF/config/environment.rb:67:调用中 call'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/string_coercion.rb:25:in '\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/rack-1.1.6/ lib/rack/head.rb:9:在上下文中'\n\tD:/sonarqube-5.6.6_20170214/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/session/abstract/id .rb:58:in …

python python-requests sonarqube

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