我试图弄清楚为什么我的应用程序文件大小如此之大,当我安装使用Fabric Beta(由Twitter创建)的beta版本时.
归档构建并检查应用程序大小时,我发现它大约是194MB,但是,当我构建并安装应用程序以便在设备上进行调试时,占用的存储空间大约为85MB.
当我通过Fabric Beta安装应用程序时,该应用程序在设备上大约为194MB.
有人能够解释这里发生了什么.Fabric没有优化构建的问题吗?
我真的不明白为什么这给了我这么多麻烦.我正在使用Magical Record的核心数据包装器来创建实体,更新并保存它们.我能够完美地创建和获取实体,很好.创建的实体很好地被保留,但是,我无法对实体进行更改,并且一旦应用程序终止,这些更改就会持续存在.这是我如何设置魔法记录.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[MagicalRecord setupCoreDataStack];
return YES;
}
Run Code Online (Sandbox Code Playgroud)
我的应用程序终止时
- (void)applicationWillTerminate:(UIApplication *)application {
[[NSManagedObjectContext MR_defaultContext] MR_saveToPersistentStoreAndWait];
[MagicalRecord cleanUp];
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
// Saves changes in the application's managed object context before the application terminates.
}
Run Code Online (Sandbox Code Playgroud)
我如何创建我的实体
//Create a new payment entity and save it to the persistant data store, dismiss view controller upon saving
PaymentEntity *newPaymentEntity = [PaymentEntity MR_createEntity];
newPaymentEntity.title = self.titleTextField.text; …Run Code Online (Sandbox Code Playgroud) 我遇到这个问题已经有一段时间了,一直无法解决这个问题。大约 90% 的时间,我的手表应用程序无法在设备上安装。该应用程序将显示安装完成约 80%,然后失败并退出,在
iPhone 调试日志控制台
<Error>: 0x4029b000 __106-[ACXCompanionSyncConnectioninstallWatchAppWithBundleID:withProvisioningProfileInfo:completionWithError:]_block_invoke_3: Failed to install app com.mea.AppName.watchkitapp : Error Domain=ACXErrorDomain Code=17 "Got error 17 in install done from remote side (MI error ApplicationVerificationFailed ; Extended 0xe8008017 ; Desc Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.eC3skb/extracted/Payload/Watch.app/PlugIns/Watch Extension.appex : 0xe8008017 (A signed resource has been added, modified, or deleted.))" UserInfo={FunctionName=-[ACXServerInstallOperation receivedDictionaryOrData:], SourceFileLine=524, NSLocalizedDescription=Got error 17 in install done from remote side (MI error ApplicationVerificationFailed ; Extended 0xe8008017 ; Desc Failed to verify code signature of …Run Code Online (Sandbox Code Playgroud) 正如标题所示,我需要解决这个难题.
5
9 6
4 6 8
0 7 1 5
Run Code Online (Sandbox Code Playgroud)
我需要找到的路径是从上到下的最大总和,只移动到相邻的孩子.所以这条路径是5-9-6-7,总和为27.
我的代码适用于我自己输入的每一组数据,但是当我使用提供的textFile数据尝试谜题时,我的总和/答案不被接受为正确.
我不能为我的生活弄清楚我的代码有什么问题.有没有我看不到的例外?
public class Triangle
{
public static void main(String[] args) throws IOException
{
File file = new File("Tri.txt");
byte[] bytes = new byte[(int) file.length()];
try{
//Read the file and add all integers into an array with the correct size. Array size is found with number of bytes file.length()
//Parse string to integer
FileInputStream fis = new FileInputStream(file);
fis.read(bytes);
fis.close();
String[] valueStr = new String(bytes).trim().split("\\s+");
int[] list = …Run Code Online (Sandbox Code Playgroud)