美文网首页
IOS备忘录

IOS备忘录

作者: cdd48b9d36e0 | 来源:发表于2016-11-02 14:44 被阅读85次

1. 命令行显示/隐藏文件

defaults write com.apple.finder AppleShowAllFiles -bool true
defaults write com.apple.finder AppleShowAllFiles -bool false

2. 配置bugly符号表

  1. 取得dSYM文件 ,项目上架打包的时候,archive的文件,“ 使用Finder前往路径~/Library/Developer/Xcode/Archives/,可以看到日期目录,目录下有后缀名为xcarchive的文件,选中该文件,右键菜单选择“显示包内容”,可以看到一个dsYMs目录,将目录中的XXX.app.dsYM文件拷出来,后面分析会用到。”如果没有是因为XCode配置没有设置生成它 ,在Build Settings------>Debug information format ----选DWARF with dSYM File ,打包时就会生成dsYM文件
  1. command+B工程,在打开xxx.app所在文件目录,并把dsym文件拷贝到该目录下
  2. 打开终端 java -jar /Users/wmh/bin/buglySymboliOS.jar -i /Users/wmh/Desktop/dsym/GS_Mobile.app.dSYM -o fuhaobiao.zip
    java -jar 【这一块是java包路径】 -i 【dSYM文件路径】 -o 【生成的文件名称】
  3. 上传符号表文件

3. git的忽略文件

<p>

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
*.xcuserstate

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://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

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

iOSInjectionProject/
</p>

4. 创建pch文件

  1. other里选择pct文件
  2. BuildSetting-->PrecompilePrefixHeader-->YES
  3. BuildSetting-->PrefixHeader-->$(SRCROOT)/AAAAAA/BBBBBB.pch

5. 新pod导入命令行

pod update --verbose --no-repo-update

6. KVO的实现原理

KVO是基于runtime机制实现的

[p addObserver:self forKeyPath:@"age" options:NSKeyValueObservingOptionOld | NSKeyValueObservingOptionNew context:nil];

程序运行完这句话后,系统会动态创建一个p的子类,此时可打印p的isa指针,可以看到此时isa指针指向新创建的那个子类,在那个子类里面它重写了属性age的set方法,在这个set方法里先是调用了父类的setAge方法,然后发出通知,让系统调用- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context这个方法

7. 怎么让通知中心执行耗时操作

如果通知是在主线程发,那么执行方法也在主线程,就不可以执行耗时操作;如果通知是在子线程发,那么执行方法也在子线程,此时就可以执行耗时操作

8. IOS10权限

<key>NSPhotoLibraryUsageDescription</key>
<string>App需要您的同意,才能访问相册</string>

<key>NSCameraUsageDescription</key>
<string>App需要您的同意,才能访问相机</string>

<key>NSMicrophoneUsageDescription</key>
<string>App需要您的同意,才能访问麦克风</string>

<key>NSLocationUsageDescription</key>
<string>App需要您的同意,才能访问位置</string>

<key>NSLocationWhenInUseUsageDescription</key>
<string>App需要您的同意,才能在使用期间访问位置</string>

<key>NSLocationAlwaysUsageDescription</key>
<string>App需要您的同意,才能始终访问位置</string>

<key>NSCalendarsUsageDescription</key>
<string>App需要您的同意,才能访问日历</string>

<key>NSRemindersUsageDescription</key>
<string>App需要您的同意,才能访问提醒事项</string>

<key>NSMotionUsageDescription</key> <string>App需要您的同意,才能访问运动与健身</string>

<key>NSHealthUpdateUsageDescription</key>
<string>App需要您的同意,才能访问健康更新 </string>

<key>NSHealthShareUsageDescription</key>
<string>App需要您的同意,才能访问健康分享</string>

<key>NSBluetoothPeripheralUsageDescription</key>
<string>App需要您的同意,才能访问蓝牙</string>

<key>NSAppleMusicUsageDescription</key>
<string>App需要您的同意,才能访问媒体资料库</string>

相关文章

  • iOS 备忘录如何分享到App(Share Extension)

    踩坑记录(检索关键字:怎么分享备忘录,备忘录内容分享到app,iOS 备忘录开发)参考资料: 入门参考资料: 基本...

  • LinkedME|Core Spotlight和深度链接结合使用

    在iOS 9.0之前,Apple Spotlight仅能够检索iOS自身应用的内容,比如邮件、备忘录、提醒、短信。...

  • 备忘录画初学,他们说这是指绘。

    备忘录画,就是在IOS的自带备忘录里面画画。 第一次接触到备忘录画,是在微博上很偶然的看到的,才知道原来备忘录还可...

  • 简单iOS备忘录App实现

    简单iOS备忘录App实现 详细内容参考《疯狂iOS讲义》--李刚编著 完整代码放到了GitHub。LeeLom ...

  • 论ios备忘录的逼格

    第一次接触iOS备忘录的绘画,是偶然间看到了大触们的分享。 ——“出自手机备忘录” 诶呀我的马,用备忘录能画画,手...

  • 系统更新:iOS-9

    1. 备忘录 备忘录在iOS 9中可以轻松制作待办事项的核对清单,加入照片、地图或网址链接,甚至随手画个草图。 2...

  • iOS9的新特性

    1. 备忘录 备忘录在iOS 9中可以轻松制作待办事项的核对清单,加入照片、地图或网址链接,甚至随手画个草图。 2...

  • 系统更新:iOS9

    1. 备忘录 备忘录在iOS 9中可以轻松制作待办事项的核对清单,加入照片、地图或网址链接,甚至随手画个草图。 2...

  • 你是个爱收藏的人么?

    文||糖小果 图||糖小果 -01- 前两天看到一篇文章,讲的是如何使用ios的备忘录,在此之前我认为备忘录这个功...

  • iOS备忘录

    内存的几大区域 1.栈区 局部变量和实参2.堆 OC中用new,alloc 方法创建的对象3.BSS段 没有初...

网友评论

      本文标题:IOS备忘录

      本文链接:https://www.haomeiwen.com/subject/jrywyttx.html