尝试从ios 9.0到9.1提交iOS和Apple Watch OS2扩展更新.我最近将Xcode更新到版本7.1,现在我遇到了这个问题而没有改变其他任何东西.
iTunes store operation failed you are not authorized to use this service
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
- 从Xcode中删除了开发者帐户 - >将开发人员帐户添加回Xcode - >仍然遇到错误.
- 我尝试了Xcode - >首选项 - > Apple ID - >全部下载以获取最新的配置文件.仍然得到错误.
- 删除所有旧档案,清理项目,再次归档.仍然得到错误.
- 增加了项目和itunes连接中的内部版本号和版本号.仍然得到错误.
- 删除了Library - > Developer文件夹中的派生数据,我仍然收到错误.
- 清理项目 - >再次存档项目 - >未选中"启用bitcode",我仍然收到错误.
代码签名设置:
- 观看目标 - >供应配置文件自动代码签名iOS开发人员
- 观看目标扩展 - >供应配置文件自动代码签名iOS开发人员
- iOS目标 - >供应配置文件自动代码签名iOS开发人员
仍然使用配置文件设置点击错误消息.
- 重新安装Xcode 7.1 - >仍然出现错误消息.
我还确认我的所有开发人员和分发配置文件都是有效的并已下载.
观察:
我注意到的一件事是,当我存档应用程序并查看窗口 - >管理器时,我会在左侧注意我的iOS应用程序以获取我的存档.我试图提交的这个应用程序旁边没有名称.但是,如果我删除此应用的所有旧存档,则应用名称会再次显示在应用图标旁边.也许是Xcode的一个错误,但我不知道.
我注意到的另一件事是我已经能够使用Xcode 7.1成功提交没有WatchKit扩展的iOS档案.我不确定WatchKit扩展是否可能成为问题,但这是可能的.
此外,当存档准备好上传到iTunes Connect时,我注意到了一些事情.首先,iOS应用程序默认为活动配置文件:"MyApp"分发配置文件.但是,WatchKit应用程序和应用程序扩展程序都会自动默认为XC*通配符配置文件.我不确定这整个问题是否只能与配置文件错误相关,但这是可能的.
iOS目标 - >构建阶段 - >嵌入监视内容设置为:
$(CONTENTS_FOLDER_PATH)/Watch
Run Code Online (Sandbox Code Playgroud)
应用程序加载器提交尝试:
尝试并失败,出现以下错误消息:
错误ITMS-90171"无效的捆绑结构 - 不允许二进制文件'MyApp.app/Watch/MyAppWatch.app/_WatchKitStub/WK'.您的应用程序不能包含支持的捆绑包的CFBundleExecutable之外的独立可执行文件或库.请参阅捆绑编程指南..."
再次,我使用这个完全相同的项目结构在Xcode 7.0 ios …
我认为这是一个相当简单的问题.我已经将我的UITableView委托/数据源分成了自己的扩展
//MARK: - UITableView Data Source/Delegate
extension TweetsViewController: UITableViewDataSource {
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 0
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("Cell") as! TweetCell
return cell
}
}
Run Code Online (Sandbox Code Playgroud)
但是在视图控制器本身我需要设置tblView委托
class TweetsViewController : UIViewController {
@IBOutlet weak var tblView: UITableView!
var fetchedResultsController : NSFetchedResultsController!
//MARK: View Management
override func viewDidLoad() {
super.viewDidLoad()
tblView.dataSource = self
}
}
Run Code Online (Sandbox Code Playgroud)
但是,由于视图控制器既不符合协议,但有扩展处理它们,那么如何显式设置tableView的数据源和委托?谢谢!
我有一个简单的问题.我试图检测用户何时摇动iPhone.我有标准代码来检测运动,这没有问题.然而,在我的实际手机上进行测试时,我意识到你必须非常努力地摇动设备才能触发运动检测.我想知道是否有办法实现一定程度的敏感性检查.例如,一种检测用户是否轻轻摇动设备或在轻微摇晃和硬摇动之间的某种方式的方法.这将针对iOS 7,因此非常感谢任何从旧iOS版本中弃用的提示或建议.我已经完成了我的谷歌搜索但尚未找到任何解决此问题的好方法(如果有的话.)
谢谢!
-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event
{
if(motion == UIEventSubtypeMotionShake)
{
//Detected motion, do something about it
//at this point.
}
}
-(BOOL)canBecomeFirstResponder
{
return YES;
}
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
[self becomeFirstResponder];
}
-(void)viewWillDisappear:(BOOL)animated
{
[self resignFirstResponder];
[super viewWillDisappear:animated];
}
Run Code Online (Sandbox Code Playgroud) //更新 已添加的更新代码按预期工作.请参阅下面更新的代码中的didSimulatePhysics方法.在我的例子中,我只关心在x轴上向左或向右移动一个字符,其中x轴上的0是x轴上的绝对左边和右边是可配置的值.Apple冒险游戏确实帮了很多忙.
//下面的原始帖子
我正在使用Apple SpriteKit,我正在努力实现一个我希望它表现的相机.我在代码中所做的是加载精灵字符,两个按钮和一个红色框,它在开始时位于视图外部的右侧.我希望能够做的是用按钮移动角色,一旦玩家到达屏幕的中间或末端,摄像机将重新调整以发现视图中无法看到的内容.所以向右移动应该最终显示一旦玩家到达那里,最初在视图之外的红色框.但是,根据我在下面使用的代码,我无法让相机跟随并调整主角的坐标.我看过Apple的高级场景处理文档以及其他一些堆栈溢出帖子,但似乎无法做到正确.如果有人可以提供一些建议,将不胜感激.

