Crash with RevMob on iOS - ios

I recently upgraded the RevMob SDK of my cocos2d project, using Xcode 4.5. Below is a code to show what I have done:
#import <StoreKit/StoreKit.h>
#import <RevMobAds/RevMobAds.h>
- (void) applicationDidFinishLaunching:(UIApplication*)application{
[RevMobAds startSessionWithAppID:#"my app id"];
//some code here...
}
On running the project, on device or simulator, the app crashes with this error:
+[RevMobAds startSessionWithAppID:]: unrecognized selector sent to class
However, one thing which might be useful, is that when I added the RevMob framework to my Xcode, it gave me compilation errors (using LLVM GCC 4.2) for which I followed this answer.

This method was included in version 5.0.0 (RevMob changelog), so make sure that the framework that you are using is at least 5.0.0.

Related

Xcode 10.2 Use of undeclared identifier error when accessing FrameworkSDK

I have just upgraded from MacOS Sierra to Mojave and from Xcode 10.1 to 10.2
Exactly same app (given in a zip) builds on a MacOS Mohave machine in Xcode 10.2 but it doesn't build on mine machine.
I tried restart, removing derived data etc:
#import "ViewController.h"
#import "MyFrameworkSDK/MyFrameworkSDK-Swift.h"
#interface ViewController ()
#end
#implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *applicationId = [[NSString alloc] init];
applicationId = [MyFrameworkSDK exposedMethod]; // here the error is triggered: Use of undeclared identifier 'MyFrameworkSDK'
printf("%s", applicationId);
// Do any additional setup after loading the view.
}
#end
Framework has been imported correctly, included in Linked frameworks and libraries, Bitcode is set to No, Frameworks path set etc, I repeat: it's exactly same project that on another machine works.
I tried even a re-install of Xcode. It didn't work.
Question:
What can be the cause of this? Other local cache, Xcode issues, any privacy set for framework not to be public?
I lost about 1 day with this issue.
Any help would be greatly appreciated.
Update:
It seems there might be some privacy limitations set for framework, the person that is able to access it is in the development team of the framework. If he changes Xcode team to none or another team same error shows up on that machine too.

error: no known class method for selector 'isPedometerEventTrackingAvailable'

I am using Diagnostic plugin to my IOS IONIC 2 app. i am getting an error when i do ionic build ios with production mode (--prod). Could anyone help me how to solve this issue?
Thanks in advance:)
error: no known class method for selector
'isPedometerEventTrackingAvailable'
return [CMPedometer respondsToSelector:#selector(isPedometerEventTrackingAvailable)] &&
[CMPedometer isPedometerEventTrackingAvailable];
Check github issue.
Also here.
Either update your Xcode version to 8.0 or above.
cordova.plugins.diagnostic#3.2.0 adds support for the new
UserNotifications framework added in iOS 10. To build using v3.2.0,
you will need to use XCode 8+ because there's no way to conditionally
include a framework using the tag in the plugin.xml.
Or downgrade your diagnostic plugin to 3.1

Can not find <coreaudiokit/coreaudiokit.h> in ios8 xcode6

I am trying to get the MIDI over BLE working as discussed at session 501 at the WWDC 2014.
I get an error "file not found" when trying to #import CoreAudioKit/CoreAudioKit.h framework
I have included the framework in the build menu and tried putting the #import line in the .h or .m ViewController file.
It recognizes and compiles CoreBluetooth/CoreBluetooth.h with no problems.
This is a brand new installation of Xcode 6 downloaded yesterday (13 Sept 2014)
I feel like Apple has not turned on the switch for CoreAudioKit for iOS.
Any guidance on what I am doing wrong would be most gratefully received.
Thank you,
Ken
CoreAudioKit is not compatible with the iOS Simulator. Run it on a device, and it should build just fine
I you want to use the simulator for some other tests (not related to midi over bluetooth) you can use a conditional import of the framework:
#ifdef __APPLE__
#include "TargetConditionals.h"
#if TARGET_IPHONE_SIMULATOR
#compatibility_alias CABTMIDICentralViewController UIViewController;
#elif TARGET_OS_IPHONE
#import <CoreAudioKit/CoreAudioKit.h>
#endif
#endif
You still have to do optional linking of the framework in your build settings since CireAudioKit is not available at all on the simulator (OS X) platform.

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

#import"PGPlugin.h" "file not found" error in phonegap2.0 on xcode4.2

I am new to phonegap2.0. Now i want to create iphone app using phonegap. I am using xcode4.2 on snow leopard mac. I installed phonegap on my mac. But now i am following Embedding Cordova Webview on IOS using this below link:
"http://docs.phonegap.com/en/2.0.0/guide_cordova-webview_index.md.html#Embedding%20WebView"
But when i run the coding in xcode4.2 Iphone 5.0 Simulator. I got #import"PGPlugin.h" "file not found" error.
"#ifdef PHONEGAP_FRAMEWORK
   #import <PhoneGap/PGPlugin.h>
#else
   #import "PGPlugin.h"
#endif".
I have attached the error page Screen Shot for your reference.
Change this part:
#ifdef PHONEGAP_FRAMEWORK
#import <PhoneGap/PGPlugin.h>
#else
#import "PGPlugin.h"
#endif
with the following:
#import <Cordova/CDVPlugin.h>
Also, since you're using version 2.0.0 of cordova, you may need to change everything beginning with PG (for example: PGPlugin) to CDV (ex: PGPlugin --> CDVPlugin).
The thing is the previous versions of plugins used to begin with PG.
Let me know if this works.
This doesn't work for the most recent versions of Cordova / Phonegap.

Resources