App.crash的解析和git的使用/appdoc文檔生成技巧

App.crash git 使用

  • export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
  1. symbolicatecrash
  2. xx.app
  3. xx.app.dSYM
  4. dwarfdump --uuid Fotile.app.dSYM/ 查看UUID
  5. xcrun dwarfdump --uuid appName.app/appName
  6. 命令同一個(gè)文件夾
  7. Binary Images:
    0x100034000 - 0x1004abfff Fotile arm64 <060dfd8753763fea9ee4e07c861820d7> 這里看 bundleID
  • ./symbolicatecrash Fotile17-3-22\ 下午3-58.crash Fotile.app.dSYM/ > result.crash 命令
  • 彈出Error: "DEVELOPER_DIR" is not defined at ./symbolicatecrash line 69.
  • 輸入export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
  • 重新執(zhí)行命令---over
bugly 符號(hào)表 工具上傳
    1. java -jar buglySymboliOS.jar -i /Users/NB1539/Desktop/crash/2017_04_20_V4_private/Fotile.app.dSYM -dsym -u -id 08ba766ffa -key 9cab4cdb-5017-4df0-a955-b279b3bde37f -package com.fotile.smartMachine -version 1.0.0.11


      image.png
  • 2 直接上傳 上傳 XXX.app.dSYM.zip 文件到 符號(hào)表處

git clean -d -fx 這個(gè)命令

git 使用

  • git reset --hard FETCH_HEAD // 取消自己的更改 返回上次提交
  • git clone -b "分支名" "address"
    • 克隆分支,修改,提交,合并分之到主干
  • git rm --cached file_path // 當(dāng)我們需要?jiǎng)h除暫存區(qū)或分支上的文件, 但本地又需要使用, 只是不希望這個(gè)文件被版本控制, 可以使用
  • find . -name .DS_Store -print0 | xargs -0 Git rm -f --ignore-unmatch // 找到文件名稱 并刪除
  • git 分之管理
  • $ git log --graph --pretty=oneline --abbrev-commit
  • $ git merge feature1 Auto-merging readme.txt CONFLICT (content): Merge conflict in readme.txt Automatic merge failed; fix conflicts and then commit the result.
  • 修改沖突,重新添加,提交 然后 pull 推送到遠(yuǎn)程
  • 命令git checkout -- XXX 意思就是,把readme.txt文件在工作區(qū)的修改全部撤銷,這里有兩種情況:

遠(yuǎn)程分支

  • git fetch -p origin 去掉當(dāng)前緩存的遠(yuǎn)程分支
  • $ git push --delete origin devel //刪除遠(yuǎn)程分支
  • $ git branch -m devel develop // 重命名本地分支:
  • $ git push origin develop // 推送本地分支到遠(yuǎn)程
  • git merge --abort // 取消本次合并
git bug 修改
  • $ git stash 可以把當(dāng)前工作現(xiàn)場(chǎng)“儲(chǔ)藏”起來(lái),等以后恢復(fù)現(xiàn)場(chǎng)后繼續(xù)工作:

  • 新建分之 解決bug 提交bug 合并分之,刪除分之提交到遠(yuǎn)程開(kāi)始測(cè)試

  • 完事之后回滾到開(kāi)發(fā)分支

  • $ git stash list 當(dāng)前工作區(qū)域內(nèi)容還在

  • 一是用git stash apply恢復(fù),但是恢復(fù)后,stash內(nèi)容并不刪除,你需要用git stash drop來(lái)刪除;

  • 另一種方式是用git stash pop,恢復(fù)的同時(shí)把stash內(nèi)容也刪了:

gitignore文件用于忽略文件

  • 規(guī)范如下
    • 1.所有空行或者以注釋符號(hào) # 開(kāi)頭的行都會(huì)被 Git 忽略。
    • 2.可以使用標(biāo)準(zhǔn)的 glob 模式匹配。
    • 3.匹配模式最后跟反斜杠(/)說(shuō)明要忽略的是目錄。
    • 4.要忽略指定模式以外的文件或目錄,可以在模式前加上驚嘆號(hào)(!)取反。
  • glob模式要點(diǎn):
    • *:任意個(gè)任意字符,
    • ?:匹配一個(gè)任意字符,
  • 我們只需要在對(duì)應(yīng)的Git目錄下,創(chuàng)建一個(gè).gitignore文件,然后配置上.DS_Store即可,步驟如下:
    • 1.命令行下使用touch .gitignore創(chuàng)建.gitignore文件
    • 輸入.DS_Store 換行再輸入*/.DS_Store *.swp
    • git add .
    • git commit -m "wenzi"
    • $ git config --global core.excludesfile ~/.gitignore // 配置到全局的gitconfig里面
  • 詳細(xì)見(jiàn)哪種語(yǔ)言忽略哪些文件
