Post not yet marked as solved
Hello,I'm trying to install an iOS app (.ipa file) on my phone (iPhone 5S - iOS 11.4) using iTunes for PC (with Windows 10).The phone's UDID is listed in Apple Developer Console list of devices.I've connected the phone to the PC and was able to transfer the file to the phone (I can see it in File Sharing section with FileManager Documents app) but not to install it.Does not work to drag-and-drop the file. What can I do to install the app?Thanks
Post not yet marked as solved
I have to develop an iOS app to present a 3D version of some special tables and chairs with parts that can be moved/rotated. The purpose is to allow the user to interact (select,move,rotate) parts of these objects in order to test the flexibility.Example: if the chair has the backrest that can be arranged at different angles (with values between 0 and 45) the user will have the opportunity to do so. If some parts of the chair can be replaced the user can also do that.I belive that these 3 steps are to be followed in order to display the VR objects in the AR:Step 1. the object will be designed with 3DMax/Blender then exported in .DAE format.Step 2. in VR the objects are moved/repositioned accordingly to the user needsStep 3. the object, in his final setting will be displayed in AR**Technologies**I have to choose between:- SceneKit + ArKit (swift): small experience with this technologies but willing to learn more- Unity: no experience at all. Very tempting if taking into consideration the amount of tutorials/examples and the community**The problems**1. I could'n find an official Apple tutorial for SceneKit2. I could'n find any example that explains how to move a Rig-Object in SceneKit**Questions**1. Are there any official SceneKit tutorials?2. I understand that first step is the 3D object modeling (in my case I will use 3D MAX and then export in .DAE). The object must have joints/Rig where component movement is allowed? Where could I find an example?3. The object's internal skeleton is made in 3D MAX or later is programmed in Xcode?4. The Rigging process ("Rigging is the process of taking a static 3D model and creating a bone system, scripts, and other things to give the model the ability to move, change expressions and transform") is shaped by the designer (in 3dMax /Blender) or by the programmer (based on an 3D static object that the designer created ) ?5. is there a way to entirely design the object in 3DMax (with all joints/rigs/constraints) and then just export and import in XCode ? In this case the programmer will no longer have to program individually every joint but to use the ones from the .DAE file?6. Are there any suggestions on how to approach this project?Thanks a lot for any idea.
Post not yet marked as solved
Hello,I have some issues when loading images from a web-server in UICollectionView using NScache.The problem:The images are not proper displayed:1. sometimes they are not showned in the corresponding cellor2. the image is changing on scrollSituation:1. I have 3 arrays whitch are properly loaded from the web-server in function viewDidLoad(). These arrays are: vPrice, vTitle and vImages_api2. my custom class for cell have:- label for price: cell.lblPrice- label for title: cell.lblTitle- image: cell.imgPictureI belive that the problem is in function func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCellIt could be related either to the way I use NSCache or to the way I use and when I use DispatchQueue.The code: func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { let cell = self.collectionViewPRODUSE.dequeueReusableCell(withReuseIdentifier: "customCell", for: indexPath) as! clsCustomCell cell.lblPrice.text = vPrice[indexPath.item] cell.lblTitle.text = vTitle[indexPath.item] cell.layer.borderColor = UIColor.lightGray.cgColor cell.layer.borderWidth = 0.5 DispatchQueue.global(qos: .userInitiated).async { //background thread let ImageString = self.vImages_api[indexPath.item] let imageUrl = URL(string: ImageString) let imageData = NSData(contentsOf: imageUrl!) // main thread to update the UI DispatchQueue.main.async { let key1 = self.vImages_api[indexPath.item] as AnyObject //if i saved allready my image in cache, then i will load my image from cache if let imageFromCache = self.objCache.object(forKey: key1){ cell.imgPicture.image = imageFromCache as! UIImage } else{//if my image is not in cache ...... if imageData != nil { let myPicture = UIImage(data: imageData! as Data) cell.imgPicture.image = myPicture //save my image in cache self.objCache.setObject(myPicture!, forKey: ImageString as AnyObject) } } } } return cell }
I use xCode 9, swift 4 and "Eureka form library" for my project.**The situation**I have a list of cars with name and unique ID associated this way: 0 - ANY, 1 - VW, 7 - AUDI, 20 - MAZDAvar name_cars: [String] = ["ANY","VW","AUDI","MAZDA"]var id_cars:[Int] = [0, 1, 7, 20]I also have a form with "PushRow" and "ButtonRow".On click to the button I want to print the selected car name and ID.I was able to print the car's name but not the ID. import UIKit import Eureka class myPage: FormViewController { var cars: [String] = ["ANY","VW","AUDI","MAZDA"] var id_cars:[Int] = [0, 1,7,20] var selected_car: String = "ANY" //default car var selected_car_id: Int = 0 //default id car override func viewDidLoad() { super.viewDidLoad() create_form() } func create_form(){ form +++ Section("List") //list <<< PushRow<String>() { $0.title = "Cars" $0.options = cars $0.value = "ANY" $0.tag = "list_element" $0.selectorTitle = "Choose car" $0.onChange { [unowned self] row in self.selected_car = row.value! self.selected_car_id = ??? // **what should it be here in order to get the ID** } } //button <<< ButtonRow("Button1") {row in row.title = "Get Value on Console" row.onCellSelection{[unowned self] ButtonCellOf, row in print ("Car selected = ",self.selected_car, " and Id_Car_Selected = ",self.selected_car_id) } } }}
Post not yet marked as solved
My intention is to find user location when he click on a button.After some research I come up with 3 ways/methods to do that.In each case, after determing the location, I show it on he map and print the coordinates ( latitude and longitude).All 3 cases showed bellow work. But I can not figure out which one is the best/correct/fast.THE 3 METHODS:1) Method 1:- using requestLocation()- problem: it takes about 10 seconds to show location (quite slow)2) Method 2 (could this be the best?)- using CLLocationManagerDelegate (didUpdateLocations)3) Method 3 (a little bit strange, but it works)- using CLLocationManager().location?.coordinateCODE:1) Method 1:import UIKit
import CoreLocation
import MapKit
class location1: UIViewController {
let manager = CLLocationManager()
@IBOutlet weak var Map: MKMapView!
@IBOutlet weak var lbl_lat: UILabel!
@IBOutlet weak var lbl_long: UILabel!
@IBAction func btn_GetLocation(_ sender: Any) {
manager.requestLocation()//get Location one time
}
override func viewDidLoad() {
super.viewDidLoad()
manager.requestAlwaysAuthorization()
manager.requestWhenInUseAuthorization()
if CLLocationManager.locationServicesEnabled(){
manager.delegate = self
manager.desiredAccuracy = kCLLocationAccuracyBest
}else{
print ("Err GPS")
}
}
}
extension location1: CLLocationManagerDelegate{
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
if let location = locations.first {
print("Found user's location: \(location)", "lat =", location.coordinate.latitude," long = ",location.coordinate.longitude)
lbl_lat.text = "My Lat:" + String(location.coordinate.latitude)
lbl_long.text = "My Long:" + String(location.coordinate.longitude)
let span = MKCoordinateSpanMake(0.0005, 0.0005)
let mylocation = CLLocationCoordinate2DMake(location.coordinate.latitude, location.coordinate.longitude)
let region = MKCoordinateRegionMake(mylocation, span)
Map.setRegion(region, animated: true)
//marker
let marker1 = MKPointAnnotation()
marker1.coordinate = CLLocationCoordinate2DMake(location.coordinate.latitude, location.coordinate.longitude)
marker1.title = "My Position"
Map.addAnnotation(marker1)
}
}
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
print("Failed to find user's location: \(error.localizedDescription)")
}
}2) Method 2import UIKit
import CoreLocation
import MapKit
class locatia2: UIViewController {
@IBOutlet weak var Map: MKMapView!
let manager = CLLocationManager()
@IBOutlet weak var lbl_My_Longitude: UILabel!
@IBOutlet weak var lbl_My_Latitude: UILabel!
@IBAction func btn_get_my_location(_ sender: Any) {
manager.startUpdatingLocation()
}
override func viewDidLoad() {
super.viewDidLoad()
manager.requestAlwaysAuthorization()
manager.requestWhenInUseAuthorization()
if CLLocationManager.locationServicesEnabled(){
manager.delegate = self
manager.desiredAccuracy = kCLLocationAccuracyBest
}else{
print ("ErR GPS")
}
}
}
extension locatia2: CLLocationManagerDelegate{
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
if let location = locations.last {
print("Found user's location: \(location)", "lat =", location.coordinate.latitude," long = ",location.coordinate.longitude)
lbl_My_Latitude.text = "My Lat:" + String(location.coordinate.latitude)
lbl_My_Longitude.text = "My Long:" + String(location.coordinate.longitude)
let span = MKCoordinateSpanMake(0.0005, 0.0005)
let mylocation = CLLocationCoordinate2DMake(location.coordinate.latitude, location.coordinate.longitude)
let region = MKCoordinateRegionMake(mylocation, span)
Map.setRegion(region, animated: true)
//pun un marker
let marker1 = MKPointAnnotation()
marker1.coordinate = CLLocationCoordinate2DMake(location.coordinate.latitude, location.coordinate.longitude)
marker1.title = "My Position"
Map.addAnnotation(marker1)
//close updating location
manager.stopUpdatingLocation()
}
}
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
print("Failed to find user's location: \(error.localizedDescription)")
manager.stopUpdatingLocation()
}
}3) Method 3import UIKit
import CoreLocation
import MapKit
class location3: UIViewController {
@IBOutlet weak var lbl_long: UILabel!
@IBOutlet weak var lbl_lat: UILabel!
@IBOutlet weak var Map: MKMapView!
let manager = CLLocationManager()
@IBAction func btn_getPosition(_ sender: Any) {
let SURSA = manager.location?.coordinate
if let long = SURSA?.longitude{
let long_sir = String(long)
if let lat = SURSA?.latitude{
let lat_sir = String(lat)
lbl_lat.text = "My Lat: " + long_sir
lbl_long.text = "My Long:" + lat_sir
let span = MKCoordinateSpanMake(0.0005, 0.0005)
let mylocation = CLLocationCoordinate2DMake(SURSA!.latitude, SURSA!.longitude)
let region = MKCoordinateRegionMake(mylocation, span)
Map.setRegion(region, animated: true)
// marker
let marker1 = MKPointAnnotation()
marker1.coordinate = CLLocationCoordinate2DMake(SURSA!.latitude, SURSA!.longitude)
marker1.title = "My position"
Map.addAnnotation(marker1)
}
}
}
override func viewDidLoad() {
super.viewDidLoad()
manager.requestAlwaysAuthorization()
manager.requestWhenInUseAuthorization()
if CLLocationManager.locationServicesEnabled(){
manager.delegate = self
manager.desiredAccuracy = kCLLocationAccuracyBest
}else{
print ("ErR GPS")
}
}
}
extension location3: CLLocationManagerDelegate{
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
print("Failed to find user's location: \(error.localizedDescription)")
manager.stopUpdatingLocation()
}
}Thanks in advance
Hello,I'm a beginner with Swift and I'm struggling to understand the way the variables are send between page_1 and page_2 using delegate and protocols.I have a 2-page application: ViewController1.swift and ViewController2.swift- on page 1 (ViewController1.swift) I have a textbox (TextBoxControl) and a button.- on page 2 (ViewController2.swift) I have a label and a buttonI want to send text in thextbox from page_1 to page_2 and print it in page_2.The problem is that the delegated is always nil (it prints on the console... print ("Delegate is nil"). )Technologies: XCODE Version 9.4.1, swift 4How can I solve this?Thanks in advance.CODE - page1 ( ViewController1 ): import UIKit protocol delegate_transmisie_date_1_2{ func transmisie(text1: String) } class ViewController1: UIViewController { var delegate: delegate_transmisie_date_1_2? @IBOutlet weak var text1: UITextField! @IBAction func btn_Send_Date_Using_DelegateAndProtocol(_ sender: Any) { if self.delegate != nil { self.delegate?.transmisie(text1: text1.text!) }else{ print("Delegate is nil") } let selectionView = storyboard?.instantiateViewController(withIdentifier: "ID_PAGE2") as! ViewController2 present(selectionView, animated: true, completion: nil) } override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. } }CODE - PAGE2 ( ViewController2 ) import UIKit class ViewController2: UIViewController, delegate_transmisie_date_1_2 { @IBOutlet weak var label1: UILabel! func transmisie(text1: String, text2: String) { label1.text = text1 } @IBAction func btn_CloseWindow(_ sender: Any) { dismiss(animated: true, completion: nil) } override func viewDidLoad() { super.viewDidLoad() //This is the place where the delegate must by set ????? let pagina1 = storyboard?.instantiateViewController(withIdentifier: "ID_PAGINA1") as! ViewController1 pagina1.delegate = self } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } }
Post not yet marked as solved
Hi,I'm unable to to build an ionic 3 app in xcode using phonegap-plugin-push - err: library not found for -lGoogleToolboxForMac.I successfuly added the plugin and iOs platform.But in xcode on build I get 1 error: ld: library not found for -lGoogleToolboxForMac clang: error: linker command failed with exit code 1 (use -v to see invocation)I research this error and followed the instruction from this link https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#library-not-found-for--lgoogletoolboxformac but with no success.==============================================My technologies: cli packages: (/usr/local/lib/node_modules) @ionic/cli-utils : 1.19.1 ionic (Ionic CLI) : 3.19.1Global packages: cordova (Cordova CLI) : 7.1.0Local packages: @ionic/app-scripts : 3.1.8 Cordova Platforms : android 6.3.0 ios 4.5.4 Ionic Framework : ionic-angular 3.9.2System: ios-sim : 5.0.13 Node : v7.3.0 npm : 3.10.10 OS : macOS High Sierra Xcode : Xcode 9.2 Build version 9C40bThanks a lot!
I have a Ionic3 app for IoS. Until yesterday I was able to open the .xcodeproj in xcode9 and upload the app to my iphone. I have no idea what went wrong but now I get this error "Command /usr/bin/codesign failed with exit code 1" and can not upload the application to phone (using cable) or archive it.My technologies:**cli packages**: (/usr/local/lib/node_modules) @ionic/cli-utils : 1.15.2 ionic (Ionic CLI) : 3.15.2**global packages**: cordova (Cordova CLI) : 6.4.0**local packages**: @ionic/app-scripts : 2.1.3 Cordova Platforms : android 6.0.0 ios 4.3.1 Ionic Framework : ionic-angular 3.6.0**System**: ios-deploy : 1.9.0 ios-sim : 6.1.2 Node : v7.3.0 npm : 3.10.10 OS : macOS Sierra Xcode : Xcode 9.0.1 Build version 9A1004More details about my error: CodeSign /Users/macbook/Library/Developer/Xcode/DerivedData/HelloCordova-bsbygjyhdfcgftavbtgwrsqhgdkb/Build/Products/Debug-iphoneos/HelloCordova.app cd /Users/macbook/ionic/componentaalex3/platforms/ios export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" Signing Identity: "iPhone Developer: Alex Claudiu (xxxxxxxxxxxx)" Provisioning Profile: "iOS Team Provisioning Profile: *" (32d4f44b-xxxxxxxxxxxx.........................) /usr/bin/codesign --force --sign 0E9C82C58EED8DD6B6F1DAF2709E5714F67E568B --entitlements /Users/macbook/Library/Developer/Xcode/DerivedData/HelloCordova-bsbygjyhdfcgftavbtgwrsqhgdkb/Build/Intermediates.noindex/HelloCordova.build/Debug-iphoneos/HelloCordova.build/HelloCordova.app.xcent --timestamp=none /Users/macbook/Library/Developer/Xcode/DerivedData/HelloCordova-bsbygjyhdfcgftavbtgwrsqhgdkb/Build/Products/Debug-iphoneos/HelloCordova.app /Users/macbook/Library/Developer/Xcode/DerivedData/HelloCordova-bsbygjyhdfcgftavbtgwrsqhgdkb/Build/Products/Debug-iphoneos/HelloCordova.app: unknown error -1=ffffffffffffffff Command /usr/bin/codesign failed with exit code 1What shall I do in this situation? Do I have to make additional setup in the my Apple developer account or to change something in xcode?Thanks a lot.