我在iPhone 5s上使用Xcode 6 beta和iOS 8,iphone 4s是标准的ios 7.1手机。
该应用程序在iPhone 5s上运行良好,但只要尝试iphone 4s或iPhone 4s模拟器。 应用程序爆发并抛出以下错误
dyld:未找到符号:_NSURLAuthenticationMethodClientCertificate 参考自:/ Users / MIkeAspinall 1 / Library / Developer / CoreSimulator / Devices / xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx / data / Applications / xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx / WeddingsAndMore.app / WeddingsAndMore 预期在:/Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/Frameworks/CFNetwork.framework/CFNetwork in / Users / MIkeAspinall 1 / Library / Developer / CoreSimulator / Devices / xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx / data / Applications / xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx / WeddingsAndMore.app / WeddingsAndMore (lldb)
我不确定为什么会这样。但iPhone 5s模拟器抛出同样的错误。它似乎只能在iOS 8上运行。
为ios 7.1手机设置了设置 我也使用parse.com进行数据访问
我的手机是iphone 5s运行ios 8 beta
iphone 4s正在运行ios 7.1
模拟器在xcode 6beta中运行
app设置为在ios 7.1或更高版本上运行。 我正在使用xcode 6beta 希望能清除我所拥有的东西
在第一个视图控制器上打开代码
@interface DMKHomeViewController (UIViewcontroller )
@end
@implementation DMKHomeViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
-(BOOL) hasInternet{
Reachability *reach = [Reachability reachabilityWithHostName:@"www.bbc.co.uk"];
NetworkStatus internetStats = [reach currentReachabilityStatus];
if (internetStats == NotReachable) {
UIAlertView *alertOne = [[UIAlertView alloc] initWithTitle:@"No Internet Connection" message:@" A connection To The Internet IS Required While Running This App. Please Reconnect To Continue" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:@"Cancel", nil];
[alertOne show];
}
else {
UIAlertView *alerttwo = [[UIAlertView alloc] initWithTitle:@"Internet Connection Active" message:@"A connection To The Internet IS Required While Running This App. Your Connection Is Live... Thankyou." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel", nil];
[alerttwo show];
}
return YES;
}
- (void)viewDidLoad
{
[super viewDidLoad];
[self hasInternet];
if (![PFUser currentUser]) { // No user logged in
// Create the log in view controller
PFLogInViewController *logInViewController = [[PFLogInViewController alloc] init];
[logInViewController setDelegate:self]; // Set ourselves as the delegate
// Create the sign up view controller
PFSignUpViewController *signUpViewController = [[PFSignUpViewController alloc] init];
[signUpViewController setDelegate:self]; // Set ourselves as the delegate
// Assign our sign up controller to be displayed from the login controller
[logInViewController setSignUpController:signUpViewController];
// Present the log in view controller
[self presentViewController:logInViewController animated:YES completion:NULL];
}
}
// Sent to the delegate to determine whether the log in request should be submitted to the server.
- (BOOL)logInViewController:(PFLogInViewController *)logInController shouldBeginLogInWithUsername: (NSString *)username password:(NSString *)password {
// Check if both fields are completed
if (username && password && username.length != 0 && password.length != 0) {
return YES; // Begin login process
}
[[[UIAlertView alloc] initWithTitle:@"Missing Information"
message:@"Make sure you fill out all of the information!"
delegate:nil
cancelButtonTitle:@"ok"
otherButtonTitles:nil] show];
return NO; // Interrupt login process
}
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
self.canDisplayBannerAds = YES;
}
// Sent to the delegate to determine whether the sign up request should be submitted to the server.
- (BOOL)signUpViewController:(PFSignUpViewController *)signUpController shouldBeginSignUp:(NSDictionary *)info {
BOOL informationComplete = YES;
// loop through all of the submitted data
for (id key in info) {
NSString *field = [info objectForKey:key];
if (!field || field.length == 0) { // check completion
informationComplete = NO;
break;
}
}
// Display an alert if a field wasn't completed
if (!informationComplete) {
[[[UIAlertView alloc] initWithTitle:@"Missing Information"
message:@"Make sure you fill out all of the information!"
delegate:nil
cancelButtonTitle:@"ok"
otherButtonTitles:nil] show];
}
return informationComplete;
}
// Sent to the delegate when a PFUser is signed up.
- (void)signUpViewController:(PFSignUpViewController *)signUpController didSignUpUser:(PFUser *)user {
[self dismissViewControllerAnimated:YES completion:NULL]; // Dismiss the PFSignUpViewController
}
// Sent to the delegate when the sign up attempt fails.
- (void)signUpViewController:(PFSignUpViewController *)signUpController didFailToSignUpWithError: (NSError *)error {
NSLog(@"Failed to sign up...");
}
// Sent to the delegate when the sign up screen is dismissed.
- (void)signUpViewControllerDidCancelSignUp:(PFSignUpViewController *)signUpController {
NSLog(@"User dismissed the signUpViewController");
}
// Sent to the delegate when a PFUser is logged in.
- (void)logInViewController:(PFLogInViewController *)logInController didLogInUser:(PFUser *)user {
[self dismissViewControllerAnimated:YES completion:NULL];
}
// Sent to the delegate when the log in attempt fails.
- (void)logInViewController:(PFLogInViewController *)logInController didFailToLogInWithError: (NSError *)error {
NSLog(@"Failed to log in...");
}
// Sent to the delegate when the log in screen is dismissed.
- (void)logInViewControllerDidCancelLogIn:(PFLogInViewController *)logInController {
[self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
DMKHomeViewController *destination = [segue destinationViewController];
destination.interstitialPresentationPolicy = ADInterstitialPresentationPolicyAutomatic;
}
- (IBAction)Logout:(id)sender {
[PFUser logOut];
// Present the log in view controller
if (![PFUser currentUser]) { // No user logged in
// Create the log in view controller
PFLogInViewController *logInViewController = [[PFLogInViewController alloc] init];
[logInViewController setDelegate:self]; // Set ourselves as the delegate
// Create the sign up view controller
PFSignUpViewController *signUpViewController = [[PFSignUpViewController alloc] init];
[signUpViewController setDelegate:self]; // Set ourselves as the delegate
// Assign our sign up controller to be displayed from the login controller
[logInViewController setSignUpController:signUpViewController];
// Present the log in view controller
[self presentViewController:logInViewController animated:YES completion:NULL];
}
}