iOS_Error(一)

2022-07-20 13:36:28 浏览数 (1)

// 2018.01.19 添加:

  • Warning: The Copy Bundle Resources build phase contains this target's Info.plist file '*/Info.plist'.

大概步骤就是点击 项目名->Build phases->找到Copy bundle Resources->找到里面的info.plist->选中然后delete,OK搞定!还是要警告大家,系统默认产生的文件比如info.plist文件,最好不要自己乱动,否则就会产生一些莫名其妙的问题。

  • warning: /*/ModuleCache/*.pcm: No such file or directory
  • ➜  ~ pod --version

Traceback (most recent call last):

2: from /usr/local/bin/pod:23:in `<main>'

1: from /usr/local/Cellar/ruby/2.5.0/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'

/usr/local/Cellar/ruby/2.5.0/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem cocoapods(>= 0.a) with executable pod (Gem::GemNotFoundException)

解决:

curl -L https://get.rvm.io |

  bash -s stable --ruby --autolibs=enable --auto-dotfiles

  • pod 文件里写了 use_frameworks! 运行

dyld: Library not loaded: @rpath/AFNetworking.framework/AFNetworking

  Referenced from: /var/containers/Bundle/Application/CAACACB7-4927-49A9-93F3-F4AFC0142AC8/KubanClient.app/KubanClient

  Reason: image not found

解决:

pod 文件里加 inherit! :search_paths

然后运行 

pod deintegrate 

pod install

// 2017.11.03 添加:

  • Verify the Developer App certificate for your account is trusted on your device. Open Settings on莫小言2 and navigate to General -> Device Management, then select your Developer App certificate to trust it.

解决方法:打开手机设置->通用->设备管理,找到编辑工程时的ID资料,点击允许即可。

  • Command /bin/sh failed with exit code 1

解决办法: 删掉过期证书

  • shell script invocation error

Command /bin/sh failed with exit code 1

  • The file KubanLockSDK.app couldnt be opened because you dont have permission to view it.

plist文件没加网络请求 描述

  • linker command failed with exit code 1 (use -v to see invocation)

将.a文件删除 在重新添加  or 文件冲突  看看详情 仔细检查一下就知道了

  • sudo xcode-select --switch path/to/xcode.app

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

  • ERROR ITMS-90717: "Invalid App Store Icon. The App Store Icon in the asset catalog in 'angelMedical.app' can't be transparent nor contain an alpha channel."

先把png 图片转成JPG 然后再转成png就好了 

  • profile doesn't include the selected signing certificate.

打开Finder->前往->按住alt 资源库

资源库---->MobileDevice---->Provisioning Profiles,将里面的齿轮文件全部删除,然后到Xcode下的Preferences下Account重新下载齿轮文件以及证书即可

  • The file “KubanClient.app” couldn’t be opened because you don’t have permission to view it.

造成的原因:

  info文件中的字段Executable file与 build settings栏中的Packaging中的Product Name不一致就会导致上述截图的问题

解决办法:

  讲info.plist的文件中的Executable.file中的文件修改为:$(PRODUCT_NAME)

  修改之前

      修改之后:

// 之前添加:

reason: '[<__NSDictionary0 0x7fda88f00c90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key title.'

字典没有定义成可变的

日常⚠️错误

  • Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:]

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath     *)indexPath

这个函数的返回值是个null!!

  • Apple Mach-O Linker(ld) Error  Group

导入了两对相同的文件 or 文件有冲突  看看详情仔细检查一下就知道了

  • clang: error: no such file or directory: '/Users/moxiaoyan/kuban/kuban-ios/KBOrderDetailViewController.m'

clang: error: no input files

clang: error: no input files这个问题一般是因为你删除或者移动了某一个文件,但是在你的编译资源里面( project > target > Build Phases > Compile Sources)还存在它,只要在(project > target > Build Phases > Compile Sources)里面把那些红色的文件删除掉,就可以编译过了。

  • No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=arm64, VALID_ARCHS=armv7 armv7s).
  • [App] if we're in the real pre-commit handler we can't actually add any new fences due to CA restriction
  • in Run (Debug) select the Arguments tab
  • in Environment Variables click
  • add variable: OS_ACTIVITY_MODE = disable
  •   "_OBJC_CLASS_$_DHBle", referenced from:
  • linker command failed with exit code 1 (use -v to see invocation)

用真机运行

  • Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3600.6.22/UITableView.m:8042

self.manager[@"KBAddPersonItem"] = @"KBAddPersonCell";

  • RETableView Item 高度显示不对

[weakSelf loadingSection]; 这方法后又reload

[weakSelf.tableView reloadData]; 此后还得加reload

  • warning:no rule to process file '/Users/moxiaoyan/kuban/kuban-ios/README.md' of type net.daringfireball.markdown for architecture x86_64
  1. Select the project target
  2. Select the Build Phases
  3. Expand the Compile Source
  4. Remove the Header file (Reachability.h)

⚠️26个

GenerateDSYMFile /Users/moxiaoyan/Library/Developer/Xcode/DerivedData/KubanClient-fpvegmccrqrxqhbaqnzsozaondcz/Build/Products/Debug-iphonesimulator/KubanClient.app.dSYM /Users/moxiaoyan/Library/Developer/Xcode/DerivedData/KubanClient-fpvegmccrqrxqhbaqnzsozaondcz/Build/Products/Debug-iphonesimulator/KubanClient.app/KubanClient

    cd /Users/moxiaoyan/kuban/kuban-ios

    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/*/Library/Developer/Xcode/DerivedData/*-*/Build/Products/Debug-iphonesimulator/KubanClient.app/KubanClient -o /Users/*/Library/Developer/Xcode/DerivedData/*-*/Build/Products/Debug-iphonesimulator/KubanClient.app.dSYM

while processing /Users/*/Pods/Bugtags/Bugtags.framework/Bugtags(BTGKeychainQuery.o):

warning: /var/folders/wp/7v62gnls15z3ll64_vm85v_r0000gq/C/org.llvm.clang.kaixin/ModuleCache/1FVULZ17M5051/Darwin-38I6DLZ5IH61J.pcm: No such file or directory

note: Linking a static library that was built with -gmodules, but the module cache was not found.  Redistributable static libraries should never be built with module debugging enabled.  The debug experience will be degraded due to incomplete debug information.

while processing /Users/*/Pods/Bugtags/Bugtags.framework/Bugtags(BTGKeychainQuery.o):

warning: /var/folders/wp/7v62gnls15z3ll64_vm85v_r0000gq/C/org.llvm.clang.kaixin/ModuleCache/1FVULZ17M5051/UIKit-1V5UHAPTOD24G.pcm: No such file or directory

while processing /Users/*/Pods/Bugtags/Bugtags.framework/Bugtags(BTGKeychainQuery.o):

warning: /var/folders/wp/7v62gnls15z3ll64_vm85v_r0000gq/C/org.llvm.clang.kaixin/ModuleCache/1FVULZ17M5051/Foundation-3DFYNEBRQSXST.pcm: No such file or 

解决办法:

This helped me (edit in Build Settings): 

GCC_PRECOMPILE_PREFIX_HEADER = NO

DEBUG_INFORMATION_FORMAT = dwarf

ENABLE_BITCODE = NO

  • -fembed-bitcode is not supported on versions of iOS prior to 6.0

0 人点赞