appdelegate

Apple iTunes Connect Analytics: attribution provider and campaign id value passing to the app delegate

不问归期 提交于 2019-12-03 06:48:08
问题 The new iTunes connect has analytics features now. You can specify the provider (pid) id and campaign id (cid) in the url. e.g. https://itunes.apple.com/fr/app/candy-crush-saga/id553834731?mt=8&pid=1234&cid=My_Campaign Can you pass those values into the app for various purposes? I could not find anything that points to that, even after checking: didFinishLaunchingWithOptions:(NSDictionary *)launchOptions ref: http://www.applift.com/blog/new-era-attribution-analytics.html 回答1: Unfortunately

iPhone registerForRemoteNotificationTypes does not generate an error but does not fire delegate that gives device token

半腔热情 提交于 2019-12-03 05:58:07
I am developing an iPhone app that needs push notification. I followed the instructions for creating the certifications and modifying the app ID. I am not totally sure I did this correctly, but I did follow the directions. Any idea how I can check to see if this is OK? When I ran in the emulator I did get an error message saying that the emulator did not support push notifications. This was somewhat expected. BTW: I have seem this question out there a few times. It always seems to be with a jail-broken phone. My phone is NOT jail-broken. But when I debug on the iPhone the

Replace xib file with Main.storyboard file in App delegate class

半腔热情 提交于 2019-12-03 02:43:31
Right now project is using MainWindow.xib in App delegate class as main nib file. It has this code in main.m file int main(int argc, char *argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; int retVal = UIApplicationMain(argc, argv, nil, nil); [pool release]; return retVal; } I want to replace it with Mainstoryboard. I changed it in the info.plist file as Mainstoryboard file base name but it shows error that there is no app delegate set. An app delegate class must be specified to use a main storyboard file . What coding i should do in App delegate class to use

Swift 4 ,must be used from main thread only warning

爱⌒轻易说出口 提交于 2019-12-03 01:12:41
When I using Swift4 in Xcode 9 gives me UIApplication.delegate must be used from main thread only .... must be used from main thread only UI API called from background thread Group Purple Warning. My codes; var appDelegate = UIApplication.shared.delegate as! AppDelegate public var context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext let prefs:UserDefaults = UserDefaults.standard var deviceUUID = UIDevice.current.identifierForVendor!.uuidString Warning line is; public var context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer

Launching ViewController from AppDelegate

℡╲_俬逩灬. 提交于 2019-12-02 23:31:35
I have a custom URL scheme and i want to open a certain ViewController which is not the root when i go to this URL. I have been able to do that and what remains is pushing this ViewController into the navigationController from the AppDelegate where i handle my URL like this : - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { if ([[url scheme] isEqualToString:@"njoftime"]) { NSDictionary *getListingResponse = [[NSDictionary alloc]init]; getListingResponse = [Utils getListing:[url query]];; if ([

Advice for app development iOS. ApplicationDidEnterBackground

て烟熏妆下的殇ゞ 提交于 2019-12-02 23:17:25
问题 I´m having some fun with swift and I´m trying to make a simple game. I got a few variables that changes during the game. What´s the best practice for saving those variables if applicationDidEnterBackground and for all those other functions in appDelegate . What I believe is to store them in core data and load them when app starts up again. Anyone with some experience around this theme? 回答1: If its just a few variables you want to store and manage you could use NSUserDefaults . // Create

presentViewController in AppDelegate with delay in iOS8

本小妞迷上赌 提交于 2019-12-02 21:17:21
So I had a full working solution in iOS7 that displays a LoginViewController via presentViewController in the AppDelegate's didFinishLaunching. Basically I am doing something like this: UIViewController *backgroundViewController = ... self.window.rootViewController = backgroundViewController; [self.window makeKeyAndVisible]; [self.window.rootViewController presentViewController:loginViewController animated:NO ...] In iOS8 I see a jump. First I see the backgroundViewController then after about 1 second or so the login appears. So, how can I prevent this jump in iOS8? I am seeing that are a ton

Apple iTunes Connect Analytics: attribution provider and campaign id value passing to the app delegate

天大地大妈咪最大 提交于 2019-12-02 20:27:41
The new iTunes connect has analytics features now. You can specify the provider (pid) id and campaign id (cid) in the url. e.g. https://itunes.apple.com/fr/app/candy-crush-saga/id553834731?mt=8&pid=1234&cid=My_Campaign Can you pass those values into the app for various purposes? I could not find anything that points to that, even after checking: didFinishLaunchingWithOptions:(NSDictionary *)launchOptions ref: http://www.applift.com/blog/new-era-attribution-analytics.html Unfortunately these params are not passed into the app. They are only used for iTunes Connect stats. Here are the two common

Advice for app development iOS. ApplicationDidEnterBackground

跟風遠走 提交于 2019-12-02 13:05:19
I´m having some fun with swift and I´m trying to make a simple game. I got a few variables that changes during the game. What´s the best practice for saving those variables if applicationDidEnterBackground and for all those other functions in appDelegate . What I believe is to store them in core data and load them when app starts up again. Anyone with some experience around this theme? If its just a few variables you want to store and manage you could use NSUserDefaults . // Create defaults let defaults = NSUserDefaults.standardUserDefaults() // Set an int for highScoreKey in our defaults

When App Delegate's method willTerminate is executed?

余生颓废 提交于 2019-12-02 08:16:31
问题 currently I am testing AppDelegate methods, when they are executed by adding NSLog to every method. What is not clear to me is when method applicationWillTerminate is executed? I've tried to put app in background, then to terminate it, but log from Terminate method is not executed. What is executed is this: 2015-09-01 16:24:01.512 TestQuestions[2351:110179] didFinisLaunching 2015-09-01 16:24:02.530 TestQuestions[2351:110179] didBecomeActive 2015-09-01 16:24:05.864 TestQuestions[2351:110179]