我在使用 CI 机器时将我的应用程序发布到 firebase 分发抛出 Fastlane。我面临着 2FA 的问题。
我使用 Match 来检索我的证书。这是我在“Appfile”下的内容
app_identifier "com.example.example" # the bundle
apple_id "appleAcount@gmail.com" # Your Apple
team_id "abcd..." # Developer Portal Team ID
ENV["FASTLANE_USER"] = "appleAcount@gmail.com"
ENV["MATCH_PASSWORD"] = ""
ENV["FASTLANE_PASSWORD"] = ""
ENV["FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD"] = ""
Run Code Online (Sandbox Code Playgroud)
这是我收到的错误:
帐户“appleAcount@gmail.com”已启用双因素身份验证(6 位代码)有关双因素身份验证的更多信息:https : //support.apple.com/en-us/HT204915
如果您在非交互式会话(例如服务器或 CI)中运行它,请查看 https://github.com/fastlane/fastlane/tree/master/spaceship#2-step-verification
(输入
sms以逃避此提示并选择受信任的电话号码以将代码作为短信发送)(您还可以设置环境变量
SPACESHIP_2FA_SMS_DEFAULT_PHONE_NUMBER以自动执行此操作)(阅读更多信息:https : //github.com/fastlane/fastlane/blob/master/spaceship/docs/Authentication.md#auto-select-sms-via-spaceship_2fa_sms_default_phone_number )请输入 6 位代码:
我读过这篇“https://docs.fastlane.tools/best-practices/continuous-integration/”但没有运气。谁能帮我解决这个问题?
我的centralManger对象有问题,可以正常连接和断开与外围设备的连接,效果很好。配对2个外围设备后,半小时(或多或少)后,centralManger状态变为“ CentralManagerStateResetting”,这导致我的外围设备自动断开连接,而未调用委托:didDisconnectPeripheral。
这来自苹果公司的文档:@constant CBCentralManagerStateResetting与系统服务的连接暂时丢失,即将更新。
在所有iPhone中查看并在iOS 9+版本中签入
我在UIViewController中有一个UICollectionView。collectionView包含一个故事板中的8个视图控制器标识符数组。数组中的每个视图控制器均从保存collectionView的UIViewController继承。
这是代码:
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
return _contentPageRestorationIDs.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cell" forIndexPath:indexPath];
BaseContentViewController *contentViewController = (BaseContentViewController *)[self.storyboard instantiateViewControllerWithIdentifier:self.contentPageRestorationIDs[indexPath.row]];
// Set any data needed by the VC here
contentViewController.rootViewController = self;
contentViewController.view.frame = cell.bounds;
[cell addSubview:contentViewController.view];
return cell;
}
Run Code Online (Sandbox Code Playgroud)
所以我的问题是我的收藏夹视图滑动性能确实很慢。如何提高UICollectionView的性能?不显示单元格中的视图控制器时,它们是否被“杀死”?
编辑:
根据这里的建议,我将数组更改为持有视图控制器,而不是标识符nsstring。
在ViewDidLoad中:
_collectionView.delegate=self;
_collectionView.dataSource=self;
PRzeroVC *zeroVC = [[PRzeroVC alloc]init];
PRoneVC *oneVC = [[PRoneVC alloc]init];
PRtwoVC *twoVC = [[PRtwoVC alloc]init];
PRthreeVC *threeVC = [[PRthreeVC alloc]init];
PRfourVC *fourVC = [[PRfourVC alloc]init]; …Run Code Online (Sandbox Code Playgroud) objective-c uiviewcontroller ios uicollectionview uicollectionviewcell