iOS Bug收集

weixin_33924312發表於2016-02-16

1.崩潰資訊如下:

 Collection <__NSSetM: 0x146d47df0> was mutated while being enumerated.

在遍歷set時,對set做了操作(刪除或修改),發生崩潰。
修復辦法:

[aMutableSet enumerateObjectsUsingBlock:^(id  _Nonnull obj, BOOL * _Nonnull stop) {
            if (滿足條件)
            {
                *stop = YES;
                [aMutableSet removeObject:obj];
            }
        }];

2.釋出app時,報如下錯誤:

Xcode 7 error: “Missing iOS Distribution signing identity for …”

解決辦法如下:

1.Download https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
2.Double-click to install to Keychain.
3.Then in Keychain, Select View -> "Show Expired Certificates" in Keychain app.
4.It will list all the expired certifcates.
5.Delete "Apple Worldwide Developer Relations Certificate Authority certificates" from "login" tab
6.And also delete it from "System" tab.

這樣就好了。

參考:

http://stackoverflow.com/questions/32821189/xcode-7-error-missing-ios-distribution-signing-identity-for

3.web頁面呼叫相簿或相機
報錯如下:

Warning: Attempt to present <UIImagePickerController: 0x12734be00> on <MBTabBarVC: 0x1270fc000> whose view is not in the window hierarchy!

解決辦法:在自定義的tab頁面中過載下面方法。

-(void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion
{
    if ( self.presentedViewController)
    {
        [super dismissViewControllerAnimated:flag completion:completion];
    }
}

未完,待續...

相關文章