iOS App 开发问题汇总(四)

1. Suppressing deprecated warnings

1
2
3
4
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
[reciver deprecatedMethod];
#pragma clang diagnostic pop

Reference:#pragma

2. Warning libopencore-amrnb.a, missing required architecture arm64

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
ld: warning: ignoring file /Users/dongmeiliang/Downloads/VoiceConvert/VoiceConvert/VoiceConvert/lib/libopencore-amrnb.a, missing required architecture arm64 in file /Users/dongmeiliang/Downloads/VoiceConvert/VoiceConvert/VoiceConvert/lib/libopencore-amrnb.a (3 slices)
ld: warning: ignoring file /Users/dongmeiliang/Downloads/VoiceConvert/VoiceConvert/VoiceConvert/lib/libopencore-amrwb.a, missing required architecture arm64 in file /Users/dongmeiliang/Downloads/VoiceConvert/VoiceConvert/VoiceConvert/lib/libopencore-amrwb.a (3 slices)
Undefined symbols for architecture arm64:
  "_Decoder_Interface_init", referenced from:
      DecodeAMRFileToWAVEFile(char const*, char const*) in libVoiceConvert.a(amrFileCodec.o)
  "_Decoder_Interface_Decode", referenced from:
      DecodeAMRFileToWAVEFile(char const*, char const*) in libVoiceConvert.a(amrFileCodec.o)
  "_Decoder_Interface_exit", referenced from:
      DecodeAMRFileToWAVEFile(char const*, char const*) in libVoiceConvert.a(amrFileCodec.o)
  "_Encoder_Interface_init", referenced from:
      EncodeWAVEFileToAMRFile(char const*, char const*, int, int) in libVoiceConvert.a(amrFileCodec.o)
  "___gxx_personality_v0", referenced from:
      +[VoiceConverter amrToWav:wavSavePath:] in libVoiceConvert.a(VoiceConverter.o)
      +[VoiceConverter wavToAmr:amrSavePath:] in libVoiceConvert.a(VoiceConverter.o)
  "_Encoder_Interface_Encode", referenced from:
      EncodeWAVEFileToAMRFile(char const*, char const*, int, int) in libVoiceConvert.a(amrFileCodec.o)
  "_Encoder_Interface_exit", referenced from:
      EncodeWAVEFileToAMRFile(char const*, char const*, int, int) in libVoiceConvert.a(amrFileCodec.o)

Solution: Recompile a static library refer opencore-amr-iOS

继续阅读

Mac 使用笔记(一)

1. How to enable the three finger drag on OS X 10.11

Step 1: Open System Preferences

Step 2: Click Accessibility

Step 3: Click Mouse & Trackpad

Step 4: Click Trackpad Options…

Step 5: Click Enable dragging

Step 6: Select “three finger drag” in the drop down box

Reference:http://www.idownloadblog.com/2015/06/25/three-finger-drag-gesture-os-x-el-capitan/

继续阅读

Mac 安装 OS X El Capitan

最近 Apple 更新了 OS X,通过 App Store 更新下载下来 OS X El Capitan 的安装时遇到问题了 – 手头的这台 Mac 之前有人分区安装了 Windows, OS X 安装在第二个分区, OS X El Capitan 却不能安装在 OS X 所在的分区,而且格式化 Windows 所在的分区又报错,也是醉了,只好重装。

备份数据

我用 sftp 把数据备份到另一台 Mac 上, 之前也试过 Migration Assitant 都是卡在最后一分钟,不知道现在这个问题改善了没有。 用 sftp 备份中间也中断了好多次,但手头也没移动硬盘也只能这么将就着了。

Install OS X El Capitan

  1. 需要一个 8GB 左右的 U 盘,因为 El Capitan 的大小超过 6GB ;
  2. 从 App Store 下载 El Capitan;
  3. 制作安装盘:
1
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction
  1. 重新启动,按住 option 键,选择通过U盘启动,之后先进入磁盘工具里面把硬盘格式化了(你也可以选择不格式化,这样就是覆盖安装);
继续阅读