更新:
我刚刚意识到您可以通过设置LD_TRACE_ARCHIVES和LD_TRACE_DYLIBS环境变量然后直接在命令行上运行链接器命令来获取更多信息.这是我正在执行的,然后是它的输出(虽然我用<short-text>字符串替换了一些非常长的路径和名称):
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/g++-4.2
-arch i386
-isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
-L<path_to_project>/build/Debug-iphonesimulator
-L<path_to_static_libs>
-F<path_to_project>/build/Debug-iphonesimulator
-filelist <path_to_project>/build/<project_name>.build/Debug-iphonesimulator/<project_name>.build/Objects-normal/i386/<project_name>.LinkFileList
-mmacosx-version-min=10.6
--verbose
-lproject_lib
-Xlinker -objc_abi_version
-Xlinker 2
-framework Foundation -framework UIKit -framework OpenGLES -framework QuartzCore
-o <path_to_project>/build/Debug-iphonesimulator/<project_name>.app/<project_name>
Using built-in specs.
Target: i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)
/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/collect2
-dynamic -arch i386 -macosx_version_min 10.6
-syslibroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
-weak_reference_mismatches non-weak
-o <path_to_project>/build/Debug-iphonesimulator/<project_name>.app/<project_name>
-lcrt1.10.6.o
-L<path_to_project>/build/Debug-iphonesimulator
-L<path_to_static_libs>
-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib
-L/Developer/usr/bin/../lib/gcc/i686-apple-darwin10/4.2.1
-L/Developer/usr/bin/../lib/gcc
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/usr/lib/gcc/i686-apple-darwin10/4.2.1
-L/Developer/usr/bin/../lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1
-L/Developer/usr/bin/../lib/gcc/i686-apple-darwin10/4.2.1/../../..
-L/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../..
-filelist <path_to_project>/build/<project_name>.build/Debug-iphonesimulator/<project_name>.build/Objects-normal/i386/<project_name>.LinkFileList
-lproject_lib
-objc_abi_version 2
-framework Foundation -framework UIKit -framework OpenGLES …Run Code Online (Sandbox Code Playgroud) 如何在xcode上发送电子邮件表单?
即:使用文本字段,发件人的电子邮件地址字段和发件人的姓名字段.
我正在使用iOS SDK 4.2.
我认为三元条件运算(?)在模拟器(iPhone4.1,4.2.iPad 3.2,4.2)上的实现方式与实际设备不同.因为:
iPad ? xibName = @"MyViewController-iPad" : @"MyViewController";
Run Code Online (Sandbox Code Playgroud)
在那些模拟器上工作得很好但在iPhone 4(4.1)上失败了
这样写的时候:
xibName = (iPad) ? @"MyViewController-iPad" : @"MyViewController";
Run Code Online (Sandbox Code Playgroud)
允许它在模拟器和设备上工作.
谁能说出原因?这是一个错误吗?"第二版"是否更好,我应该总是那样写?
奇怪的是,编译器如何接受这两者并且模拟器同时使用两者,但设备只接受一个......可能是苹果检查的错误?
我目前正在使用Three20(v 1.0.4)构建一个项目.它构建并运行时没有错误或警告.它只是AppDelegate和TTLauncher类.
#import <Three20/Three20.h>
@interface AppDelegate : NSObject <UIApplicationDelegate>
{
}
@end
Run Code Online (Sandbox Code Playgroud)
#import "AppDelegate.h"
#import "LauncherController.h"
@implementation AppDelegate
//=============================================================
// UIApplicationDelegate
- (void)applicationDidFinishLaunching:(UIApplication*)application
{
TTNavigator* navigator = [TTNavigator navigator];
navigator.persistenceMode = TTNavigatorPersistenceModeAll;
TTURLMap* map = navigator.URLMap;
[map from:@"*" toViewController:[TTWebController class]];
[map from:@"tt://launcher" toViewController:[LauncherController class]];
[navigator openURLAction:[TTURLAction actionWithURLPath:@"tt://launcher"]];
}
- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)URL
{
[[TTNavigator navigator] openURLAction:[TTURLAction actionWithURLPath:URL.absoluteString]];
return YES;
}
@end
Run Code Online (Sandbox Code Playgroud)
#import <Three20/Three20.h>
@interface LauncherController : TTViewController <TTLauncherViewDelegate>
{
TTLauncherView* _launcherView;
}
@end
Run Code Online (Sandbox Code Playgroud)
#import "LauncherController.h" …Run Code Online (Sandbox Code Playgroud) int a = 0;
NSDictionary* d = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:a], @"A",
[NSNumber numberWithInt:a+=1], @"B",
[NSNumber numberWithInt:a+=1], @"C",
nil];
NSLog(@"%@", d);
Run Code Online (Sandbox Code Playgroud)
在iPad上的结果:
{A = 0; B = 1; C = 2; }
iOS模拟器中的结果:
{A = 2; B = 2; C = 1; }
任何人都可以重现结果,甚至更好地解释它吗?
我想在iphone模拟器4.2中添加图像.我用旧版本做了这个,比如在模拟器中拖动图像,然后点击图像进行保存.它起作用罚款,但同样的方法是注意工作4.2模拟器.我还手动将图像复制到Library/Applicationsuuport/iphone模拟器/ 4.2/Media/DCIM/100Apple ..请帮忙解决这个问题
我正在使用Google AdMob SDK 3开发iOS应用.AdMob SDK包含以下代码:
kADBannerContentSizeIdentifierPortrait =
&ADBannerContentSizeIdentifierPortrait != nil ?
ADBannerContentSizeIdentifierPortrait :
ADBannerContentSizeIdentifier320x50;
Run Code Online (Sandbox Code Playgroud)
我知道在iOS 4.2及更高版本中不推荐使用ADBannerContentSizeIdentifier320x50.我需要我的应用程序兼容到iOS 4.0.
当我在模拟器上针对iOS 4.0 SDK构建此代码时,一切顺利.当我针对设备构建iOS 4.0时,我收到以下错误:
'ADBannerContentSizeIdentifierPortrait' undeclared
Run Code Online (Sandbox Code Playgroud)
为什么是这样?据我所知,AdMob的执行这段代码专门绕过ADBannerContentSizeIdentifier320x50的问题,有利于ADBannerContentSizeIdentifierPortrait遭到淘汰.所以,为什么不工作?有什么想法吗?
谢谢.
我从开发人员朋友处获得了一个.app文件夹.
我会尝试他的应用程序并运行.app到我的iPhone模拟器,没有XCode.
有没有办法将此.app运行到我的iPhone模拟器?当然这个.app是为iPhone模拟器目标而构建的.
是否有一个简单的解释为什么表不会在iPhone模拟器中滚动?我有一个标签栏应用程序,我使用标准模板构建.我在第二个选项卡控制器中创建了一个UITableView.我用一个项目列表初始化了对象,它们显示得很好.但是,向上/向下箭头按钮既不起作用也不起作用.行可以突出显示.
谢谢.
iPhone设备控制台显示在管理器窗口中(shift + command + 2),但不显示iPhone模拟器.我想在Organizer窗口看到控制台,(不是Xcode控制台[shift + command + y]).
如何在组织者的iPhone设备上显示iPhone模拟器的控制台?
ios-simulator ×10
ios ×7
iphone ×7
xcode ×3
.app ×1
admob ×1
email ×1
ios-4.2 ×1
ios4 ×1
logging ×1
objective-c ×1
scroll ×1
three20 ×1
uitableview ×1