xcode7

xcodebuild -exportArchive: exportOptionsPlist error for key 'method': expected one of {}

被刻印的时光 ゝ 提交于 2020-04-29 06:27:32
问题 I'm using command line xcodebuild tool to export ad-hoc distribution ipa file out of my archive like this: xcodebuild -exportArchive -archivePath /path/Archive.xcarchive -exportPath /path -exportOptionsPlist /path/options.plist However, this command fails with error exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc No mater what 'method' I provide in my export options plist, it always fails with this error. It also fails if I remove the 'method'

xcodebuild -exportArchive: exportOptionsPlist error for key 'method': expected one of {}

只愿长相守 提交于 2020-04-29 06:27:00
问题 I'm using command line xcodebuild tool to export ad-hoc distribution ipa file out of my archive like this: xcodebuild -exportArchive -archivePath /path/Archive.xcarchive -exportPath /path -exportOptionsPlist /path/options.plist However, this command fails with error exportArchive: exportOptionsPlist error for key 'method': expected one of {}, but found ad-hoc No mater what 'method' I provide in my export options plist, it always fails with this error. It also fails if I remove the 'method'

XCode Simulator: how to change its shortcuts?

假装没事ソ 提交于 2020-02-18 22:14:46
问题 When the simulator in XCode is running, the default shortcuts for rotation are Cmd+Left and Cmd+Right. Is there any way to change them? For example, change them to Ctrl+Left & Ctrl+Right? 回答1: I was able to change Simulator shortcuts by doing the following: Open Simulator Right click the icon in the tray Select Options > Show in Finder Copy Simulator.app to your /Applications directory At this point, you won't be able to run Simulator.app from the /Applications directory, but that's ok, we're

Size image pin annotation

冷暖自知 提交于 2020-02-18 05:01:26
问题 I put the personal image instead of the traditional red pin. When I open the map to display the pin, the image cover the entire map. Is there a maximum size of the pin image or how do I integrate something in the code to fit the size standard classic pin? func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? { if annotation is MKUserLocation { return nil } let annotationIdentifier = "SomeCustomIdentifier" // use something unique that functionally

Size image pin annotation

假如想象 提交于 2020-02-18 04:56:35
问题 I put the personal image instead of the traditional red pin. When I open the map to display the pin, the image cover the entire map. Is there a maximum size of the pin image or how do I integrate something in the code to fit the size standard classic pin? func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? { if annotation is MKUserLocation { return nil } let annotationIdentifier = "SomeCustomIdentifier" // use something unique that functionally

How to convert textField.text value to Integer and sum two Integers

孤者浪人 提交于 2020-02-04 04:42:25
问题 Initialization of immutable value 'textfieldInt' was never used; consider replacing with assignment to '_' or removing it and textfield2Int I get that warning twice for textfieldInt This is all the code I have: class ViewController: UIViewController { @IBOutlet weak var textField1: UITextField! @IBOutlet weak var textField2: UITextField! @IBOutlet weak var output: UILabel! @IBAction func calculate(_ sender: AnyObject) { let textfieldInt: Int? = Int(textField1.text!) let textfield2Int: Int? =

OpenGLES Application (Android, iOS) on Visual Studio

泄露秘密 提交于 2020-01-25 20:04:58
问题 I created a cross platform OpenGLES application solution on Visual Studio. I paired Visual Studio with vcremote on my Mac. I can successfully compile the solution. When I switch to XCode and open the project which VS 2015 generated and build it I get the following error: Ld /Users/elodie/Library/Developer/Xcode/DerivedData/iOSAndroGame.iOS.Application-cgfyoibpjigxohbhicqhmkivhjhs/Build/Products/Debug-iphonesimulator/iOSAndroGame.app/iOSAndroGame normal x86_64 cd "/Users/elodie/vcremote/C

OpenGLES Application (Android, iOS) on Visual Studio

不羁的心 提交于 2020-01-25 20:03:38
问题 I created a cross platform OpenGLES application solution on Visual Studio. I paired Visual Studio with vcremote on my Mac. I can successfully compile the solution. When I switch to XCode and open the project which VS 2015 generated and build it I get the following error: Ld /Users/elodie/Library/Developer/Xcode/DerivedData/iOSAndroGame.iOS.Application-cgfyoibpjigxohbhicqhmkivhjhs/Build/Products/Debug-iphonesimulator/iOSAndroGame.app/iOSAndroGame normal x86_64 cd "/Users/elodie/vcremote/C

Saving NSManagedObject in NSUserDefaults

你说的曾经没有我的故事 提交于 2020-01-25 06:57:05
问题 Hello everyone (sorry for my bad english, I'm French), I'm trying to put my NSManagedObject into NSUserDefaults to retrieve it with its relationships. Basically I used NSCoding and I had implemented the required method, but because it's NSManaged objects, the signature of the init method it's : init(entity: NSEntityDescription, insertIntoManagedObjectContext context: NSManagedObjectContext?). The message is "'NSInvalidArgumentException', reason: 'Illegal attempt to establish a relationship

How to change color of single letters or one word in line

旧巷老猫 提交于 2020-01-24 13:11:06
问题 How to change color of word in "message" in AlertView @@IBAction func btn_instructions(sender: UIButton) { let alertView = UNAlertView(title: "MyTitle", message: "Here green text, here red text") alertView.show() Sorry if question is not correct. 回答1: As I've written in my comment above, UIAlertView is deprecated, so you'll have to use UIAlertController instead. You can , however, set attributed strings for the message, using (non-swifty) key-value coding (since UIAlertView is a subclass of