Compile error with cocoa pod code in iOS 8 beta - ios

I'm developing in Xcode6 Beta 6 for iOS 8.
I am encountering an code error on an imported LastFM Cocoa Pod:
when I try to compile, but I can't seem to figure out what's causing the error. (Using all the code from the example)
I keep getting the following error in my AppDelegate.m file :
Property 'cacheDelegate' not found on object of type 'LastFm *'
I have however ensured to have the following code in my LastFm.h file :
#interface LastFm : NSObject
#property (unsafe_unretained, nonatomic) id <LastFmCache> cacheDelegate;
Any thought why it would claim I have not set the property in LastFM ? Not sure if this is an iOS 8 issue, or simply an error on my part?
Thanks for any suggestions.

Related

Scoutmaps iOS SDK pod seems to be missing public headers

So I tried to update to scoutmap ios sdk 2.5.1 via pods and I'm getting the error:
****/Pods/ScoutMaps-iOS-SDKTools/SDKTools/Navigation/SKTNavigationManager+NavigationState.m:259:40: No visible #interface for 'SKRoutingService' declares the selector 'zoomToRouteWithInsets:'
Any idea how to fix this? Thanks

NS_AVAILABLE(10_10, 8_0) causing crash when building for iOS 7

I developed an application and released it for iOS 7 last year and all was good. I updated the app for iOS 8 recently and released the update with the development target still set to iOS 7. Now I've been getting emails that the app was crashing for iOS 7 users but working fine for iOS 8 users. After debugging I found that what was causing the crash was the following property I had defined on an NSOperation subclass -
#property (copy, nonatomic) NSString *name;
The crash I'm getting is "unrecognized selector sent to instance".
In iOS 8, Apple had added the following property to NSOperation -
#property (copy) NSString *name NS_AVAILABLE(10_10, 8_0);
So why does this cause the application to crash on iOS 7 when I've defined the property on the subclass? And also, how can I avoid this happening in the future as Xcode doesn't give me any warning?
Thanks.
Here's the problem. You are building your app with a Base SDK of iOS 8. So your class's name property doesn't do anything because the compiler sees that the subclass (NSOperation) already has a property named name. In other words, when built with a Base SDK of iOS 8, the compiler does not synthesize the setter and getter in your subclass because it is redundant with the NSOperation.
But when the app is run under iOS 7, NSOperation (and your subclass) do not have this name property so you get the runtime error trying to use the non-existent getter or setter methods for the property.
The best solution is to rename your property. Then your class's property will be generated and used.

Swift and Salesforce IOS SDK

I am trying to create a connected app with Salesforce IOS SDK and Swift and followed the steps mentioned in the https://www.youtube.com/watch?v=9Mt02DzsOBo but as try to attach the "Appname-Swift.h"file in the AppDelegate.m file I am getting an error.Please help what can be done next.
1)I have created the native connected app as per Salesforce IOS
Description
2)Created the bridge for Swift
"MySampleApp-Bridging-Header.h"
3)Added SFRestDelegate to RootVC.Swift
4)Imported the important header files to
"mySampleApp-bridging-Header.h" that is
#import <UIKit/UIKit.h>
#import "SFRestAPI.h"
5)As soon I am trying to import #import "MySampleApp-Swift.h" I am getting the error
I am using OSX mavericks with XCode-6(4beta)
I don't think in the video or in the sample code repository there is a file named MySampleApp-Swift.h

Unsolve error when declaring properties and synthesize for XMPP iOS

Recently I trying to develop a custom instant messaging iOS app with XMPPframework, I follow the tutorial according to >>> http://code.tutsplus.com/tutorials/building-a-jabber-client-for-ios-xmpp-setup--mobile-7190 and it behave as the tutorial until these errors come out. I am a beginner on developing an iOS app and using XMPP so I am suffering with how to fix these unknown errors.
I am using openfire as server, xCode version is 4.6.3, my Mac OS version is 10.7.5.
here is some code snippets
in my "JabberClientAppDelegate.h" :
#property (nonatomic, assign) id _chatDelegate;
#property (nonatomic, assign) id _messageDelegate;
and my "JabberClientAppDelegate.m" :
#synthesize _chatDelegate;
#synthesize _messageDelegate;
both of these properties is displaying errors that stated :
Existing instance variable '_chatDelegate' for property
'_chatDelegate' with assign attribute must be __unsafe_unretained
Existing instance variable '_messageDelegate' for property
'_messageDelegate' with assign attribute must be __unsafe_unretained
please guide me on how to solve these errors and I truly appreciate.

Xcode 5 gives error when run old projects

I have some problems when i am run any projects in Xcode 5 it gives error like
Duplicate interface definition for class 'ViewController'
it is happen in most of situations if i download any project from git hub or from other sources.
But if i run that project in earlier version of Xcode than its working fine.
I have tried to run it Xcode 4.6 .
here is sample code that i run in Xcode 5 and gives error.
So whats problem with Xcode 5 ??
Solved:
By some Mistake i have Change System Header file from UIKIT > UITableViewController.h to
NS_CLASS_AVAILABLE_IOS(2_0) #interface ViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
SO in any project if there is a viewcontroller named ViewController it gives this error,
So i have look in old xcode and changed it to
NS_CLASS_AVAILABLE_IOS(2_0) #interface UITableViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>

Resources