API Key Kudan AR not valid - kudan

When i use the following code in my Appdelegate class in xcode it should normally let me access the API from KudanAR but it doesn't let me it says the key is invalid when this is the key I got from their site does anyone have a valid key?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[[ARAPIKey sharedInstance] setAPIKey:#"GAWQE-F9AQU-2G87F-8HKED-Q7BTG-TY29G-RV85A-XN3ZP-A9KGM-E8LB6-VC2XW-VTKAK-ANJLG-2P8NX-UZMAH-Q"];
return YES;
}

It looks like the key you are trying to use is for the eu.kudan.ar bundleID.
If the AR is failing to start because of an invalid api key, that would mean that you haven't entered the matching bundleID into your app's plist.

Yeah it was because I hadn't used the correct bundle id I found out last night thrue Kudan's support services

Related

WidgetKit: deep-link from widget to macOS app

I am adopting my iOS widget to my Mac app, and one thing I can't figure out is when I do a deep-link from the widget to the Mac app, where would that get detected? On iOS, it calls:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
But I can't find any equivalent method in the NSApplicationDelegate. The closest method is
- (void)application: (NSApplication *)application openURLs:(nonnull NSArray<NSURL *> *)urls
But this doesn't get invoked from the widget's Link.
Is there some other way to handle this on macOS? Do I need to configure something in particular for the openURLs method to be called?
EDIT:
After more testing, I've realized that the application: openURLs method should be called, whether through the widget Link or directly called using the URL scheme (as defined in the Info.plist). I verified this with another test app as well, where I can use [[NSWorkspace sharedWorkspace] openURL: testURL] to open the test app and the application: openURLs DOES get called. But it's not working for my main app for some reason, even though I've followed the same steps and defined the URL scheme in CFBundleURLTypes in the Info.plist file. The main app was created many years ago, whereas the test app was created just today.
Any ideas why the openURLs method isn't getting called in my main app?

Parse.com Energy Impact?

in my app I'm using the popular service Parse.com and I noticed that it is giving me some problems of energy impact ...
I did some tests and the problem of the energy (that we can all see in xcode in Debag Navigator) is displayed when I insert in AppDelegate the prompts to enter my account number and ID of the APP Parse.com ... Someone He has noticed this problem? why this strong consumption ?? you can 'do about it? I would find myself with memory and battery problems during the development of my app ...
I show you the code colpevo my strange energy impact (I only files in my app I just started so it is not even a big overage)
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[Parse setApplicationId:PARSE_APP_ID
clientKey:PARSE_CLIENT_KEY];
return YES;
}

How do I trouble shoot push notifications error "no valid 'aps-environment"

I'm trying to retrieve my device token from my iPhone and send that token to a server for use in push notifications. I've logged into the developer porthole, added an application, and downloaded the certificate. I added this code to my application didFinishLaunching
NSLog(#"Registering for remote notifications");
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
I also added
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSLog(#"deviceToken: %#", deviceToken);
}
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
{
NSLog(#"Error in registration. Error: %#", error);
}
I'm getting this error
Error in registration. Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application"
One thing I noticed is that in the developer porthole, it appended a number on the begining of the bundle ID under "description" I think the problem may have something to do with that. How can I make sure that the app details in the porthole are the same as in my target. Also, am I missing a step? do I have to do anything further with the certificate and xcode?
Do you see the
<key>aps-environment</key>
string when opening the mobileprovision you are signing with in the text editor? If you don't, try re-issuing the mobileprovision in the developer.apple.com admin panel

Push Notifications - registerForRemoteNotification FAILED

I tried to get my app ready for Push Notifications, I insert the following code in the app delegate but when I running the App on my Device (iPhone 3Gs - iOS 5.1.1) the app start's normal but whiteout the "Push Alert" how asks the user to allowed notifications!!!
Can someone help??
Best regards from Germany!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|
UIRemoteNotificationTypeAlert|
UIRemoteNotificationTypeSound];
// Override point for customization after application launch.
return YES;
}
you have to create a new appID in the iOS Provisioning Portal (without a wild-card character) like
com.yourcompanyname.yourappname
and enable push notifications for this app id.
Then create a new provisioning profile which you use to build your app. It should work then!
Be sure to change you bundle id in your project settings too.
Hope this helps.

checking app download completion from my own app

so what I'm trying to do here is the following: let's say the user has already installed my app, app "A", from the store. On certain conditions, app "A" will open an URL pointing to a specific app page,app "B", on the App Store passing a redemption code so the user of app A is able to download app "B" without paying any additional money. So here's what I'm doing:
NSString *urlBase = #"https://phobos.apple.com/WebObjects/MZFinance.woa/wa/freeProductCodeWizard?code=";
NSURL *urlRedemptionCode = [NSURL URLWithString:[urlBase stringByAppendingString:code]];
[[UIApplication sharedApplication] openURL:urlRedemptionCode];
This is working fine, so the question is: how do I know that the download of app "B" was completed correctly (or with errors) so I can take appropriate action in app "A"?
Thanks so much.
You could use NSURLConnection in combination with NSURLRequest and NSURLResponse instead of directly calling [[UIApplication sharedApplication] openURL:yourURL].
NSURLConnection will allow you to set a delegate that will be notified when:
Data is (partially) received
Connection failed
Download finished
etc.
Check Using NSURLConnection at the official documentation.

Resources