I have installed GoogleMaps SDK using CocoaPods.
For some screen I need to use Google Places API
Here is the code
GMSAutocompleteViewController *acController = [[GMSAutocompleteViewController alloc] init];
acController.delegate = self;
[self presentViewController:acController animated:YES completion:nil];
Which I have got from https://developers.google.com/places/ios-api/autocomplete
The error - use of undeclared identifier 'GMSAutocompleteViewController'
Have you added #import <GoogleMaps/GoogleMaps.h> to the file?
The other possibility is that you have an older version of the GoogleMaps pod (GMSAutocompleteViewController was added in version 1.11). To fix this, just run
pod update
in the project directory.
Related
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.
I need to Integrate Paytm payment gateway from an Appcelerator project for IOS devices. So I was thinking to use the mobile module to call the SDK. I can build and run their sample SDK using Xcode project and get the result, but having difficulties to implement in my modules. From my understanding:
The SDK is trying to call a webview and send the data then get response from it.
In the SDK ViewController, it extends to UIViewController <PGTransactionDelegate> but the module is extended to TiModule. My guess is that I need to create a ViewController and call it from the module, but somehow it always failed when I build the Appcelerator project using that module. The cause is probably this line in the module function (if I comment it, I can build the project and get the value) :
-(id)makePayment:(id)args {
ViewController *controller = [[ViewController alloc] init];
[[TiApp app] showModalController:controller animated:YES];
NSString *orderID = [args objectAtIndex:0];
return orderID;
}
Is there anyone who able to integrate Appcelerator with Paytm SDK? Any leads or subtle example is very much appreciated.
Paytm SDK : https://github.com/Paytm-Payments/Paytm_iOS_App_Kit
Appcelerator version 4.10
Titanium SDK version 6.1.2.GA
Xcode version 9.1
TBH I am new to both iOS and Appcelerator, but this is client's requirement.
I have integrated google SDK manually without cocoapods because I'm using it inside a static library. And I have added all the frameworks (AVFoundation,..Etc) needed for IMA SDK.
My app getting crashed whenever I am trying to set IMASettings with the language.
Here is the error:
+[NSDictionary gtm_dictionaryWithHttpArgumentsString:]:
"unrecognized selector sent to"
This is my code :
- (IMASettings *)createIMASettings {
IMASettings *settings = [[IMASettings alloc] init];
settings.language = #"en";
return settings;
}
I have initialized the ads loader here :
self.adsLoader = [[IMAAdsLoader alloc] initWithSettings:[self createIMASettings]];
You miss a category with the method gtm_dictionaryWithHttpArgumentsString
now most likely, this IS part of the SDK but haven't setup the linker right
add -ObjC to your app's linker flags
if that isn't it, you're missing another framework from google - the google toolbox for mac
I am trying to upgrade a facebook app from using the soon-to-be-deprecated 1.0 API to the current one. I have replaced the frameworks (FBSDKCoreKit, FBSDKLoginKit) with the current ones (4.0.1). Doing this upgrades the app when I log in using the web-fallback. However, when I log in through the facebook app I still get the deprecation warning. This is my (abstracted) code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSLog(#"SDK version: %#", [FBSDKSettings sdkVersion]); // Prints "SDK version: 4.0.1
UIViewController *vc = [UIViewController new];
FBSDKLoginButton *loginButton = [FBSDKLoginButton new];
loginButton.frame = CGRectMake(10, 200, 300, 50);
[vc.view addSubview:loginButton];
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.rootViewController = vc;
[self.window makeKeyAndVisible];
return YES;
}
When logging in, I see the following warning message:
"You must upgrade this app to Graph API v2.x"
I am aware of these two questions:
Facebook iOS SDK: Why am I getting "You must upgrade this app to Graph API v2.x"?
iOS - Facebook - You must upgrade this app to Graph API v2.x
None of them solves my problem though.
The problem is not that I am using an old SDK-version. I have verified that the files on disk and in the project are the ones downloaded from the 4.0.1 SDK, which I also verify by printing the SDK-version. I have tried deleting and re-adding them several times.
The problem is not the code. My code does basically nothing, just calls the built in login-code for fb.
This is the iOS SDK, so I do not specify the urls for the API-calls myself. The official documentation states that using the most recent SDK should ensure that the correct urls are used.
So the problem is either in some project setting, but they don't seem to specify api-version, or in the facebook app itself, where I cannot find it. Any help is appreciated.
Same story here.
Purge the entire DerivedData (/Users/.../Library/Developer/Xcode/DerivedData) folder.
It helped 4
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.