App crashes on [TestFlight takeOff:#""] in iOS 6.1.2 - iphone

I have TestFlight SDK integrated into my iOS app. In iOS 6.1.2, sometimes the app crashes for the first-time app launch at TestFlight's -takeOff: method.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions
{
#ifdef TESTING
[TestFlight takeOff:#"MY_TESTFLIGHT_TEAM_TOKEN"];
[TestFlight setDeviceIdentifier:[[UIDevice currentDevice] uniqueIdentifier]];
#endif
// Override point for customization after application launch.
ProductListViewController *products=[[ProductListViewController alloc] initWithNibName:#"ProductListViewController" bundle:nil];
UINavigationController *navigationController=[[UINavigationController alloc] initWithRootViewController:products];
[products release];
navigationController.toolbarHidden = YES;
navigationController.navigationBarHidden = YES;
self.rootViewController = navigationController;
[self.window setRootViewController:rootViewController];
[navigationController release];
[self.window makeKeyAndVisible];
return YES;
}
Any help is greatly appreciated.
Thanks

This is a bug in the Testflight SDK. They ask you to update to the latest beta version.
See iOS exception EXC_GUARD

Could it be that you've forgotten to include the TestFlight SDK folder properly?

Related

React-Native Build on iphone 7+

I am new to react native and just started learning it. I have downloaded some sample apps from github and was using them in my learning process.
I am a true beginner..
I have setup my mac pro with react native and in this case I have downloaded an app called movieapp. I have installed it and when I run it in the simulator it works perfect.
Note: I have a paid developer account with apple for Xcode and I am running version 8.3.1 (8E1000a)
I have changed the app for my signing info.
When I run build this app from Xcode to my iPhone 7+ I get this screen
iPhone 7+ screen shot
Here is a screen shot of the Terminal window that pops up when this is built in Xcode.
[Mac Terminal Screen][2]
Could someone please point me in the correct direction to solve this issue?
#import "AppDelegate.h"
#import "RCCManager.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import "ReactNativeConfig.h"
#implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
// rn-config
NSDictionary *config = [ReactNativeConfig env];
#ifdef DEBUG
jsCodeLocation = [NSURL URLWithString:#"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
#else
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:#"index.ios" fallbackResource:nil];
#endif
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
[[RCCManager sharedInstance] initBridgeWithBundleURL:jsCodeLocation];
// RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
// moduleName:#"movieapp"
// initialProperties:nil
// launchOptions:launchOptions];
// rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
//
// self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
// UIViewController *rootViewController = [UIViewController new];
// rootViewController.view = rootView;
// self.window.rootViewController = rootViewController;
// [self.window makeKeyAndVisible];
return YES;
}
#end

iPad simulator just shows black screen

I am developing an app in Xcode, I got it working and was putting some finishing touches.
Then I upgraded Xcode to the latest version, changed a bit the code for the Autorotate options (my app shouldn't autorotate) and fiddled with the supported rotation (landscape vs. portait).
Then suddenly my debug in iOs simulator just shows a black screen. The app builds fine but nothing is shown in the simulator....
And I can't really understand why...
Using Xcode 4.6
i don't have an ApplicationDidFinishLoading but I have this:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[window addSubview:viewController.view];
[window makeKeyAndVisible];
return YES; }
Use Below Code instead in your ApplicationDidFinishLoading
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[YourFirstViewController alloc] initWithNibName:#"YourFirstViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
This may solve your problem. Please try it.
commenting the "shouldAutorotateToInterfaceOrientation" solved my problem.

Error occurred in appDelegate method

Error occurred in appDelegate.m file while i run the sample signal aborted at
self.view.controller=root.view.controller
please help me i added code below
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
/* bad signal occurred at this line */
self.window.rootViewController=self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
thanks
The UIWindow rootViewController property doesn't exist before iOS4. If you're trying to run this code on an device with iOS 3 or older, it will crash.
In your AppDelegate, you can use addSubview instead.
//self.window.rootViewController = self.viewController; // Only iOS >= 4
[self.window addSubview:self.viewController.view];
[self.window makeKeyAndVisible];
return YES;
Hope this helps.
Your syntax for self.view.controller = root.view.controller is a bit weird. I think you mean self.viewController = rootViewController ? Even so, that is incorrect.
Try something like -
self.viewController = [[YourViewController alloc]init];
self.window.rootViewController = self.viewController;
Replace YourViewController with the class of your controller.

how to do different coding for iphone and ipad in same .m file in universal app?

I have created app for iPhone. I have no of table views, image views, map views in my app. All data coming through web service. And I've given some static sizes for image and other views through coding. now, I need the same app for iPad. So i have to change coding of view sizes for Ipad. I need to do different coding for iPhone and iPad in the same .m file. Anyone pls suggest me how to do that!!!
Till i understood your question, i think this is what u need:
if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
{
// place the iphone code
}
else
{
// place the ipad code
}
and you can refer to this post : http://iphonedevelopment.blogspot.in/2010/04/converting-iphone-apps-to-universal.html
As you can see when you choose a universal app in the starting when you are taking a new project - in universal app Appdelegate.m file the apple provides the code for that.
see this -
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.viewController = [[ViewController alloc] initWithNibName:#"ViewController_iPhone" bundle:nil];
} else {
self.viewController = [[ViewController alloc] initWithNibName:#"ViewController_iPad" bundle:nil];
}
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
by same method you can distinguish the iPad and iPhone.
Thank You!!

How to start a project with both outputs iPhone & iPad?

Using the Pre Release Xcode 3.2.3 I get this as a Startup Project
(source: balexandre.com)
What should I chose / do to great a project that can have both iPad and iPhone as a target (not showing the iPhone App on iPad but a real iPad View)?
Thank you.
To avoid problems:
iPhone OS 3.1.3 is the latest release on iPhone
iPhone OS 3.2 is the latest release on iPad
My question does not infringe any agreements that me and Apple are bound to, as my question is regarding those already public Releases.
I just stated that on my Operating System I'm running the Xcode 3.2.3, that is all.
just found out a simple way:
alt text http://www.balexandre.com/temp/2010-04-17_1242.png
alt text http://www.balexandre.com/temp/2010-04-17_1241.png
Then, if you want to switch to XIB files per device, let's say, the MainView for iPhone is A and the MainView for iPad is B, in your AppDelegate you add this:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// The default have the line below, let us comment it
//MainViewController *aController = [[MainViewController alloc] initWithNibName:#"MainView" bundle:nil];
// Our main controller
MainViewController *aController = nil;
// Is this OS 3.2.0+ ?
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
// It's an iPad, let's set the MainView to our MainView-iPad
aController = [[MainViewController alloc]
initWithNibName:#"MainView-iPad" bundle:nil];
else
// This is a 3.2.0+ but not an iPad (for future, when iPhone runs with same OS than iPad)
aController = [[MainViewController alloc]
initWithNibName:#"MainView" bundle:nil];
#else
// It's an iPhone (OS < 3.2.0)
aController = [[MainViewController alloc] initWithNibName:#"MainView" bundle:nil];
#endif
// Let's continue our default code
self.mainViewController = aController;
[aController release];
mainViewController.view.frame = [UIScreen mainScreen].applicationFrame;
[window addSubview:[mainViewController view]];
[window makeKeyAndVisible];
return YES;
}
You can choose the Application Type as "Universal" .