Search results for

“translate scheme”

6,670 results found

Post

Replies

Boosts

Views

Activity

Breakpoints in c++ code not triggered
I am trying to use Xcode (v6.3.2) to debug my C++ command line application. I have setup an external build target that calls `make` and successfully builds my application. I have also modified the Run scheme to run the built application and `debug executable` is checked and `Build Configuration` is set to `Debug`.However, no matter what I do, I cannot get any breakpoint to trigger when I run. The application always runs successfully but just doesn't stop at any of the breakpoints.This seems to be a very common issue and I have tried several of the suggestions that people have made over the years. One of the most common solutions I have read is to disable the Load symbols lazily setting under Preferences -> Debugging. However, this setting no longer seems to exist for the latest version of Xcode. I have also created an .lldbinit file with the setting as described at this URL: http://lldb.llvm.org/troubleshooting.html. The breakpoints are enabled. In my `Makefile`, the compiler is `clang++` and the
1
0
3k
Jun ’15
Reply to Code already redeemed - nothing in Updates or Purchases
We're getting a bit of topic here, but if you can't install and you can't restore, you could try booting into Single User Mode:Hold down Command and S keys at bootup for 10 secs or so. Wait until the command-line prompt appears (after all the text is done scrolling past.) Then type fsck -fy and press Return. Eventually, after five different checks that take varying amounts of time, you should get to one of two messages: The volume [your Mac's name] appears to be OK or FILE SYSTEM WAS MODIFIED. If you encounter the first message, type reboot and press Return. If you see the latter message, though, you'll want to run fsck -fy all over again. You can retype the command and hit Return, or press the Up arrow once and then press Return.If that doesn't work you can also erase your El Capitan partition in SUM and try again.Finally, if all else fails, you can restore to your original OS X with Internet Revovery mode:Boot to the Internet Recovery HD:Restart the computer and after the chime press and hold down the COMMA
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to New OS 2 Beta Update stuck in progress on restart
Some boot problems can fixed by booting to the Recovery HD and using the utilities, some more can be fixed in Single User Mode.If you want to try one or both of those and need further help, let me know...Depending on your level of experience and enthusiasm though, it might be quicker (and should certainly be simpler) to just do a complete system restore as follows:Boot to the Internet Recovery by:Restart the computer and after the chime press and hold down the COMMAND-OPTION- R keys until a globe appears on the screen. Wait patiently - 15-20 minutes - until the Recovery main menu appears.Partition and Format the hard drive: 1 Select Disk Utility from the main menu and click on the Continue button. 2 After DU loads select your newly installed hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window. 3 Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
Reply to on demand resources in iOS7?
I think that's the question. Is there a compatibility behaviour, or does it not work at all. I guess the question is - if you add tagged assets in your asset catalogs for ODR, does Xcode 7 then complain if you set the deployment target < iOS 9?It would be easy enough to write app code that doesn't bother requesting the resources, and pretends they don't exist, if the NSBundleResourceRequest class is not available. We already do that kind of thing all over the place when supporting multiple OS versions. I am contemplating doing this in one app with an optional feature that takes ~60 MB of space. It would be nice if I could just add support for iOS 9 and later using ODR and not worry about implementing some home grown download scheme (or making the bundle 60 MB bigger unnecessarily).
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
NEFilterDataProvider Extension
I'm trying to create a sample NEFilterDataProvider extension based on the new iOS9 API's. I succesfully added a new target using the skeleton that's provided in the El Capitan frameworks folder. My issue is - I can't get breakpoints to trigger, and I can't get any device log information from the print statements I'm using in my code for debugging.I've tried:Running the host app, then attaching to the PID/Name of the extensionRunning the extension scheme directlyWhen I run the extension scheme it asks me which app I'd like to attach it to. I've tried attaching it to both my host app and Safari to no avail. Any ideas?
1
0
727
Jun ’15
Xcode Server does not work with osx applications
Is it not possible to use Xcode Server Bots with OSX applications? I ran a simple bot with one test, which works fine in Xcode, but on the Xserver the test hangs and I eventually get the Build Service Issue:Terminated xcodebuild since it produced no output for too long.This type of issue is the same sort of thing that happens if you try to run xcodebuild test through ssh without a connection to the Window Server. That makes sense, but if that's true then there is no way to test OSX applications, because xctest always starts up the app (which tries to open a window) to run a test.Running XServer 4.1, and Xcode 6.3.2Easy to replicate:1. In Xcode, create a new Cocoa Application project (File->New->Project...)2. Set the default scheme to be Shared (Manage Schemes)3. Commit the project to your repository4. Create a Bot (Product->Create Bot...). Accept all the default settings, including Immediate Integration5. Wait for the integration to finish... and wait... and wait...Expected result:
2
0
371
Jun ’15
Generic Translation Layer Design
So here's the goal: I have a framework that deals in subclasses of a base `Object`. While I want to use this framework, I do not want to expose it to the rest of the app. Instead, I'm writing a layer around the framework that uses `Model` objects. In order to do this, I need to add a translation layer. I want the translation layer to be a protocol that simply translates from an `Object` subtype to a `Model` subtype. Ex:public protocol Translator { typealias T:Model typealias U:Object var objectType:U.Type { get } var modelType:T.Type { get } func translate(from: U) -> T func translate(from: T) -> U }I can't store the protocol this way though, so I tried to make it more generic:public protocol Translator { var objectType:Object.Type { get } var modelType:Model.Type { get } func translateObject(from: Object) -> Model func translateModel(from: Model) -> Object }I would then have a wrapper class that stores the Translators and use
7
0
1.1k
Jun ’15
Reply to Generic Translation Layer Design
In Xcode 7 beta 2, just using the == operator seems to work to compare meta-types in a playgroundprivate func translatorFor<T:Model>(type: T.Type) -> Translator? { for translator in translators { if translator.modelType == type { return translator } } return nil }
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Generic Translation Layer Design
That does not seem to work. I get the error: `Binary operator '==' cannot be applied to two ObjectIdentifier operands`.Likely, this is because the types in question are generics conforming to a Protocol. While `Object` is a base class, Model is simply a Protocol. I want my model objects to have value semantics, so defining a base Protocol seemed the best way to transform a class type to a struct type. However, I checked and this actually works: private func translatorForObjectType<T:Object>(type: T.Type) -> Translator? { for translator in translators { if translator.objectType === type { return translator } } }So I can compare types when they're based on a class, but not when they're based on a protocol. I'm going to update my original post to reflect this.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Generic Translation Layer Design
UPDATE:I neglected to point out that `Model` is simply a protocol, and that seems to be the source of the problem. I cannot compare a generic type when it is based on a protocol. `Object` (from the framework I'm wrapping) is a class, so this works: private func translatorForObjectType<T:Object>(type: T.Type) -> Translator? { for translator in translators { if translator.objectType === type { return translator } } }The point of using a protocol was to allow me to convert `Object` objects into value-based structs (to be used by the rest of the app). Defining a protocol was the only way I could think to do that. Perhaps there's a better way? (Although I still want to avoid Classes for my Model)
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Generic Translation Layer Design
Well, I don't know if I would recommend doing the following in production code, but I'm pretty sure it still worked back in 1.2...private func translatorFor<T:Model>(type: T.Type) -> Translator? { for translator in translators { if (translator.modelType) == (type) { return translator } } return nil }
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Error trying to build watchOS 2 app in Xcode 7
Go to top left corner of the bar in Xcode 7.0 next to the play and stop symbol. You will see your project icon. Click there(set active scheme). This error can be caused by number of issues. In my case, they automatically delete my scheme for Watch App or Watch App Extension or equivalent. Manually added it and appropriately select the type of similator compatible to my scheme.P.S. Ascertain the WatchOS version is the one your app support via setting the Build Settings and your migration settings are properly adjusted. I recommend you google a sample code for WatchOS 2 project if that is the case.
Jun ’15
Serializing generic structs
What is the best approach to archive/serialize generic structs?I cannot use NSCoding (since structs are not NSObjects).I can translate my structs to some other representation (such as JSON strings),but I'm struggling to unarchive/deserialize the structs back from the JSONif the structs are generic.More precisely, I'm wrestling with the type system to allow me to expressthis in an elegant, maintainable way.
47
0
8.8k
Jun ’15
Reply to shadow mapping woes
Apple's sample code MetalDeferredLighting is pretty complex,it's not for beginners(since you metioned a cube casting shadow on a ground plane,I assumed you were looking for samples for beginners). I'm learning Metal too,what I'm doing is translating: 1.Take an OpenGL tutorial. 2.Learn the concept. 3.Do it again in Metal.Metal is a computer graphic API(just API,not a whole new concept).Metal's way of implementing a shadowmapping is exactly the same as OpenGL's except you're using a different API. sorry for my poor English,not a native speaker 😀
Topic: Graphics & Games SubTopic: General Tags:
Jun ’15
Xcode7 code completion broken
In Xcode7, one of my project's targets' code completion and syntax highlighting are broken, at least for some of the files in the project. A different target, with almost the case exact code base, works fine! When I switch schemes the same files work just ok. They both share the same pch file. I've been juggling between Xcode6 and Xcode7, so not sure if that caused this, but I've cleaned out the DerivedData directory and restarted Xcode multiple times, but it still doesn't work. Both targets work just fine in Xcode6.Any ideas on how to fix this?
8
0
3.8k
Jun ’15
Breakpoints in c++ code not triggered
I am trying to use Xcode (v6.3.2) to debug my C++ command line application. I have setup an external build target that calls `make` and successfully builds my application. I have also modified the Run scheme to run the built application and `debug executable` is checked and `Build Configuration` is set to `Debug`.However, no matter what I do, I cannot get any breakpoint to trigger when I run. The application always runs successfully but just doesn't stop at any of the breakpoints.This seems to be a very common issue and I have tried several of the suggestions that people have made over the years. One of the most common solutions I have read is to disable the Load symbols lazily setting under Preferences -> Debugging. However, this setting no longer seems to exist for the latest version of Xcode. I have also created an .lldbinit file with the setting as described at this URL: http://lldb.llvm.org/troubleshooting.html. The breakpoints are enabled. In my `Makefile`, the compiler is `clang++` and the
Replies
1
Boosts
0
Views
3k
Activity
Jun ’15
Reply to Code already redeemed - nothing in Updates or Purchases
We're getting a bit of topic here, but if you can't install and you can't restore, you could try booting into Single User Mode:Hold down Command and S keys at bootup for 10 secs or so. Wait until the command-line prompt appears (after all the text is done scrolling past.) Then type fsck -fy and press Return. Eventually, after five different checks that take varying amounts of time, you should get to one of two messages: The volume [your Mac's name] appears to be OK or FILE SYSTEM WAS MODIFIED. If you encounter the first message, type reboot and press Return. If you see the latter message, though, you'll want to run fsck -fy all over again. You can retype the command and hit Return, or press the Up arrow once and then press Return.If that doesn't work you can also erase your El Capitan partition in SUM and try again.Finally, if all else fails, you can restore to your original OS X with Internet Revovery mode:Boot to the Internet Recovery HD:Restart the computer and after the chime press and hold down the COMMA
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’15
Reply to New OS 2 Beta Update stuck in progress on restart
Some boot problems can fixed by booting to the Recovery HD and using the utilities, some more can be fixed in Single User Mode.If you want to try one or both of those and need further help, let me know...Depending on your level of experience and enthusiasm though, it might be quicker (and should certainly be simpler) to just do a complete system restore as follows:Boot to the Internet Recovery by:Restart the computer and after the chime press and hold down the COMMAND-OPTION- R keys until a globe appears on the screen. Wait patiently - 15-20 minutes - until the Recovery main menu appears.Partition and Format the hard drive: 1 Select Disk Utility from the main menu and click on the Continue button. 2 After DU loads select your newly installed hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window. 3 Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’15
Reply to on demand resources in iOS7?
I think that's the question. Is there a compatibility behaviour, or does it not work at all. I guess the question is - if you add tagged assets in your asset catalogs for ODR, does Xcode 7 then complain if you set the deployment target < iOS 9?It would be easy enough to write app code that doesn't bother requesting the resources, and pretends they don't exist, if the NSBundleResourceRequest class is not available. We already do that kind of thing all over the place when supporting multiple OS versions. I am contemplating doing this in one app with an optional feature that takes ~60 MB of space. It would be nice if I could just add support for iOS 9 and later using ODR and not worry about implementing some home grown download scheme (or making the bundle 60 MB bigger unnecessarily).
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’15
NEFilterDataProvider Extension
I'm trying to create a sample NEFilterDataProvider extension based on the new iOS9 API's. I succesfully added a new target using the skeleton that's provided in the El Capitan frameworks folder. My issue is - I can't get breakpoints to trigger, and I can't get any device log information from the print statements I'm using in my code for debugging.I've tried:Running the host app, then attaching to the PID/Name of the extensionRunning the extension scheme directlyWhen I run the extension scheme it asks me which app I'd like to attach it to. I've tried attaching it to both my host app and Safari to no avail. Any ideas?
Replies
1
Boosts
0
Views
727
Activity
Jun ’15
Xcode Server does not work with osx applications
Is it not possible to use Xcode Server Bots with OSX applications? I ran a simple bot with one test, which works fine in Xcode, but on the Xserver the test hangs and I eventually get the Build Service Issue:Terminated xcodebuild since it produced no output for too long.This type of issue is the same sort of thing that happens if you try to run xcodebuild test through ssh without a connection to the Window Server. That makes sense, but if that's true then there is no way to test OSX applications, because xctest always starts up the app (which tries to open a window) to run a test.Running XServer 4.1, and Xcode 6.3.2Easy to replicate:1. In Xcode, create a new Cocoa Application project (File->New->Project...)2. Set the default scheme to be Shared (Manage Schemes)3. Commit the project to your repository4. Create a Bot (Product->Create Bot...). Accept all the default settings, including Immediate Integration5. Wait for the integration to finish... and wait... and wait...Expected result:
Replies
2
Boosts
0
Views
371
Activity
Jun ’15
Generic Translation Layer Design
So here's the goal: I have a framework that deals in subclasses of a base `Object`. While I want to use this framework, I do not want to expose it to the rest of the app. Instead, I'm writing a layer around the framework that uses `Model` objects. In order to do this, I need to add a translation layer. I want the translation layer to be a protocol that simply translates from an `Object` subtype to a `Model` subtype. Ex:public protocol Translator { typealias T:Model typealias U:Object var objectType:U.Type { get } var modelType:T.Type { get } func translate(from: U) -> T func translate(from: T) -> U }I can't store the protocol this way though, so I tried to make it more generic:public protocol Translator { var objectType:Object.Type { get } var modelType:Model.Type { get } func translateObject(from: Object) -> Model func translateModel(from: Model) -> Object }I would then have a wrapper class that stores the Translators and use
Replies
7
Boosts
0
Views
1.1k
Activity
Jun ’15
Reply to Generic Translation Layer Design
In Xcode 7 beta 2, just using the == operator seems to work to compare meta-types in a playgroundprivate func translatorFor<T:Model>(type: T.Type) -> Translator? { for translator in translators { if translator.modelType == type { return translator } } return nil }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’15
Reply to Generic Translation Layer Design
That does not seem to work. I get the error: `Binary operator '==' cannot be applied to two ObjectIdentifier operands`.Likely, this is because the types in question are generics conforming to a Protocol. While `Object` is a base class, Model is simply a Protocol. I want my model objects to have value semantics, so defining a base Protocol seemed the best way to transform a class type to a struct type. However, I checked and this actually works: private func translatorForObjectType<T:Object>(type: T.Type) -> Translator? { for translator in translators { if translator.objectType === type { return translator } } }So I can compare types when they're based on a class, but not when they're based on a protocol. I'm going to update my original post to reflect this.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’15
Reply to Generic Translation Layer Design
UPDATE:I neglected to point out that `Model` is simply a protocol, and that seems to be the source of the problem. I cannot compare a generic type when it is based on a protocol. `Object` (from the framework I'm wrapping) is a class, so this works: private func translatorForObjectType<T:Object>(type: T.Type) -> Translator? { for translator in translators { if translator.objectType === type { return translator } } }The point of using a protocol was to allow me to convert `Object` objects into value-based structs (to be used by the rest of the app). Defining a protocol was the only way I could think to do that. Perhaps there's a better way? (Although I still want to avoid Classes for my Model)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’15
Reply to Generic Translation Layer Design
Well, I don't know if I would recommend doing the following in production code, but I'm pretty sure it still worked back in 1.2...private func translatorFor<T:Model>(type: T.Type) -> Translator? { for translator in translators { if (translator.modelType) == (type) { return translator } } return nil }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’15
Reply to Error trying to build watchOS 2 app in Xcode 7
Go to top left corner of the bar in Xcode 7.0 next to the play and stop symbol. You will see your project icon. Click there(set active scheme). This error can be caused by number of issues. In my case, they automatically delete my scheme for Watch App or Watch App Extension or equivalent. Manually added it and appropriately select the type of similator compatible to my scheme.P.S. Ascertain the WatchOS version is the one your app support via setting the Build Settings and your migration settings are properly adjusted. I recommend you google a sample code for WatchOS 2 project if that is the case.
Replies
Boosts
Views
Activity
Jun ’15
Serializing generic structs
What is the best approach to archive/serialize generic structs?I cannot use NSCoding (since structs are not NSObjects).I can translate my structs to some other representation (such as JSON strings),but I'm struggling to unarchive/deserialize the structs back from the JSONif the structs are generic.More precisely, I'm wrestling with the type system to allow me to expressthis in an elegant, maintainable way.
Replies
47
Boosts
0
Views
8.8k
Activity
Jun ’15
Reply to shadow mapping woes
Apple's sample code MetalDeferredLighting is pretty complex,it's not for beginners(since you metioned a cube casting shadow on a ground plane,I assumed you were looking for samples for beginners). I'm learning Metal too,what I'm doing is translating: 1.Take an OpenGL tutorial. 2.Learn the concept. 3.Do it again in Metal.Metal is a computer graphic API(just API,not a whole new concept).Metal's way of implementing a shadowmapping is exactly the same as OpenGL's except you're using a different API. sorry for my poor English,not a native speaker 😀
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’15
Xcode7 code completion broken
In Xcode7, one of my project's targets' code completion and syntax highlighting are broken, at least for some of the files in the project. A different target, with almost the case exact code base, works fine! When I switch schemes the same files work just ok. They both share the same pch file. I've been juggling between Xcode6 and Xcode7, so not sure if that caused this, but I've cleaned out the DerivedData directory and restarted Xcode multiple times, but it still doesn't work. Both targets work just fine in Xcode6.Any ideas on how to fix this?
Replies
8
Boosts
0
Views
3.8k
Activity
Jun ’15