小编Bis*_*sta的帖子

目标...覆盖`Pods/Pods.xcconfig中定义的`OTHER_LDFLAGS`构建设置

我已经合并SpatialIite到一个Xcode项目中,该项目使用头文件Proj.4,只有一个头文件.两者都是Xcode项目并具有静态目标.

我正在尝试从git子模块迁移到Cocoapods.由于静态目标似乎很难与Cocoapods一起使用,我只想以通常的方式构建项目.我做了podspec Proj.4.写完podfile之后SpatialLite我收到了警告:

[!] The target `SpatialiteIOS [Debug]` overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig'.
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The target `SpatialiteIOS [Debug]` overrides the `HEADER_SEARCH_PATHS` build setting defined in `Pods/Pods.xcconfig'.
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

[!] The target `SpatialiteIOS [Debug - Release]` overrides the `OTHER_LDFLAGS` build setting defined in `Pods/Pods.xcconfig'.
    - …
Run Code Online (Sandbox Code Playgroud)

xcode cocoapods

229
推荐指数
9
解决办法
12万
查看次数

正在主线程上执行长时间运行的Parse操作

我收到错误:

"正在主线程上执行长时间运行的Parse操作.在warnParseOperationOnMainThread()上执行调试."

"打破warnParseOperationOnMainThread()进行调试."

我无法在我的代码中找到错误.有人可以告诉我我做错了什么吗?

PFQuery *query = [PFQuery queryWithClassName:@"User"];
[query getObjectInBackgroundWithId:[[PFUser currentUser] objectId] block:^(PFObject *object, NSError *error) {

    self.firstName = object[@"firstname"];
    self.lastName = object[@"lastname"];

    self.nameLabel.text = [[NSArray arrayWithObjects:self.firstName, self.lastName, nil] componentsJoinedByString:@" "];
}];
Run Code Online (Sandbox Code Playgroud)

objective-c ios parse-platform

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

iPhone无法连接Xcode 6 beta

我更新了iOS 8和Xcode 6 beta.当我连接手机时,它会显示为" 不合格的设备 ",您可以在其中选择要运行的平台.

当我尝试在我的实际iPhone上运行该项目时,Xcode中出现一条错误消息:

在此设备上启用开发时遇到错误.

如果有人知道如何解决这个问题,我会非常感激,因为我没有找到关于此错误消息的更多信息.

iphone xcode ios ios8

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

dyld:未加载库:@ rpath/libswiftSwiftOnoneSupport.dylib

我已经构建了一个Swift框架,现在我正在尝试构建一个将使用该框架的Swift iOS应用程序.我收到这个错误:

dyld: Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib
  Referenced from: /Users/tdean/Library/Developer/Xcode/DerivedData/NFLApplication-ejmafvjrlqgjaabggwvadjarjjlg/Build/Products/Debug-iphonesimulator/NFLStatsModel.framework/NFLStatsModel
  Reason: image not found
Run Code Online (Sandbox Code Playgroud)

我搜索了SO并找到了类似的报告并尝试了其中列出的修复程序,包括:

  • 清除我的DerivedData文件夹
  • 重新启动Xcode和iPhone模拟器
  • 确保Always Embed Swift Standard Libraries = YES在我的框架和我的应用程序的构建设置中设置
  • 确保Enable Bitcode=NO在我的框架和我的应用程序的构建设置中设置
  • 确保Runpath Search Paths被设置为@executable_path/Frameworks,无论是在我的框架和我的应用程序的构建设置
  • 将我的Xcode安装中的所有libswift文件复制到项目中的本地副本中,并添加了自定义构建阶段以将这些文件复制到frameworks文件夹中.

在每种情况下,当我尝试运行我的应用程序时,我都会遇到相同的错误.

  • Xcode版本8.1(8B62)
  • Apple Swift 3.0.1版(swiftlang-800.0.58.6 clang-800.0.42.1)

xcode ios swift

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

使用swift自动布局时动画UIView高度

在自动布局之前,我通过设置框架来设置项目中背景的高度animateWithDuration.

func setUpBackground() {
    self.backgroundView.frame = CGRect(x: 0, y: 0, width: 320, height: 10)
    self.backgroundView.backgroundColor = UIColorFromRGB(0x2d2d2d).CGColor
}

func AnimateBackgroundHeight() {
    UIView.animateWithDuration(0.5, animations: {
        self.backgroundView.frame = CGRect(x: 0, y: 0, width: 320, height: 600)    
    })
}
Run Code Online (Sandbox Code Playgroud)

在我将项目转换为自动布局后,我注意到动画发生但背景高度在之后快速恢复到原始大小/样式(界面构建器设置).我读到,当打开自动布局时,约束将覆盖设置UIView尺寸CGRect.

因此,我想知道如何在Auto-layout ON的情况下实现相同的高度变化动画效果.

uiview ios swift xcode6

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

分析器错误:得到插值({{}}),其中表达式是预期的

我使用ng-bootstrap替代angular2中的ui-bootstrap.

我的html如下:

<ul class="list-inline">
    <li class="tag" ngb-dropdown auto-close="outsideClick" 
        *ngFor="let item of ['Elastic Search','Database Theory','CVS'];
        let $index=index;" 
        [ngClass]="{'default-tag': $index==0, 'matched-tag': $index==1, 'unmatched-tag': $index==2 }">
         <a href ngb-dropdown-toggle id="desiredSkill{{$index}}">
             <i class="bi_interface-tick following"></i> {{item}} <i class="bi_interface-more tag-menu-icon"></i>
                            </a>
               <ul class="dropdown-menu tag-menu" ngb-dropdown-menu [aria-labelledby]="desiredSkill{{$index}}">
                     <li><a href>Follow Skill</a></li>
                     <li><a href>Related Jobs</a></li>
                </ul>
     </li>
  </ul>
Run Code Online (Sandbox Code Playgroud)

但是当我运行我的应用程序时,我得到以下错误:

main.browser.ts:25错误:模板解析错误:解析器错误:得到插值({{}})其中表达式在[desiredSkill {{$ index}}]的第12列中的JobDescription @ 174:77("] [咏叹调-labelledby] = "desiredSkill {{$索引}}">

  • "):JobDescription @ 174:77分析器错误:JobDescription @ 174:77中的[desiredSkill {{$ index}}]第13列出现意外的标记'{'("
    ] [aria-labelledby] ="desiredSkill {{$ index }}">
  • "):JobDescription @ 174:77无法绑定到'aria-labelledby',因为它不是'ul'的已知属性.("] [aria-labelledby] ="desiredSkill {{$ index}}">
  • "):JobDescription …
  • angular-ui-bootstrap dropdown angular

    20
    推荐指数
    2
    解决办法
    3万
    查看次数

    libcurl中不支持或禁用协议"https"

    这是我的Podfile内容:

    platform :ios, ‘8.0’
    use_frameworks!
    
    target 'Project-Name' do
    
    pod 'Firebase/Core'
    pod 'Firebase/Messaging'
    
    end
    
    Run Code Online (Sandbox Code Playgroud)

    添加pod 'GoogleMaps'到Podfile 时发生相同的错误.

    pod install --verbose command在终端上运行时出错:

    [!] Error installing Firebase
    [!] /usr/local/bin/curl -f -L -o /var/folders/1t/102_4r0x1_3_5dlq8zdbm27r0000gn/T/d20160902-4388-1omozrn/file.tgz https://www.gstatic.com/cpdc/cc5f7aac07ccdd0a/Firebase-3.5.0.tar.gz --create-dirs --netrc-optional
    
    curl: (1) Protocol "https" not supported or disabled in libcurl
    
    Run Code Online (Sandbox Code Playgroud)

    编辑1: 如何在Mac OS X上启用curl SSL?

    ./configure --with-darwinssl 不工作

    -bash:./ configure:没有这样的文件或目录


    编辑2: 如何在libcurl中启用https支持?

    此命令brew install curl --with-libssh2在终端上执行,但不知道下一步该做什么:

    UB:lib aspl$ brew install curl --with-libssh2 --verbose
    ==> Auto-updated Homebrew!
    Updated 1 tap (homebrew/core).
    No changes …
    Run Code Online (Sandbox Code Playgroud)

    macos google-maps libcurl ios firebase

    15
    推荐指数
    2
    解决办法
    8118
    查看次数

    导入Firebase后,Xcode 8.0 beta会出错

    我使用Xcode 8.0 beta 5或6创建了空的swift项目,并使用像Firebase指南这样的cocoapods导入Firebase.在进口过程中,一切都很好.我用FIRApp.Configure()评论配置firebase .我可以处理身份验证,但当我尝试访问数据库时,它无法正常工作.

    构建时间错误FIRApp.h如下:

    "Conflicting nullability specifier on return types, 'nullable' conflicts with existing specifier 'non null'"
    
    Run Code Online (Sandbox Code Playgroud)

    FIRApp.h构建时错误的屏幕截图

    控制台中还出现以下错误:

    2016-08-26 13:00:32.719: <FIRInstanceID/WARNING> STOP!! Will reset deviceID from memory.
    2016-08-26 13:00:32.719: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"
    
    2016-08-26 13:02:08.329: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries
    
    Run Code Online (Sandbox Code Playgroud)

    我无法解决问题.

    xcode ios firebase swift

    13
    推荐指数
    2
    解决办法
    4024
    查看次数

    在UITableVIew中插入新部分的动画

    我在我的视图上有这个按钮,当我按下它时,我在表格视图中插入一个新的部分(我的逻辑状态在我的

    -(NSInteger) numberOfSectionsInTableView:(UITableView*)tableView
    {
        if (slide==TRUE) return 2;
        return 1;
    }
    
    Run Code Online (Sandbox Code Playgroud)

    而且在我的-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath.我的部分是按照它应该添加的,但是我已经读过一些可以动画的地方,因为当我按下我的按钮时,该部分被添加但没有动画.我想我应该使用它,-(void)insertSections:(NSIndexSet*)sections withRowanimation(UITableViewRowAnimation) animation但我没有在网上找到一个合适的例子.

    animation uitableview ios

    12
    推荐指数
    2
    解决办法
    3万
    查看次数

    在AWS S3上停止/取消上传

    我正在使用AWSLocal内容上传方法上传文件.我需要取消从其他屏幕上传.

    这是上传功能:

    private func uploadLocalContent(localContent: AWSLocalContent) {
        localContent.uploadWithPinOnCompletion(false, progressBlock: {[weak self](content: AWSLocalContent?, progress: NSProgress?) -> Void in
            guard let strongSelf = self else { return }
            dispatch_async(dispatch_get_main_queue()) {
                // Update the upload UI if it is a new upload and the table is not yet updated
                if(strongSelf.tableView.numberOfRowsInSection(0) == 0 || strongSelf.tableView.numberOfRowsInSection(0) < strongSelf.manager.uploadingContents.count) {
                    strongSelf.updateUploadUI()
                } else {
    
                    for uploadContent in strongSelf.manager.uploadingContents {
                        if uploadContent.key == content?.key {
                            let index = strongSelf.manager.uploadingContents.indexOf(uploadContent)!
                            let indexPath = NSIndexPath(forRow: index, inSection: …
    Run Code Online (Sandbox Code Playgroud)

    iphone amazon-s3 ios swift

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