iOS开发-Bug锦囊

时间:2023-12-13 20:15:20

duplicate symbols for architecture armv7

今天修改了自己项目的部分代码,发现XCode编译的时候报错:duplicate symbols for architecture armv7

1.排查是否有名字重复的文件;
2.检查是否在#import头文件的时候,不小心将.h写成了.m(这种情况居多,本人属于此类情况)

No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386

iOS开发-Bug锦囊

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

xcode7中苹果不允许使用http协议,需要使用Https协议,如果需要使用http协议,需要在infoList中设置NSAppTransportSecurity:

	<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>