*/.DS_Store
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode
修改XCode 模板路徑
  • cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/
  • 修改模板路徑
xcode項(xiàng)目 生成appdoc文檔
  • git clone git://github.com/tomaz/appledoc.git

  • cd ./appledoc

  • sudo sh install-appledoc.sh

  • 正確的執(zhí)行命令:

  • appledoc --no-create-docset --output ~/doc --project-name "Your Project Name" --company-id "com.yourcommpany" --project-company "Your Company" ./

  • example: appledoc --project-name "FotileStyle" --project-company "Fotile" --company-id "Fotile CopyRIght" --output ~/Desktop

  • appledoc -p FotileStyle -c "Fotile" -c "Fotile CopyRIght" -o ~/Desktop ./

    • 最后一個(gè)命令需要5個(gè)參數(shù):

      1. 工程名字
      2. 公司名字
      3. 公司ID
      4. 生成結(jié)果出書(shū)路徑
      5. 掃描那個(gè)路徑下的類
    • 第三方注釋可能會(huì)導(dǎo)致崩潰,排除第三方文件 進(jìn)入下一級(jí)文件目錄參考

    • 示例 完全支持 MArkMan 格式

appledoc 支持格式
```
  /// 這是單行注釋。
  /** 這也是單行注釋 */
  /*! 同樣是單行注釋 */
  /** 這也是單行注釋,
  *  第二行會(huì)接上第一行。
  */
  /** 第一行是類的簡(jiǎn)介
  在簡(jiǎn)介的下面,就是類的詳細(xì)介紹了。
  沒(méi)有間隔換行會(huì)被消除,就像Html那樣。
  下面是常用的markdown語(yǔ)法
  - - -
  無(wú)序列表: (每行以 '*'、'-'、'+' 開(kāi)頭):
  * this is the first line
  * this is the second line
  * this is the third line
  有序列表: (每行以 1.2.3、a.b.c 開(kāi)頭):
  a. this is the first line
  b. this is the secode line
  多級(jí)列表:
  * this is the first line
    a. this is line a
    b. this is line b
  * this is the second line
    1. this in line 1
    2. this is line 2
  標(biāo)題:
  # This is an H1
  ## This is an H2
  ### This is an H3
  #### This is an h4
  ##### This is an h5
  ###### This is an H6
  鏈接:
  普通URL直接寫上,appledoc會(huì)自動(dòng)翻譯成鏈接: http://    blog.ibireme.com
  [這個(gè)](http://example.net/) 鏈接會(huì)隱藏實(shí)際URL.
  表格:
  | header1 | header2 | header3 |
  |---------|:-------:|--------:|
  | normal  |  center |  right  |
  | cell    | cell    | cell    |
  引用:
  這里會(huì)引用到方法 `someMethod:`,這里會(huì)引用到類 `YYColor`
  這里會(huì)引用到一個(gè)代碼塊
     void CMYK2RGB(float c, float m, float y, float k, 
                    float *r, float *g, float *b) {
         *r = (1 - c) * (1 - k);
         *g = (1 - m) * (1 - k);
         *b = (1 - y) * (1 - k);
     }
  @since iOS5.0
```
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 1.git的安裝 1.1 在Windows上安裝Git msysgit是Windows版的Git,從https:/...
    落魂灬閱讀 12,841評(píng)論 4 54
  • Git 命令行學(xué)習(xí)筆記 Git 基礎(chǔ) 基本原理 客戶端并不是只提取最新版本的文件快照,而是把代碼倉(cāng)庫(kù)完整的鏡像下來(lái)...
    sunnyghx閱讀 4,155評(píng)論 0 11
  • 一、電腦本地初始化一個(gè)倉(cāng)庫(kù) 1. git init: 初始化一個(gè)電腦上本地倉(cāng)庫(kù) 終端進(jìn)入項(xiàng)目目錄,輸入: 該命令將...
    dragon_li閱讀 3,143評(píng)論 1 4
  • Git 基礎(chǔ) 基本原理 客戶端并不是只提取最新版本的文件快照,而是把代碼倉(cāng)庫(kù)完整的鏡像下來(lái)。這樣一來(lái),任何一處協(xié)同...
    __silhouette閱讀 16,210評(píng)論 5 147
  • 007三字經(jīng) 零零七 好東西 聚人氣 練腦力 強(qiáng)身體 月四期 漲知識(shí) 要堅(jiān)持 若放棄 真可惜 戰(zhàn)友宜 心牢記 常議...
    上善若水_山東濟(jì)南閱讀 209評(píng)論 8 1

友情鏈接更多精彩內(nèi)容