046夷蚊、
這時(shí)候你可以給華夏鄧白氏打電話,詢(xún)問(wèn)你的申請(qǐng)的流程走到哪一步,是否收到你的申請(qǐng)
找到華夏鄧白氏官網(wǎng)的電話打過(guò)去, 他們會(huì)一個(gè)推一個(gè)的, 經(jīng)過(guò)幾次推諉(寶寶表示不開(kāi)心), 最后,下面的電話你可以咨詢(xún)的到
已經(jīng)驗(yàn)證過(guò)了,這個(gè)電話可以咨詢(xún)鄧白氏申請(qǐng)狀態(tài)略步。
045罐寨、team id
0043/
青花瓷抓包
鄭重提醒, iOS10.3的真機(jī)抓包https, 在手機(jī)設(shè)置唇辨,關(guān)于本機(jī),最下邊有一個(gè)證書(shū)信任能耻,必須打開(kāi)charles的證書(shū)信任赏枚,才能抓包亡驰,而且,掛證書(shū)的api貌似抓不到包饿幅,只顯示?凡辱, 只有不掛證書(shū)的才能抓到
0042
ios app無(wú)法驗(yàn)證其完整性
是因?yàn)閁DID問(wèn)題,開(kāi)發(fā)者描述文件沒(méi)有包含這個(gè)手機(jī)UDID
0041
ld: in /Users//Downloads/DVoiceSend-master/lib/iflyMSC.framework/iflyMSC(IFlyZipData.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users//Downloads/DVoiceSend-master/lib/iflyMSC.framework/iflyMSC' for architecture arm64
PS:直接把VALID_ARCHS的value刪了也能編譯成功栗恩,但是我這邊運(yùn)行會(huì)報(bào)沒(méi)有權(quán)限訪問(wèn)項(xiàng)目.app文件的錯(cuò)
在項(xiàng)目Target——Build Settings里找到它
在VALID_ARCHS中加入了x86_64之后我這里就可以正常運(yùn)行了
0040
//設(shè)備名稱(chēng)
? ? NSString* deviceName = [[UIDevice currentDevice] systemName];
? ? NSLog(@"設(shè)備名稱(chēng): %@",deviceName );
? ? //手機(jī)系統(tǒng)版本
? ? NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];
? ? NSLog(@"手機(jī)系統(tǒng)版本: %@", phoneVersion);
? ? //手機(jī)型號(hào)
? ? NSString* phoneModel = [[UIDevice currentDevice] model];
0039
插入視圖層級(jí)
將一個(gè)UIView顯示在最前面只需要調(diào)用其父視圖的 bringSubviewToFront()方法透乾。
將一個(gè)UIView層推送到背后只需要調(diào)用其父視圖的 sendSubviewToBack()方法。
開(kāi)發(fā)者賬號(hào)過(guò)期不能打包
需要更新一下相關(guān)證書(shū)就行了磕秤。
need-to-insert-img
0038乳乌、
dispatch_barrier_sync的作用是阻塞當(dāng)前線程,把queue中的所有任務(wù)執(zhí)行完畢之后市咆,再去執(zhí)行barrier的block
dispatch_barrier_async不阻塞當(dāng)前線程汉操,調(diào)用之后,立即返回當(dāng)前線程床绪,繼續(xù)執(zhí)行后面的代碼客情。
0037、刪除多余證書(shū)
1癞己、刪除Xcode中多余的Provisioning Profile證書(shū)
前往文件夾:~/Library/MobileDevice/Provisioning Profiles膀斋,手動(dòng)刪除其中的配置文件。
如果誤刪痹雅,進(jìn)入開(kāi)發(fā)者中心仰担,下載需要的Provisioning Profile文件,導(dǎo)入Xcode即可绩社。
2摔蓝、刪除Xcode中的code signing identity中的多余證書(shū)
方法:打開(kāi)鑰匙串訪問(wèn),刪除相應(yīng)的證書(shū)即可愉耙。
0人點(diǎn)贊
0036贮尉、
Permission denied Command PhaseScriptExecution failed with a nonzero exit code
xcode 編譯遇到這樣的情況 :
Permission denied Command PhaseScriptExecution failed with a nonzero exit code
一些老項(xiàng)目在pod 時(shí),會(huì)出現(xiàn)編譯失敗的會(huì)出現(xiàn)朴沿,嘗試手動(dòng)清理總是不徹底猜谚,一個(gè)有效的解決方式是安裝 pods 清理工具,然后cd到項(xiàng)目赌渣,清理項(xiàng)目中 pods 的關(guān)聯(lián)后魏铅,再重新
pod install
0035、設(shè)置圓角
? ? dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
? ? ? ? kkvipV.layer.mask = [[YBToolClass sharedInstance] setViewLeftTop:13 andRightTop:13 andView:kkvipV];
? ? ? ? });
0034/
(1)通過(guò) range 來(lái)設(shè)置
NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"點(diǎn)擊代表您已閱讀并同意用戶規(guī)則和協(xié)議"];
[str addAttribute:NSForegroundColorAttributeName value:[UIColor orangeColor] range:NSMakeRange(0,11)];
[str addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(11,4)];
[str addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(16,2)];
label.attributedText = str;
0033/
Trapped uncaught exception 'NSInternalInconsistencyException', reason: 'could not dequeue a view of kind: UICollectionElementKindCell with identifier KKPlazaHomeCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
需要在UICollectionView 創(chuàng)建之后才能 注冊(cè)cell坚芜。
0032览芳、
編譯報(bào)錯(cuò):ld: symbol(s) not found for architecture x86_64
出現(xiàn)這個(gè)問(wèn)題的原因如下:
可能是該靜態(tài)庫(kù)不支持在模擬器下編譯,可使用真機(jī)或GenericiOS Device,一般就不會(huì)出現(xiàn)這個(gè)錯(cuò)誤了;
從錯(cuò)誤信息的""_OBJC_CLASS_$_FMDataBase",referenced from:"能夠看出,是缺少FMDataBase文件的引用;解決方法:在Build Phases-->CompileSources(items)中,添加報(bào)錯(cuò)的.m文件,點(diǎn)左下角的"+",在彈出框中找到報(bào)錯(cuò)的.m文件,選中add,添加漏掉的.m文件
刪除重復(fù)引用的文件
4. pod的某個(gè)庫(kù)的版本審核之后, pod install后, pod項(xiàng)目文件夾沒(méi)改庫(kù)的文件了
刪掉pod工程,重新安裝pod
0031、
UserInterfaceState.xcuserstate? 和.git中有UIwebView 不會(huì)影響到IPA包審核
但各種第三方庫(kù)是必須不能有UIwebView的
0030
updating apps that use web views
蘋(píng)果禁用UIwebView
打開(kāi)終端鸿竖,cd到項(xiàng)目根目錄沧竟。
執(zhí)行以下命令铸敏,就能查找到哪些文件內(nèi)還在使用UIWebview。
grep -r UIWebView .
效果如下:
$ grep -r UIWebView .
Binary file ./proj.ios/wechatSDK/libWeChatSDK.a matches
Binary file ./proj.ios/ThreeCards.xcodeproj/project.xcworkspace/xcuserdata/kktoo.xcuserdatad/UserInterfaceState.xcuserstate matches
0029
~/Library/Developer/Xcode/DerivedData/
0028屯仗、
layer 渲染不全有留白
AVPlayerLayer
? ? ? ? layer.videoGravity = AVLayerVideoGravityResize;
0027搞坝、
移除添加的子layer
//? ? self.kkAddVideoBtn.layer.sublayers = nil;//這個(gè)方法會(huì)崩潰
只能添加時(shí)保存在數(shù)組中,然后調(diào)用這個(gè)方法
? ? [self.kkVideoLayerArr makeObjectsPerformSelector:@selector(removeFromSuperlayer)];
0026魁袜、
? ? ? ? NSRange range = [kkdata.content rangeOfString:@"@" options:NSBackwardsSearch];
//? ? ? ? NSString *kk = [kkdata.content substringToIndex:range.location];//截取指定字符串之前的字符
//截取指定字符串之后的字符
? ? ? ? NSString *kkContent = [kkdata.content substringFromIndex:range.location + 1];
0025桩撮、
/// 添加四邊陰影效果
// 陰影顏色
theView.layer.shadowColor = theColor.CGColor;
// 陰影偏移,默認(rèn)(0, -3)
theView.layer.shadowOffset = CGSizeMake(0,0);
// 陰影透明度峰弹,默認(rèn)0
theView.layer.shadowOpacity = 0.5;
// 陰影半徑店量,默認(rèn)3
theView.layer.shadowRadius = 5;
0024、
我們可以通過(guò)一下方法鞠呈,可以把工程中所有的字體打印出來(lái)融师,包括我們手動(dòng)導(dǎo)入的第三方字體;
for(NSString *fontfamilyname in [UIFont familyNames])
{
? ? NSLog(@"family:'%@'",fontfamilyname);
? ? for(NSString *fontName in [UIFont fontNamesForFamilyName:fontfamilyname])
? ? {
? ? ? ? NSLog(@"\tfont:'%@'",fontName);
? ? }
? ? NSLog(@"-------------");
}
蘋(píng)方提供了六個(gè)字重蚁吝,font-family 定義如下:
蘋(píng)方-簡(jiǎn) 常規(guī)體
font-family: PingFangSC-Regular, sans-serif;
蘋(píng)方-簡(jiǎn) 極細(xì)體
font-family: PingFangSC-Ultralight, sans-serif;
蘋(píng)方-簡(jiǎn) 細(xì)體
font-family: PingFangSC-Light, sans-serif;
蘋(píng)方-簡(jiǎn) 纖細(xì)體
font-family: PingFangSC-Thin, sans-serif;
蘋(píng)方-簡(jiǎn) 中黑體
font-family: PingFangSC-Medium, sans-serif;
蘋(píng)方-簡(jiǎn) 中粗體
font-family: PingFangSC-Semibold, sans-serif;
0023旱爆、
禁止交互
? ? [[UIApplication sharedApplication] beginIgnoringInteractionEvents];
? ? [[UIApplication sharedApplication] endIgnoringInteractionEvents];? //啟用交互
0022、
Invalid App Store Icon. The App Store Icon in the asset catalog in xxxx.app can't be transparent nor contain an alpha channel.
根據(jù)錯(cuò)誤提示, AppIcon 圖標(biāo)包含了透明度,才導(dǎo)致了包的上傳失敗. 后面我查看了AppIcon中添加的圖片, 發(fā)現(xiàn)有一張1024 x 1024@1x的圖標(biāo)帶有alpha透明度.
解決辦法:
1.用系統(tǒng)自帶的"預(yù)覽"軟件打開(kāi)圖標(biāo);
2.菜單欄文件->導(dǎo)出;
3.將alpha的選項(xiàng)的勾去掉;
4.將新導(dǎo)出的圖片添加到Xcode,再打包上傳即可.
0021窘茁、
CUICatalog: Invalid asset name supplied: '(null)'
簡(jiǎn)明扼要怀伦,XCode打印這個(gè)對(duì)程序沒(méi)什么影響,
Xcode打印的這個(gè)提示是[UIImage imageNamed:@""]這個(gè)方法傳入的照片名字為空山林,是無(wú)效資源名稱(chēng)房待,全局搜索imageNamed:看到有傳空的自己替換一下就可以了,當(dāng)然你也是可以不替換的驼抹。
0020
2020-04-17 13:15:24.279220+0800 [999:430633] *** -[JPUSHReachability retain]: message sent to deallocated instance 0x283ea7720
-[NSNull rangeOfCharacterFromSet:]: unrecognized selector sent to instance 0x1e08dfc30
0019桑孩、
? ? ? ? cell.selectionStyle = UIAccessibilityTraitNone;
? ? ? ? cell.backgroundColor = KKWhiteColor;
tableView的選中狀態(tài)或顏色
0018、
繪制邊框
? ? ? ? cell.imgRight.layer.borderColor =[UIColor colorWithHexString:@"#E11D5E"].CGColor;
? ? ? ? cell.imgRight.layer.borderWidth = 1;
0017框冀、
最新的庫(kù)3.2.0 JPGCDExtensions.m 訪問(wèn)了私有API _dispatch_benchmark.
把版本回退到3.1.1就行了
We identified one or more issues with a recent delivery for your app, "" 1.0 (2). Please correct the following issues, then upload again.
ITMS-90338: Non-public API usage - The app references non-public symbols in Frameworks/JPVideoPlayer.framework/JPVideoPlayer: _dispatch_benchmark. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
0016流椒、透明度問(wèn)題
? ? kkOnLinePersonBtn.backgroundColor = [KKBlackTitleLabColor colorWithAlphaComponent:0.2];//設(shè)置父視圖透明而子視圖不受影響
? ? ? ? bgView.backgroundColor = [[UIColor colorWithHexString:@"1A1A1A "] colorWithAlphaComponent:0.4];? ? ? ?
0015、
一般情況下報(bào)masonry約束錯(cuò)誤明也,可能是設(shè)置約束之前镣隶,子控件沒(méi)有添加到父視圖上。
0014
1诡右、多層視圖嵌套事件沖突問(wèn)題,
底層視圖A scrollview轻猖,添加了子視圖B collectionviewview帆吻,視圖B 的headerview又添加了視圖C,視圖C又添加了多個(gè)子視圖D咙边,在視圖D中需要添加滾動(dòng)視圖E collectionview猜煮,當(dāng)我把視圖E添加至視圖D中時(shí)發(fā)現(xiàn)其點(diǎn)擊事件和滾動(dòng)事件都無(wú)法響應(yīng)了次员,
1、分析王带,以為是和底層視圖A沖突了淑蔚,排查了一遍發(fā)現(xiàn)不是,又懷疑是視圖D無(wú)法響應(yīng)事件或是其他父視圖問(wèn)題愕撰,排查后發(fā)現(xiàn)又不是
2刹衫、當(dāng)我把視圖E添加至C視圖時(shí),響應(yīng)了一下搞挣,之后就不行了带迟,懷疑是所添加的父視圖的問(wèn)題,然后又是一陣排查囱桨,發(fā)現(xiàn)添加到了C視圖也不行仓犬,又懷疑是創(chuàng)建E視圖的代碼問(wèn)題,排查一遍又寫(xiě)了個(gè)demo舍肠,發(fā)現(xiàn)不是這個(gè)問(wèn)題
3搀继、當(dāng)我更改E視圖的frame時(shí)發(fā)現(xiàn),有時(shí)能響應(yīng)事件翠语,有時(shí)不能叽躯,然后就懷疑是設(shè)置的frame問(wèn)題,可能是masonry布局導(dǎo)致的啡专,排查過(guò)一遍后险毁,發(fā)現(xiàn)不是這個(gè)問(wèn)題,
4们童、排查問(wèn)題的過(guò)程中發(fā)現(xiàn)設(shè)置E視圖位置靠上的時(shí)候能響應(yīng)事件磷籍,反之則不能菩咨,然后懷疑還是父視圖的問(wèn)題,重新查看視圖層級(jí),排查每個(gè)父視圖的情況痒谴,然后發(fā)現(xiàn)視圖C的高度小于視圖E的frame,也就是說(shuō)父視圖沒(méi)有完全包裹住子視圖采章,部分子視圖超出了父視圖的frame坐標(biāo)惧笛,原來(lái)如此,最終原因找到了甘磨,我在控制器內(nèi)設(shè)置視圖B的headerview的高度橡羞,以為這樣就相當(dāng)于同時(shí)設(shè)置了視圖C 的高度,排查中發(fā)現(xiàn)济舆,控制器內(nèi)初始化C視圖時(shí)給了他一個(gè)高度卿泽,只設(shè)置視圖B header的高度是不夠的。真是氣煞我也滋觉。問(wèn)題終于解決了签夭,所有代碼都沒(méi)問(wèn)題齐邦,其實(shí)只需要將視圖C和視圖Bheader的高度設(shè)置一下就行了。
0013
+[_LSDefaults sharedInstance]: unrecognized selector sent to class 0x1f809fd58
0012
使用xcode的時(shí)候突然給不出錯(cuò)誤提示了第租,只是 Indexing | Processing files措拇,重啟xcode或關(guān)機(jī)依然沒(méi)有效果
解決方法:
在 ~/Library/Developer/Xcode/DerivedData 目錄下刪除所有的內(nèi)容,然后重啟xcode慎宾,提示就有了
0011
Type 'enum DDLogLevel' has incompatible definitions in different translation units
Reference to 'DDLogFlagError' is ambiguous
解決方案:
build > setting
enable module 改為No?
這種解決方式不太贊成丐吓,
0010
騰訊 Bugly的問(wèn)題,更新他好像就好了
2019-12-26 09:38:56.642098+0800 六道Peter[34165:12101291] [Bugly]? Trapped uncaught exception 'NSInvalidArgumentException', reason: '+[_LSDefaults sharedInstance]: unrecognized selector sent to class 0x1f809fd58'
0009/
以下為mas_equalTo的源碼:
#define mas_equalTo(...) equalTo(MASBoxValue((VA_ARGS)))
mas_equalTo()是對(duì)equalTo()的宏定義璧诵,主要是對(duì)equalTo傳入的參數(shù)進(jìn)行類(lèi)型轉(zhuǎn)換汰蜘,可以讓其支持基本數(shù)據(jù)類(lèi)型
以下為equalTo的源碼:
- (MASConstraint * (^)(id))equalTo {
return ^id(id attribute) {
return self.equalToWithRelation(attribute, NSLayoutRelationEqual);
};
}
通過(guò)equalTo的源碼可以看出equalTo算是一個(gè)get方法,其返回值為block類(lèi)型之宿,block中的有一個(gè)參數(shù)類(lèi)型為id族操,當(dāng)我們執(zhí)行equalTo方法時(shí),需要為其傳入id類(lèi)型的參數(shù)比被,所以equalTo不能傳入基本數(shù)據(jù)類(lèi)型色难,但可以包裝為NSNumber類(lèi)型傳入
make.height.equalTo(@100);?
總結(jié): mas_equalTo和equalTo實(shí)際上是對(duì)布局的效果一樣的,只是各自類(lèi)型不同
0008等缀、
????獲取設(shè)備的UUID(被蘋(píng)果禁用的是UDID)來(lái)標(biāo)示設(shè)備枷莉。當(dāng)軟件第一次安裝時(shí)候,獲取設(shè)備的UUID 存儲(chǔ)到keychain中,那么只要你不刷機(jī),那么這個(gè)保存在keychain中的UUID一直存在,即使你升級(jí)操作系統(tǒng)也會(huì)存在(我正好升級(jí)試了一下),這樣我們就能保證設(shè)備編碼的唯一性。參考如下網(wǎng)址:
0007尺迂、
在 iOS 9 之后笤妙,不需要再在 dealloc 方法中去移除通過(guò) addObserver:selector:name:object: 方法注冊(cè)的通知的監(jiān)聽(tīng)。 但是通過(guò) addObserverForName:object:queue:usingBlock: 這個(gè)方法注冊(cè)的通知仍然需要手動(dòng)移除噪裕。
0006
iOS lb: framework not found Pods_XXX___ 的解決辦法
解決方法:
1.項(xiàng)目藍(lán)色圖標(biāo)->Targets->General->Linked Frameworks and Libraries
2.刪除 Pods_XXX___.frameworks
0005
c Xcode has incompatible definitions in different translations units
解決方案:
build > setting
enable module 改為No?
不能用這個(gè)方法蹲盘,會(huì)出問(wèn)題,別的庫(kù)就不行了
最后發(fā)現(xiàn)
0004膳音、調(diào)試接口出現(xiàn)了很多問(wèn)題召衔,后臺(tái)說(shuō)返回的是json,但我接收到的卻是二進(jìn)制數(shù)據(jù)流祭陷,以前好像也有這種情況苍凛,但后臺(tái)都會(huì)進(jìn)行改善,將數(shù)據(jù)進(jìn)行編碼返回前端可以識(shí)別的數(shù)組和字典格式的數(shù)據(jù)兵志。
? 現(xiàn)在只好自己解析了醇蝴,
? ? ? ? ? ? ? ? NSString *jsonstr = [[NSString alloc]initWithData:responseObject encoding:NSUTF8StringEncoding];
? ? ? ? ? ? ? ? NSRegularExpression *expression = [NSRegularExpression regularExpressionWithPattern:@"sataeCode" options:0 error:nil];
? ? ? ? ? ? ? ? if (expression) {
? ? ? ? ? ? ? ? ? ? NSTextCheckingResult *result = [expression firstMatchInString:jsonstr options:0 range:NSMakeRange(0, jsonstr.length)];
? ? ? ? ? ? ? ? ? ? if (!result) {
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? NSData *jsondata = [jsonstr dataUsingEncoding:NSUTF8StringEncoding];
? ? ? ? ? ? ? ? NSDictionary *jsondic = [NSJSONSerialization JSONObjectWithData:jsondata options:NSJSONReadingMutableContainers error:nil];
003、
今天一早升級(jí)了Xcode10 結(jié)果一打開(kāi)項(xiàng)目直接閉門(mén)停了想罕。
報(bào)錯(cuò)內(nèi)容如下:
--------------------------------------------------------------
Showing Recent Messages
:-1: Multiple commands produce '/Users/apple/Library/Developer/Xcode/DerivedData/spor-alxyeeddbojurrdoaxniuovitgdw/Build/Products/Debug-iphoneos/spor.app/Info.plist':
1) Target 'spor' (project 'spor) has copy command from '/Users/apple/Downloads/NoAppNoPush/spor/External/Masonry/Info.plist' to '/Users/apple/Library/Developer/Xcode/DerivedData/spor-alxyeeddbojurrdoaxniuovitgdw/Build/Products/Debug-iphoneos/spor.app/Info.plist'
2) Target 'spor' (project 'spor') has process command with output '/Users/apple/Library/Developer/Xcode/DerivedData/spor-alxyeeddbojurrdoaxniuovitgdw/Build/Products/Debug-iphoneos/spor.app/Info.plist'
---------------------
解決方案:
選擇 xcode -> File -> Project Seetongs.... -> Shared Project Seetings: -> Build System -> Legacy Build System ->Done
001
The run destination xxx? iPhone is not valid for Running the scheme 'shoppingBaby’.
xxx 的 iPhone doesn’t support any of shoppingBaby.app’s architectures. You can add xxx 的 iPhone’s arm64e architecture to shoppingBaby.app’s Architectures build setting.
unsupported? architecture
是因?yàn)?Xcode版本和手機(jī)版本不支持哑蔫, 我Xcode用的9.4? 手機(jī)是ios 12, 升級(jí)Xcode就行了,或是添加手機(jī)支持文件闸迷, 但是我添加后不管用, 不知道什么情況
002
ERROR ITMS-90096: "Your binary is not optimized for iPhone 5 - New iPhone apps and app updates submitted must support the 4-inch display on iPhone 5 and must include a launch image referenced in the Info.plist under UILaunchImages with a UILaunchImageSize value set to {320, 568}. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .lproj folder if you localize your launch images. Learn more about iPhone 5 support and app launch images by reviewing the 'iOS Human Interface Guidelines' at https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen."
字面意思來(lái)看俘枫,是果爹砍了iPhone4系列之后腥沽,仍舊需要開(kāi)發(fā)者們適配iPhone5系列(os:如果庫(kù)克不是為了賣(mài)SE他會(huì)保留5系手機(jī)?)
廢話不多說(shuō)了鸠蚪,其實(shí)這個(gè)問(wèn)題只需要在Asset的LaunchImage的右側(cè)勾選iOS7 and Later的portrait選項(xiàng)今阳,那么LaunchImage就會(huì)多出兩個(gè)需要插入啟動(dòng)圖的位置(2x和Retina 4)
我這里只添加了Retina 4的尺寸圖,也就是640x1136大小茅信,clean一下重新打包即可
0003盾舌、 Masonry.h file not found
找不到頭文件,這種情況是文件鏈接發(fā)生混亂蘸鲸,或是重復(fù)添加了文件妖谴,也可能是項(xiàng)目?jī)?nèi)已經(jīng)把鏈接刪了,但本地文件還在酌摇,
配置文件里是不需要加特殊的指定鏈接的膝舅,
0002、的 iPhone has denied the launch request.
iOS -- Could not launch "xx" ,xx iPhone has denied the launch request
xcode窑多,在真機(jī)上運(yùn)行項(xiàng)目的時(shí)候仍稀,提示這個(gè)iOS -- Could not launch "xx" ,xx iPhone has denied the launch request。
我在網(wǎng)上看了一下埂息,網(wǎng)上說(shuō)的技潘,都沒(méi)有解決我的問(wèn)題,然后看到一篇文章說(shuō)的千康,他是切換了debug模式就好了享幽。我也試了一試,發(fā)現(xiàn)還是不行吧秕,但是在切換debug和release模式那里琉闪,我發(fā)現(xiàn)了下方有個(gè)勾(Debug executable)。
然后我把它給取消了砸彬,發(fā)現(xiàn)就能運(yùn)行了颠毙,不過(guò)斷點(diǎn)卻不走了,但是為什么這樣還不知道砂碉。好吧蛀蜜,記上一筆。
我自己分析了一下原因增蹭,也不知道是不是這樣滴某,因?yàn)橹耙砑右粋€(gè)UDID到賬號(hào)里,添加進(jìn)去之后由于沒(méi)有找到Xcode的自動(dòng)更新證書(shū)在哪,我就手動(dòng)下載證書(shū)導(dǎo)入了霎奢,就把自動(dòng)證書(shū)給取消了户誓,
把自動(dòng)證書(shū)勾上就行了
010
No signing certificate "iOS Development" found: No "iOS Development" signing
:-1: No account for team "T86X98NCU2". Add a new account in the Accounts preference pane or verify that your accounts have valid credentials. (in target 'TZImagePickerControllerFramework')
查找全局:"T86X98NCU2" ,然后修改幕侠,把證書(shū)改為自己的即可帝美!
騰訊云短視頻錄制
009、 [User Defaults] Attempt to set a non-property-list object (
? ? ? [common savepersoncontroller:listArr];//崩了
原因:dic 是服務(wù)器返回的數(shù)據(jù) 數(shù)據(jù)里邊有""晤硕,而NSUserDefaults是不能被成功解析并存入的悼潭,所有在存入之前需要將里邊的""改成""即可。
008舞箍、
2 duplicate symbols for architecture arm64
Xcode Build Settings中No Common Blocks配置項(xiàng) 改為NO
這個(gè)配置從XCode8開(kāi)始被默認(rèn)開(kāi)啟舰褪,有時(shí)會(huì)導(dǎo)致"duplicate symbol for architecture xxx" 錯(cuò)誤,那么這個(gè)配置項(xiàng)的含義是什么呢疏橄?
007占拍、
后臺(tái)返回(long)1 類(lèi)型的,怎么解析软族??
轉(zhuǎn)成string類(lèi)型即可
? ? ? ? NSString *kklikesStr =? [NSString stringWithFormat:@"%@",[[infoDic valueForKey:@"nums"] stringValue]];
006刷喜、
解決-[__NSCFNumber length]: unrecognized selector sent to instance xxxxx 的錯(cuò)誤
這個(gè)錯(cuò)誤是解析從服務(wù)器請(qǐng)求的參數(shù) @”carLossFee”數(shù)據(jù)類(lèi)型為double類(lèi)型,而在使用時(shí)直接賦值給NSString類(lèi)型變量,沒(méi)有進(jìn)行轉(zhuǎn)化立砸。所以報(bào)了以上錯(cuò)誤;
005
可能是Github問(wèn)題掖疮,或是緩存什么的問(wèn)題, 多試幾次就行了颗祝,
[!] Error installing QCloudCore
[!] /usr/bin/git clone https://github.com/tencentyun/qcloud-sdk-ios.git /var/folders/vh/tv38_gxj0kb7ptnx9g4vszgh0000gn/T/d20200311-16152-qbr975 --template= --single-branch --depth 1 --branch 5.7.1
Cloning into '/var/folders/vh/tv38_gxj0kb7ptnx9g4vszgh0000gn/T/d20200311-16152-qbr975'...
fatal: unable to access 'https://github.com/tencentyun/qcloud-sdk-ios.git/': Failed to connect to github.com port 443: Operation timed out
004浊闪、
0002、的 iPhone has denied the launch request.
003螺戳、
Could not successfully update network info during initialization.
這種情況一般會(huì)出現(xiàn)在使用第三方庫(kù)的時(shí)候搁宾,例如使用環(huán)信SDK, 歷史版本里面有一版在編譯之前倔幼,需要將里面的虛擬機(jī)加到包里盖腿。
這并不是一個(gè)統(tǒng)一的解決的辦法,要根據(jù)事實(shí)情況去找辦法了损同。
這個(gè)沒(méi)法解決翩腐,基本上是你用的第三方庫(kù),有的只打包了真機(jī)運(yùn)行的庫(kù)膏燃,沒(méi)有打模擬器的
002茂卦、
You've implemented -[ application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
需要配置一下 UIBackgroundModes ,把那個(gè)勾打上就行了组哩。
001等龙、iPad 上不顯示圖標(biāo)logo处渣,是因?yàn)榧恿诉@個(gè)選項(xiàng)
003、刪除Xcode多余證書(shū)
~/Library/MobileDevice/Provisioning Profiles
002/
xcode 緩存文件
~/Library/Developer/Xcode/DerivedData
這個(gè)文件夾中保存的是Xcode的緩存文件蛛砰,曾經(jīng)在Xcode跑過(guò)的所有項(xiàng)目的索引罐栈、build的信息等都會(huì)保存在這里。刪除后在下次打開(kāi)項(xiàng)目編譯的時(shí)候?qū)?huì)重新生成泥畅。由于這里包含了大量已經(jīng)沒(méi)用的項(xiàng)目的信息又懶得去篩選悠瞬,于是把整個(gè)文件夾刪了。
~/Library/Developer/Xcode/iOS DeviceSupport/
每次把一個(gè)設(shè)備接入電腦進(jìn)行真機(jī)調(diào)試之前涯捻,電腦會(huì)對(duì)設(shè)備建立索引,也在此文件夾下生成對(duì)該設(shè)備系統(tǒng)的支持文件望迎。于是這里存在了一堆對(duì)舊版本iOS設(shè)備支持的文件障癌。而我最近基本只對(duì)iOS9.3的設(shè)備進(jìn)行真機(jī)調(diào)試。于是刪除了所有低于9.3的文件夾辩尊。
~/Library/Developer/Xcode/Archives/
每次打包App的dSYM等數(shù)據(jù)就保存在這里涛浙,把一些沒(méi)用的版本刪了。如果是上線了的版本還是保留吧摄欲。
~/Library/Developer/Xcode/Products/
~/Library/Developer/CoreSimulator/Devices/
每個(gè)文件夾里包含的就是一個(gè)特定系統(tǒng)版本的設(shè)備的數(shù)據(jù)轿亮。每個(gè)文件夾對(duì)應(yīng)哪個(gè)設(shè)備可以在其下device.plist中查看。
~/Library/Developer/XCPGDevices/
這里保存了playground的項(xiàng)目緩存胸墙。
001
獲取當(dāng)前線程用@%打印
[NSThread currentThread]
APP圖標(biāo):
20我注、29、 ?40 迟隅、60 的2x 3x圖 ?一張1024*1024px
啟動(dòng)圖: 啟動(dòng)圖尺寸必須嚴(yán)格切圖但骨,分辨率不對(duì)會(huì)導(dǎo)致app上下有黑邊
640 *960
640*1136
750 *1334
1242 *2208
1125 *2436
1242 *2688
40 *40? 60*60
58*58? ? 87*87
80*80? 120*120
120*120 180*180
最后一張1024*1024
蘋(píng)方字體怎么會(huì)有PingFang SC、PingFang TC智袭、PingFang HK三種呢奔缠?對(duì)應(yīng)的是蘋(píng)方-簡(jiǎn)、蘋(píng)方-繁吼野、蘋(píng)方-港校哎,而且都有六種字重,具體可以在字體冊(cè)中查看瞳步。
// 蘋(píng)方字體闷哆,默認(rèn)為PingFangSC-Regular
UIFont *font = [UIFont fontWithName:@"PingFangSC-Regular" size:14];
0007、
蘋(píng)果證書(shū)文件
~/Library/MobileDevice/Provisioning Profiles
0006
真機(jī)測(cè)試只能用development證書(shū)谚攒,和描述文件阳准,不能用adhot或者distribute
006/
Build Active Architecture Only : 是否只編譯當(dāng)前適用的指令集,release必須為NO
Valid Architectures: 將要編譯的指令集
arm64 : 必選項(xiàng)馏臭,支持iphone5s及以上野蝇;最低支持版本:iOS5.1.1
armv7s:支持iPhone5及以上讼稚;
armv7:支持iPhone4及以上;
以上指令集绕沈,選擇越多锐想,打出來(lái)的包就越大;
若拋棄iPhone5s之前的機(jī)型乍狐,只需要選擇arm64即可赠摇,這個(gè)包是最小的。
若要支持所有iPhone機(jī)型浅蚪,選擇armv7藕帜、arm64即可。
若想app在各個(gè)機(jī)器上運(yùn)行效率最高:
1. Build Active Architecture Only改為NO惜傲;
2.選擇armv7 armv7s arm64指令集洽故;
這樣會(huì)為各個(gè)指令集編譯相應(yīng)的代碼,但包的體積是最大的盗誊。
0005
最近在Xcode添加了許多證書(shū)时甚,每次運(yùn)行時(shí)看到多余的證書(shū) 就會(huì)很煩。所以就想能不能去刪除多余的證書(shū)哈踱。然后找到了解決方案荒适。
在finder 中前往文件夾中輸入 ~/Library/MobileDevice/Provisioning Profiles
0004、
UI給到尺寸如何計(jì)算結(jié)論:pt = px * 72 / DPI开镣。
pt: iOS中的字號(hào)單位刀诬,1pt = 1/72 英寸。
px: 美工給的字體像素大小
DPI : 每英寸的像素?cái)?shù)
0003哑子、2019.1.5?
Mac 突然就打不開(kāi)蘋(píng)果開(kāi)發(fā)者中心了舅列,還有很多其他網(wǎng)站如12306等等,找來(lái)找去發(fā)現(xiàn)是停用了JavaScript的原因卧蜓。
0002帐要、的 iPhone has denied the launch request.
0001、模擬器截屏
選擇zoom最大屏幕弥奸,然后command +S? 保存截圖