相关疑难解决方法(0)

架构i386的未定义符号"_OBJC_CLASS _ $ _ Appirater"

将Appirater添加到我的iOS项目后,当我编译时,我收到错误:

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_Appirater", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

在互联网上搜索和搜索后,找不到任何解决方案.

我的项目和目标都设置为:

在此输入图像描述

我该怎么做?

xcode compiler-errors objective-c

10
推荐指数
1
解决办法
2万
查看次数

体系结构i386的未定义符号:"_ OBJC_CLASS _ $ _ ZipException",引用自:error

我在我的项目中使用了几个'.o'文件,在编译时显示以下错误,

error:linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

我在下面发布了错误日志

Ld /Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Products/Debug-iphonesimulator/app.app/app normal i386
    cd /Users/deepak/Workspace/iosDevelopement/PROJECTS/KML/app
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Products/Debug-iphonesimulator -F/Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Products/Debug-iphonesimulator -F/Users/deepak/Workspace/iosDevelopement/PROJECTS/KML/app -filelist /Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Intermediates/app.build/Debug-iphonesimulator/app.build/Objects-normal/i386/app.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=4.3 -lstdc++ -licucore -lz -framework MapKit -framework CoreLocation -framework QuartzCore -framework UIKit -framework Foundation -framework CoreGraphics -framework KML -o /Users/deepak/Library/Developer/Xcode/DerivedData/app-bnwpvhpbrfdurbdgxucyddqyfosh/Build/Products/Debug-iphonesimulator/app.app/app
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_ZipException", referenced from:
      objc-class-ref in ZipFile.o
      objc-class-ref in ZipReadStream.o
      objc-class-ref in …
Run Code Online (Sandbox Code Playgroud)

xcode cocoa-touch objective-c ios xcode4.5

4
推荐指数
1
解决办法
4万
查看次数

架构i386的未定义符号:"_ OBJC_CLASS _ $ _ GDataDateTime",引自:

我曾在谷歌日历工作过.现在我从这个链接下载示例代码:

"http://code.google.com/p/iphone-gcal/". 
Run Code Online (Sandbox Code Playgroud)

但是在这段代码中,缺少一些Gdata代码.所以我已经实现了该代码,但我也得到了以下错误.请一些人帮我解决这个错误.

Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_GDataDateTime", referenced from:
      objc-class-ref in RootViewController.o
      objc-class-ref in EditingViewController.o
  "_OBJC_CLASS_$_GDataEntryCalendarEvent", referenced from:
      objc-class-ref in EditingViewController.o
  "_OBJC_CLASS_$_GDataQueryCalendar", referenced from:
      objc-class-ref in RootViewController.o
  "_OBJC_CLASS_$_GDataServiceGoogleCalendar", referenced from:
      objc-class-ref in RootViewController.o
  "_OBJC_CLASS_$_GDataWhen", referenced from:
      objc-class-ref in RootViewController.o
      objc-class-ref in EditingViewController.o
  "_OBJC_CLASS_$_GDataWhere", referenced from:
      objc-class-ref in EditingViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch google-calendar-api linker-errors ios

1
推荐指数
1
解决办法
4364
查看次数

为什么Bundle.main.path(forResource:fileName,ofType:"txt")总是返回nil?

我想逐行阅读文本文件,并使用此处显示的示例在iOS屏幕上显示它.

制作textView.text可选项是我能够readDataFromFile运行的唯一方式.当我单击load该函数运行但总是返回nil.我认为这意味着找不到文件.

出于测试目的,我在Xcode中创建了文本文件.我也尝试将它保存在桌面和项目文件夹中.无论哪种方式,它都可以从项目导航器中读取.我还尝试使用TextEdit创建文件,因为应用程序最终需要读取在Xcode外部创建的文本文件.

如果有人可以解释为什么永远不会找到文本文件,我是否感激不已,为了让项目找到它还是需要做些什么,或者nil由于我的方式而导致读取函数由于其他原因而返回实施了它.谢谢.

编辑(2)

感谢您的反馈.作为回应,我做了四个小的代码更改,允许将文本文件内容写入textView.更改包括:从文件名中删除文件扩展名,添加文件名数组,String而不是String?从代码中返回readDataFromFile和重写UITextView.这解决了我所知道的问题.

这是修改后的代码

import UIKit

class ViewController: UIViewController {

var textView = UITextView()
var arrayOfStrings: [String]?
var fileNameWithExtension               = "textFile.txt"
let arrayOfFileNames                    = ["textFile1.txt", "textFile2.txt", "textFile3.txt", "textFile4.txt", "textFile5.txt"]

var fileName                            = String()

override func viewDidLoad() {
    super.viewDidLoad()

    //    remove comment in the next statement to test files named in ArrayOfFileNames    
    //    fileNameWithExtension               = …
Run Code Online (Sandbox Code Playgroud)

uitextview ios swift

0
推荐指数
1
解决办法
4770
查看次数