我的应用没有权限xcode 7

时间:2016-01-11 05:31:12

标签: ios objective-c xcode

我是客观的新手。我删除了“编译源代码”中的所有课程,之后我收到错误:"由于您无权查看文件{my app name},因此无法打开该文件。 #34 ;.除此之外,我的应用程序运行良好。我尝试了很多解决方案,但它们没有工作

我尝试过:

更换我的info.plist

删除派生数据

编辑项目文件夹的权限

更改"编译器for C / C ++ / Objective-C"在构建设置中默认

检查我的架构

清理我的项目

感谢您的帮助!

更新:我无法在模拟器和设备中运行应用

修改:将所有.m文件添加到'编译源'并得到这样的错误:

 ld: entry point (_main) undefined. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

编辑:创建新项目并将类复制到新项目。再次出错

 Ld /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Products/Debug-iphoneos/maktub.app/maktub normal arm64
    cd /Volumes/Data/Projects/maktub
    export IPHONEOS_DEPLOYMENT_TARGET=6.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.1.sdk -L/Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Products/Debug-iphoneos -F/Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Products/Debug-iphoneos -filelist /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/maktub.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=6.0 -dead_strip -ObjC -lCocoaAsyncSocket -framework CFNetwork -framework Security -fobjc-arc -fobjc-link-runtime -lsqlite3 -lz.1 -lPods-maktub -Xlinker -dependency_info -Xlinker /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/maktub_dependency_info.dat -o /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Products/Debug-iphoneos/maktub.app/maktub

duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/SettingController.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/SettingController.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/IntroController.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/IntroController.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/AppDelegate.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/AppDelegate.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/ContactController.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/ContactController.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/RegisterController.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/RegisterController.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/AESCrypto.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/AESCrypto.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/SetNameController.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/SetNameController.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/ChatController.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/ChatController.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/GroupController.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/GroupController.o
duplicate symbol _key in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/GlobalMethod.o
duplicate symbol _iv in:
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/CheckCodeController.o
    /Users/sherzod/Library/Developer/Xcode/DerivedData/maktub-grrvlbarzrzucfdjeuhroypwrwpr/Build/Intermediates/maktub.build/Debug-iphoneos/maktub.build/Objects-normal/arm64/GlobalMethod.o
ld: 20 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:0)

解决方案1:

选择信息

Enter Bundle name As : ${PRODUCT_NAME}

Executable file : ${EXECUTABLE_NAME}

解决方案2:

刚想通了它可能是另一个问题。可能会发生您的Main.m文件不再包含在Build Phases -> compile sources中。你会得到同样的错误。您可以通过单击加号并选择文件来重新添加它 来自对话框。

解决方案3:

转到Finder中包含项目的文件夹。

Click > Get Info

转到“信息”窗格的底部,然后单击小锁,在提示时输入密码。

然后,更改自己的权限以读取+写入。

单击下面的小齿轮,并应用于所有随附的项目。

完成后关闭锁!

如果这不起作用,请更改" Compiler for C/C++/Objective-C"的值在BUILD OPTIONS下的默认编译器

可能会帮助你。