#define cameraEdge 150
-(id)initWithSize:(CGSize)size
{
if (self = [super initWithSize:size])
{
/* Setup your scene here */
//320 568
self.backgroundColor = [SKColor whiteColor];
myWorld = [[SKNode alloc] init];
[self addChild:myWorld];
mainCharacter = [SKSpriteNode spriteNodeWithImageNamed:@"0"];
mainCharacter.physicsBody.dynamic = YES;
mainCharacter.name = @"player";
mainCharacter.position = CGPointMake(20, 20);
CGRect totalScreenSize = CGRectMake(0, 0, 800, 320);
SKSpriteNode *box = [SKSpriteNode spriteNodeWithColor:[SKColor redColor] size:CGSizeMake(60, 60)];
SKSpriteNode *boxTwo = [SKSpriteNode spriteNodeWithColor:[SKColor greenColor] size:CGSizeMake(60, 60)];
SKSpriteNode *boxThree = [SKSpriteNode spriteNodeWithColor:[SKColor blueColor] size:CGSizeMake(60, 60)]; …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Gmail API发送电子邮件.我已经按照Google文档了解了如何执行此操作.我需要访问来自导入的MimeMessage:
javax.mail.internet.MimeMessage;
由于Android Studio中默认不包含此内容,因此我下载了.jar文件.
文件 - >新建 - >新模块 - >导入.JAR
我还将javax.jar放在Android Studio的libs文件夹中,并从那里引用了jar.
我的build.gradle(app)文件在依赖项部分中如下所示:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:7.3.0'
compile 'com.google.api-client:google-api-client:1.20.0'
compile 'com.google.api-client:google-api-client-android:1.20.0'
compile 'com.google.api-client:google-api-client-gson:1.20.0'
compile 'com.google.apis:google-api-services-gmail:v1-rev29-1.20.0'
compile project(':javax.mail')
}
Run Code Online (Sandbox Code Playgroud)
但是,当我清理并构建项目时,我收到此错误:
com.android.ide.common.ProcessException: org.gradle.Internal.ExecException.
我用Google搜索了这个,我很确定它与我的.jar文件引用有关,但我不知道如何解决这个问题.
在尝试同时支持 https 和 https 时,我的 WCF 服务遇到了配置问题。理想情况下,我想要的是在我的开发机器上运行 http,然后发布到运行 https 的 azure。
我按照这些帖子尝试运行配置:http : //jayakrishnagudla.blogspot.com/2009/12/configuring-wcf-services-to-work-with.html
如何将单个 WCF 服务配置为具有多个 HTTP 和 HTTPS 端点?
我的 Web.Config 如下:
<system.serviceModel>
<services>
<service name="Backend.Services.UserService.UserService" behaviorConfiguration="">
<endpoint address=""
binding="webHttpBinding"
contract="Backend.Services.UserService.IUserService"
bindingConfiguration="HttpsBinding"
behaviorConfiguration="Web">
</endpoint>
<endpoint address=""
binding="webHttpBinding"
contract="Backend.Services.UserService.IUserService"
bindingConfiguration="HttpBinding"
behaviorConfiguration="Web"
>
</endpoint>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name ="HttpBinding">
<security mode="None">
<transport clientCredentialType="None"/>
</security>
</binding>
<binding name="HttpsBinding">
<security mode="Transport"/>
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior …Run Code Online (Sandbox Code Playgroud) 我正在尝试在swift中过滤一组自定义对象,以获取具有我想要隔离的属性的数据子集.我的代码如下.
func generateSubset( dataPool : [CustomObject]) -> [CustomObject]? {
let subsetData = dataPool.filter{(includeElement:CustomObject)-> Bool in
return contains(includeElement.position, "TEACHER")
}
return subsetData
}
Run Code Online (Sandbox Code Playgroud)
我的自定义对象如下:
class CustomObject : {
var position : String?
init(){
position = ""
}
}
Run Code Online (Sandbox Code Playgroud)
但是,在尝试编译此代码时,Xcode抛出的错误是:
Cannot invoke 'filter' with an argument list of type [CustomObject] -> Bool
Run Code Online (Sandbox Code Playgroud)
我正在使用Swift 1.2,似乎无法弄清楚我做错了什么.任何帮助,将不胜感激.
我正在尝试使用UIView可以放置在任何位置的叠加层来裁剪图像视图的子图像UIImageView.当UIImageView内容模式为'Aspect Fit'时,我正在借用类似帖子中的解决方案来解决这个问题.建议的解决方案是:
func computeCropRect(for sourceFrame : CGRect) -> CGRect {
let widthScale = bounds.size.width / image!.size.width
let heightScale = bounds.size.height / image!.size.height
var x : CGFloat = 0
var y : CGFloat = 0
var width : CGFloat = 0
var height : CGFloat = 0
var offSet : CGFloat = 0
if widthScale < heightScale {
offSet = (bounds.size.height - (image!.size.height * widthScale))/2
x = sourceFrame.origin.x / widthScale
y = (sourceFrame.origin.y - offSet) / widthScale …Run Code Online (Sandbox Code Playgroud) 我已经在我的计算机上下载并安装了cocos2dx 3.0并创建了一个新项目.我能够成功编译iOS和Android.但是,我在HelloWorldScene.cpp中进行了一些代码更改,并在Xcode中编译了这些更改.我看到了变化,一切似乎都有效.然后我在eclipse中打开了项目并编译并运行了我的nexus 7,但是我的nexus没有看到iOS版本所做的更改.然后我注意到Eclipse中的Classes文件夹是空的.该文件夹应包含C++游戏逻辑的.cpp .h文件.我经历了不少教程和谷歌搜索,但文档不一致,因为cocos2dx的文件夹和项目结构似乎在cocos 2.x版本和版本3.0之间略有不同.
**我尝试过的步骤
我在完成一项非常简单的任务时遇到了一些麻烦.我的Windows窗体上有一个丰富的文本框,我试图在任何按钮点击之外访问它.我已经意识到控件不是"公共"的,我不能只在我想要改变它的代码中调用它.
我得到的错误是:非静态字段,方法或属性需要对象引用.我知道这是一个非常新手的问题,但我已经尝试了很多方法来解决这个问题,我无法弄明白.有人可以帮忙吗?
代码是
public static void SeeIfFinished()
{
if (FinishedThreadCount == 1)
{
richTextBox1.Text = "text";
}
}
Run Code Online (Sandbox Code Playgroud) 想知道是否有一种简单的转换方式,可以采用dd / MM / yyyy格式的日期并将其转换为MM / dd / yyyy进行显示。
当前尝试的代码是:
//in dd/MM/yyyy format string below.
NSString *stringToFormat = @"28/05/1991";
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"MM/dd/yyyy"];
NSDate *date = [dateFormatter dateFromString:stringToFormat];
Run Code Online (Sandbox Code Playgroud)
但是,在这种情况下,日期将返回nil。任何帮助,将不胜感激。谢谢。
ios ×8
android ×2
c# ×2
objective-c ×2
swift ×2
azure ×1
cocos2d-x ×1
detection ×1
email ×1
iphone ×1
motion ×1
sprite-kit ×1
uiimageview ×1
uitableview ×1
uiview ×1
wcf ×1
web-services ×1
winforms ×1
xcode ×1