Posts

Post marked as unsolved
37 Views

NSSavePanel / NSOpenPanel

The NSSavePanel in a sandboxed app is limited to one file when I enable the User Selected files sandbox entitlements. The same is true for the NSSavePanel. Now the problem is, I am writing an app for an IC Device Programmer (TL866II). Some of the IC's have 3 sections of memory type, a Flash and EEProm and Fuses, so I am supposed to read all three parts at once and then save them to disk. The problem is still that the files have to be separated into a Flash.bin file, an EEProm.bin file and a Fusebit.bin file. To do this I have to open the NSSavePanel 3 times to save each part of the IC data. I have modified a NSOpenPanel to save all 3 parts, but the OK button is only selectable when I have selected a file. I cannot save a new file without selecting a file. Does anyone have an idea to solve this problem. I tried Bookmark Security but it is the same problem, only one file is allowed. Programming electronics software is very hard with sandbox and without sandbox, Apple rejects the software.
Asked
by macsven.
Last updated .
Post marked as unsolved
422 Views

Xcode SKTileMapNode and SKSpriteNode

I have created a SKTileMapNode, inserted a SKSpriteNode in the scene. The SKSpriteNode is a parent of the SKSTileMapNode. I Try to modify the SKSpriteNode but i can't access it from the Interface Builder. How can i select the SKSpriteNodes in a SKTileMap fia keyboard. If i use Select all CMD + a i have all object.
Asked
by macsven.
Last updated .
Post marked as unsolved
307 Views

SKSpritenode navigable mesh

I'am createing a game with a SKTileMapNode (template from Xcode with a GameScene.sks).Now i have added a Nivigable Mesh into the Scene.If i use this in the GameViewController:GKScene *scene = [GKScene sceneWithFileNamed:@"GameScene"]; // Get the SKScene from the loaded GKScene GameScene *sceneNode = (GameScene *)scene.rootNode; // Copy gameplay related content over to the scene sceneNode.entities = [scene.entities mutableCopy]; sceneNode.graphs = [scene.graphs mutableCopy]; NSLog(@"%@",sceneNode.graphs);I get this: PlayerWalk = "<GKObstacleGraph: 0x281a34e40>";How can i access in GameScene.m to this Object.In the GameScene.m i added this:-(void)initGraphNode{ NSMutableArray *testArray = [[NSMutableArray alloc]initWithObjects:[self graphs], nil]; GKObstacleGraph *myGraph = [[GKObstacleGraph alloc]initWithNodes:testArray]; NSLog(@"Test %@",myGraph); }and it shows me:Test <GKObstacleGraph: 0x283ac8d00>Please in Objective C, not Swift. The Documentation is very poor and i found no sample sources in the Apple Developer Resource.Has anyone a Sample Code in Objective C?Rewards from GermanySven
Asked
by macsven.
Last updated .
Post marked as unsolved
2.4k Views

Right way to Save Data in Sandbox

The Sandbox makes me wild. I writing a Mac App that save Images in different sizes to a User Selected Folder.If i am use it without Sandbox the Images will be saved at a User Selected Directory. If i am Switch on the Sandboxmy Images will never saved at the User Selected Directory.if(!(myImage)){ [self message:@"Warning!" message:@"Please load a Image first"]; }else{ NSSavePanel *save = [NSSavePanel savePanel]; [save setCanCreateDirectories:YES]; [save setNameFieldStringValue:OSString]; [save setTitle:@"Load Image"]; [save setPrompt:@"Select"]; [save beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result) { if (result == NSFileHandlingPanelOKButton) { // We aren't allowing multiple selection, but NSOpenPanel still returns // an array with a single element. saveName = [save nameFieldStringValue]; NSURL* appDirectory = [save URL]; saveURL = appDirectory; NSLog(@"Speicher Ort %@",appDirectory); [self saveImage:myImage toPixelDimensions:NSMakeSize(128, 128) path:saveURL]; } else { [save close]; } }]; }Can someone tell me that is the right way to save a Image in Sandbox?I know in Sandbox it have the ~/Library/Containers , but it will never Save anything.The Entitlement for read / write Userselected is set.
Asked
by macsven.
Last updated .
Post marked as unsolved
133 Views

Xcode Image Asset Icon warning

I have renamed the Image.xcassets on my Project, now i got this warning. How can i correct this warning. I have renewed the Build Cheme, searched in the Build Configuration.After remaining/XCode_8/Mac App/ImageToAsset/ImageToAsset/main.m warning: Missing file: /XCode_8/Mac App/ImageToAsset/ImageToAsset/main.m is missing from working copyDeleting the old asset and add a new has not solved the Problem.
Asked
by macsven.
Last updated .
Post marked as unsolved
509 Views

macOS 10.11.6

I have a problem with macOS 10.11.6 on my Mac Pro 3.1.In warnings i have massive messages of this one:27.07.18 16:56:20,049 com.apple.xpc.launchd[1]: (com.apple.quicklook[457]) Service exited due to signal: Abort trap: 6Can anybody help me why?Sven
Asked
by macsven.
Last updated .
Post marked as unsolved
395 Views

Mac App Store receipts verification...

...is very heavy to understand. Is there any example code for use. I have the Mac App Receigen app but there is a big problem with the openssl for use in Xcode.
Asked
by macsven.
Last updated .
Post marked as solved
281 Views

How can i get access to the Bundle Recource folder to save data in a Sandbox Mac App?

How can i save data to the Recource folder in my Mac App with SandBox. I am using this code: NSURL *myUrl = [[NSBundle mainBundle] URLForResource:@"data" withExtension:@"dat"]; NSMutableData *orgdata = [[NSMutableData alloc]initWithContentsOfFile:[myUrl absoluteString]]; ..... doing something and save back ..... BOOL BoolResult = [orgdata writeToFile:[myUrl absoluteString] atomically:YES]; if (!BoolResult) { NSLog(@"Write error!"); }else{ NSLog(@"Write success!"); }
Asked
by macsven.
Last updated .